mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 14:25:39 +00:00
added alarms for 782d in7/in8.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@311 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -173,6 +173,8 @@ struct sensors_chips_data {
|
|||||||
#define W83781D_ALARM_IN4 0x0100
|
#define W83781D_ALARM_IN4 0x0100
|
||||||
#define W83781D_ALARM_IN5 0x0200
|
#define W83781D_ALARM_IN5 0x0200
|
||||||
#define W83781D_ALARM_IN6 0x0400
|
#define W83781D_ALARM_IN6 0x0400
|
||||||
|
#define W83782D_ALARM_IN7 0x10000
|
||||||
|
#define W83782D_ALARM_IN8 0x20000
|
||||||
#define W83781D_ALARM_FAN1 0x0040
|
#define W83781D_ALARM_FAN1 0x0040
|
||||||
#define W83781D_ALARM_FAN2 0x0080
|
#define W83781D_ALARM_FAN2 0x0080
|
||||||
#define W83781D_ALARM_FAN3 0x0800
|
#define W83781D_ALARM_FAN3 0x0800
|
||||||
|
@@ -629,7 +629,6 @@ void print_w83781d(const sensors_chip_name *name)
|
|||||||
printf("ERROR: Can't get IN6 data!\n");
|
printf("ERROR: Can't get IN6 data!\n");
|
||||||
free_the_label(&label);
|
free_the_label(&label);
|
||||||
}
|
}
|
||||||
/* FIXME - add alarms 7 and 8 */
|
|
||||||
if (is82d) {
|
if (is82d) {
|
||||||
if (!sensors_get_label(*name,SENSORS_W83782D_IN7,&label) &&
|
if (!sensors_get_label(*name,SENSORS_W83782D_IN7,&label) &&
|
||||||
!sensors_get_feature(*name,SENSORS_W83782D_IN7,&cur) &&
|
!sensors_get_feature(*name,SENSORS_W83782D_IN7,&cur) &&
|
||||||
@@ -637,8 +636,8 @@ void print_w83781d(const sensors_chip_name *name)
|
|||||||
!sensors_get_feature(*name,SENSORS_W83782D_IN7_MAX,&max)) {
|
!sensors_get_feature(*name,SENSORS_W83782D_IN7_MAX,&max)) {
|
||||||
print_label(label,10);
|
print_label(label,10);
|
||||||
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n",
|
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n",
|
||||||
cur,min,max,alarms&W83781D_ALARM_IN6?"ALARM":" ",
|
cur,min,max,alarms&W83782D_ALARM_IN7?"ALARM":" ",
|
||||||
beeps&W83781D_ALARM_IN6?"(beep)":"");
|
beeps&W83782D_ALARM_IN7?"(beep)":"");
|
||||||
} else
|
} else
|
||||||
printf("ERROR: Can't get IN7 data!\n");
|
printf("ERROR: Can't get IN7 data!\n");
|
||||||
free_the_label(&label);
|
free_the_label(&label);
|
||||||
@@ -648,8 +647,8 @@ void print_w83781d(const sensors_chip_name *name)
|
|||||||
!sensors_get_feature(*name,SENSORS_W83782D_IN8_MAX,&max)) {
|
!sensors_get_feature(*name,SENSORS_W83782D_IN8_MAX,&max)) {
|
||||||
print_label(label,10);
|
print_label(label,10);
|
||||||
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n",
|
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n",
|
||||||
cur,min,max,alarms&W83781D_ALARM_IN6?"ALARM":" ",
|
cur,min,max,alarms&W83782D_ALARM_IN8?"ALARM":" ",
|
||||||
beeps&W83781D_ALARM_IN6?"(beep)":"");
|
beeps&W83782D_ALARM_IN8?"(beep)":"");
|
||||||
} else
|
} else
|
||||||
printf("ERROR: Can't get IN6 data!\n");
|
printf("ERROR: Can't get IN6 data!\n");
|
||||||
free_the_label(&label);
|
free_the_label(&label);
|
||||||
|
Reference in New Issue
Block a user