Changeset 6008
- Timestamp:
- 01/09/12 19:24:03 (18 months ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/sensors/chips.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r6007 r6008 5 5 libsensors: Added support for new sysfs attributes 6 6 sensors: Added support for new sysfs attributes 7 Display both instantaneous and average power if available. 7 8 fancontrol: Support setup where one PWM output controls several fans 8 9 Output error messages to stderr -
lm-sensors/trunk/prog/sensors/chips.c
r6007 r6008 506 506 { SENSORS_SUBFEATURE_POWER_INPUT_LOWEST, NULL, 0, "lowest" }, 507 507 { SENSORS_SUBFEATURE_POWER_INPUT_HIGHEST, NULL, 0, "highest" }, 508 { SENSORS_SUBFEATURE_POWER_AVERAGE, NULL, 0, "avg" }, 509 { SENSORS_SUBFEATURE_POWER_AVERAGE_LOWEST, NULL, 0, "avg lowest" }, 510 { SENSORS_SUBFEATURE_POWER_AVERAGE_HIGHEST, NULL, 0, "avg highest" }, 511 { SENSORS_SUBFEATURE_POWER_AVERAGE_INTERVAL, NULL, 0, 512 "interval" }, 508 513 { -1, NULL, 0, NULL } 509 514 }; … … 517 522 }; 518 523 519 #define MAX(a, b) ((a) > (b) ? (a) : (b))520 524 #define NUM_POWER_ALARMS 4 521 525 #define NUM_POWER_SENSORS (ARRAY_SIZE(power_common_sensors) \ 522 + MAX(ARRAY_SIZE(power_inst_sensors), \ 523 ARRAY_SIZE(power_avg_sensors)) \ 526 + ARRAY_SIZE(power_inst_sensors) \ 524 527 - NUM_POWER_ALARMS - 2) 525 528 … … 547 550 sensor_count = alarm_count = 0; 548 551 549 /* Power sensors come in 2 flavors: instantaneous and averaged. 550 To keep things simple, we assume that each sensor only implements 551 one flavor. */ 552 /* 553 * Power sensors come in 2 flavors: instantaneous and averaged. 554 * Most devices only support one flavor, so we try to display the 555 * average power if the instantaneous power attribute does not exist. 556 * If both instantaneous power and average power are supported, 557 * average power is displayed as limit. 558 */ 552 559 sf = sensors_get_subfeature(name, feature, 553 560 SENSORS_SUBFEATURE_POWER_INPUT);
