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

Add back the temp1 in vt1211, patch from Juerg Haefliger <juergh@gmail.com>

This patch enables the reading of temp1 (Reading3) from the VT1211.
Reading3 returns the V1211's internal temperature.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3246 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Rudolf Marek
2006-01-27 21:02:09 +00:00
parent 528d3c7f4d
commit c83a8a43e8
5 changed files with 36 additions and 16 deletions

View File

@@ -4311,8 +4311,19 @@ void print_vt1211(const sensors_chip_name *name)
printf("ERROR: Can't get FAN2 data!\n");
}
free(label);
/* no temp 1 */
if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP1,&label,&valid)) {
printf("ERROR: Can't get TEMP1 config!\n");
} else if (valid) {
if(!(err = sensors_get_feature(*name,SENSORS_VT1211_TEMP1,&cur)) &&
!(err = sensors_get_feature(*name,SENSORS_VT1211_TEMP1_HYST,&min)) &&
!(err = sensors_get_feature(*name,SENSORS_VT1211_TEMP1_OVER,&max))) {
print_label(label,10);
print_temp_info( cur, max, min, HYST, 1, 0);
printf(" %s\n", alarms & VT1211_ALARM_TEMP1 ? "ALARM" : "" );
} else
printf("ERROR: Can't get TEMP1 data!\n");
}
free(label);
if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP2,&label,&valid)) {
printf("ERROR: Can't get TEMP2 config!\n");
} else if (valid) {