2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 22:05:11 +00:00

GL518SM: sensors program now prints the voltages if readall=1

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@418 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard
1999-04-22 21:15:09 +00:00
parent dda32a1f36
commit 0f2965dbe7

View File

@@ -241,10 +241,15 @@ void print_gl518(const sensors_chip_name *name)
actual readings! We hardcode this, as this is the easiest way. */
if (is_r00) {
if (!sensors_get_label(*name,SENSORS_GL518R00_VDD,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VDD,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VDD_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VDD_MAX,&max)) {
print_label(label,10);
printf("(n/a) (min = %+6.2f V, max = %+6.2f V) %s %s\n",
if (cur == 0.0)
printf("(n/a) ");
else
printf("%+6.2f V ",cur);
printf( "(min = %+6.2f V, max = %+6.2f V) %s %s\n",
min,max,alarms&GL518_ALARM_VDD?"ALARM":" ",
beeps&GL518_ALARM_VDD?"(beep)":"");
} else
@@ -252,20 +257,30 @@ void print_gl518(const sensors_chip_name *name)
free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_VIN1,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN1,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MAX,&max)) {
print_label(label,10);
printf("(n/a) (min = %+6.2f V, max = %+6.2f V) %s %s\n",
if (cur == 0.0)
printf("(n/a) ");
else
printf("%+6.2f V ",cur);
printf("(min = %+6.2f V, max = %+6.2f V) %s %s\n",
min,max,alarms&GL518_ALARM_VIN1?"ALARM":" ",
beeps&GL518_ALARM_VIN1?"(beep)":"");
} else
printf("ERROR: Can't get VIN1 data!\n");
free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_VIN2,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN2,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MAX,&max)) {
print_label(label,10);
printf("(n/a) (min = %+6.2f V, max = %+6.2f V) %s %s\n",
if (cur == 0.0)
printf("(n/a) ");
else
printf("%+6.2f V ",cur);
printf("(min = %+6.2f V, max = %+6.2f V) %s %s\n",
min,max,alarms&GL518_ALARM_VIN2?"ALARM":" ",
beeps&GL518_ALARM_VIN2?"(beep)":"");
} else