wmgtemp: Actually useful graph (use Celcius instead of Kelvin)
This commit is contained in:
parent
59ed1f8afd
commit
b0aaf3cc3e
|
@ -53,9 +53,9 @@
|
||||||
|
|
||||||
#define OPT_STRING "g:sS:hH:w:m:M:a:e:u:1:2:tq"
|
#define OPT_STRING "g:sS:hH:w:m:M:a:e:u:1:2:tq"
|
||||||
|
|
||||||
#define TEMPTOFAHRENHEIT(t) ((int)((t * (9.0 / 5.0) - 459.67)))
|
#define TEMPTOFAHRENHEIT(t) ((int)((t * (9.0 / 5.0) + 32)))
|
||||||
#define TEMPTOKELVIN(t) ((int)t)
|
#define TEMPTOKELVIN(t) ((int)(t - 273.15))
|
||||||
#define TEMPTOCELCIUS(t) ((int)(t - 273.15))
|
#define TEMPTOCELCIUS(t) ((int)t)
|
||||||
#define TEMPTODISPLAYSCALE(temp, display_flags) (IsOn((display_flags), TSCALE_CELCIUS) ? TEMPTOCELCIUS((temp)) : (IsOn((display_flags), TSCALE_KELVIN) ? TEMPTOKELVIN((temp)) : TEMPTOFAHRENHEIT((temp))))
|
#define TEMPTODISPLAYSCALE(temp, display_flags) (IsOn((display_flags), TSCALE_CELCIUS) ? TEMPTOCELCIUS((temp)) : (IsOn((display_flags), TSCALE_KELVIN) ? TEMPTOKELVIN((temp)) : TEMPTOFAHRENHEIT((temp))))
|
||||||
|
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
|
@ -402,8 +402,8 @@ void update_sensor_data() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the new values from the sensors into the temperature arrays.
|
// Read the new values from the sensors into the temperature arrays.
|
||||||
if(IsOn(SENSOR_DISP, SYS)) sys_history[58] = get_stat_int(sys_sensor_name, sys_stat_name) / 1000000.0;
|
if(IsOn(SENSOR_DISP, SYS)) sys_history[58] = (get_stat_int(sys_sensor_name, sys_stat_name) / 1000000.0) - 273.15;
|
||||||
if(IsOn(SENSOR_DISP, CPU)) cpu_history[58] = get_stat_int(cpu_sensor_name, cpu_stat_name) / 1000000.0;
|
if(IsOn(SENSOR_DISP, CPU)) cpu_history[58] = (get_stat_int(cpu_sensor_name, cpu_stat_name) / 1000000.0) - 273.15;
|
||||||
|
|
||||||
// Update the run high/low values.
|
// Update the run high/low values.
|
||||||
if(cpu_high > run_cpu_high)
|
if(cpu_high > run_cpu_high)
|
||||||
|
|
Loading…
Reference in a new issue