Skip to content

Commit

Permalink
update for mips vuuno, boxinfo: board temp added
Browse files Browse the repository at this point in the history
  • Loading branch information
BPanther committed Aug 17, 2023
1 parent e774917 commit ebe063a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/gui/dboxinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#include <iostream>
#include <fstream>

#if defined (BOXMODEL_VUPLUS_ARM) || defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO)
#if defined (BOXMODEL_VUPLUS_ARM) || defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO) || defined (BOXMODEL_VUUNO)
#include <system/proc_tools.h>
#endif

Expand Down Expand Up @@ -256,7 +256,7 @@ void CDBoxInfoWidget::paint()
height += mheight; // time
height += mheight; // uptime
height += mheight; // load
#if defined (BOXMODEL_VUPLUS_ARM) || defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO)
#if defined (BOXMODEL_VUPLUS_ARM) || defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO) || defined (BOXMODEL_VUUNO)
height += mheight; // temp
#endif
int cpuload_y1 = height;
Expand Down Expand Up @@ -442,8 +442,8 @@ void CDBoxInfoWidget::paint()
str_boot_title += ": ";
std::string str_up_title(g_Locale->getText(LOCALE_EXTRA_DBOXINFO_UPTIME));
str_up_title += ": ";
#if defined (BOXMODEL_VUPLUS_ARM) || defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO)
#if defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO)
#if defined (BOXMODEL_VUPLUS_ARM) || defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO) || defined (BOXMODEL_VUUNO)
#if defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO) || defined (BOXMODEL_VUUNO)
std::string str_cputemp_title("System"/*g_Locale->getText(LOCALE_EXTRA_DBOXINFO_SYSTEMP)*/);
#else
std::string str_cputemp_title("CPU"/*g_Locale->getText(LOCALE_EXTRA_DBOXINFO_CPUTEMP)*/);
Expand Down Expand Up @@ -511,18 +511,18 @@ void CDBoxInfoWidget::paint()
}
ypos += mheight;

#if defined (BOXMODEL_VUPLUS_ARM) || defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO)
#if defined (BOXMODEL_VUPLUS_ARM) || defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO) || defined (BOXMODEL_VUUNO)
// paint cpu temp
char proc_cputemp[8];
#if defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO)
#if defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO) || defined (BOXMODEL_VUUNO)
proc_get("/proc/stb/sensors/temp0/value", proc_cputemp, sizeof(proc_cputemp));
#else
proc_get("/sys/class/thermal/thermal_zone0/temp", proc_cputemp, sizeof(proc_cputemp));
#endif
if (atoi(proc_cputemp) > 0)
{
char cpu_temp[16] = { 0 };
#if defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO)
#if defined (BOXMODEL_VUDUO2) || defined (BOXMODEL_VUULTIMO) || defined (BOXMODEL_VUUNO)
sprintf(cpu_temp, "%d °C", atoi(proc_cputemp));
#else
sprintf(cpu_temp, "%d °C", atoi(proc_cputemp) / 1000);
Expand Down

0 comments on commit ebe063a

Please sign in to comment.