mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-14 19:03:13 +00:00
sensors: Use quantity unit to determine when to translate to fahrenheit
This commit is contained in:
1 parent
297b050d3d
commit
fcf478016d
1 file changed
+2
-2
@@ -60,7 +60,7 @@ void print_chip_raw(const sensors_chip_name *name)
|
||||
b = 0;
|
||||
while ((sub = sensors_get_all_subfeatures(name, feature, &b))) {
|
||||
if (sub->flags & SENSORS_MODE_R) {
|
||||
is_temp = feature->type == SENSORS_FEATURE_TEMP;
|
||||
is_temp = !strcmp("°C", sensors_get_quantity(sub->type)->unit);
|
||||
|
||||
if ((err = sensors_get_value(name, sub->number,
|
||||
&val)))
|
||||
@@ -105,7 +105,7 @@ void print_chip_json(const sensors_chip_name *name)
|
||||
subCnt = 0;
|
||||
while ((sub = sensors_get_all_subfeatures(name, feature, &b))) {
|
||||
if (sub->flags & SENSORS_MODE_R) {
|
||||
is_temp = feature->type == SENSORS_FEATURE_TEMP;
|
||||
is_temp = !strcmp("°C", sensors_get_quantity(sub->type)->unit);
|
||||
|
||||
if ((err = sensors_get_value(name, sub->number,
|
||||
&val))) {
|
||||
|
||||
Reference in new issue
Block a user