2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

(MKN) Add min/max Temperature statistics to print_fscscy()

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1229 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Martin Knoblauch
2001-11-09 16:02:40 +00:00
parent 73ff128216
commit 6459a0d08b

View File

@@ -2744,17 +2744,20 @@ void print_fscpos(const sensors_chip_name *name)
void print_fscscy(const sensors_chip_name *name)
{
char *label = NULL;
double voltage, temp, tempmax, state,fan,min_rpm;
double voltage, temp, tempmin, tempmax, templim, state,fan,min_rpm;
int valid;
if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_TEMP1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP1,&temp) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP1_LIM,&templim) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP1_MIN,&tempmin) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP1_MAX,&tempmax) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP1_STATE,&state)) {
if (valid) {
print_label(label,10);
if((int) state & 0x01)
printf("\t%+6.2f C (Max = %+6.2f C)\n",temp,tempmax);
printf("\t%+6.2f C (Min = %+6.2f C, Max = %+6.2f C, Lim = %+6.2f C)\n",
temp,tempmin,tempmax,templim);
else
printf("\tfailed\n");
}
@@ -2762,12 +2765,15 @@ void print_fscscy(const sensors_chip_name *name)
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_TEMP2,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP2,&temp) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP2_LIM,&templim) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP2_MIN,&tempmin) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP2_MAX,&tempmax) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP2_STATE,&state)) {
if (valid) {
print_label(label,10);
if((int) state & 0x01)
printf("\t%+6.2f C (Max = %+6.2f C)\n",temp,tempmax);
printf("\t%+6.2f C (Min = %+6.2f C, Max = %+6.2f C, Lim = %+6.2f C)\n",
temp,tempmin,tempmax,templim);
else
printf("\tfailed\n");
}
@@ -2775,12 +2781,15 @@ void print_fscscy(const sensors_chip_name *name)
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_TEMP3,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP3,&temp) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP3_LIM,&templim) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP3_MIN,&tempmin) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP3_MAX,&tempmax) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP3_STATE,&state)) {
if (valid) {
print_label(label,10);
if((int) state & 0x01)
printf("\t%+6.2f C (Max = %+6.2f C)\n",temp,tempmax);
printf("\t%+6.2f C (Min = %+6.2f C, Max = %+6.2f C, Lim = %+6.2f C)\n",
temp,tempmin,tempmax,templim);
else
printf("\tfailed\n");
}
@@ -2788,12 +2797,15 @@ void print_fscscy(const sensors_chip_name *name)
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_TEMP4,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP4,&temp) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP4_LIM,&templim) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP4_MIN,&tempmin) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP4_MAX,&tempmax) &&
!sensors_get_feature(*name,SENSORS_FSCSCY_TEMP4_STATE,&state)) {
if (valid) {
print_label(label,10);
if((int) state & 0x01)
printf("\t%+6.2f C (Max = %+6.2f C)\n",temp,tempmax);
printf("\t%+6.2f C (Min = %+6.2f C, Max = %+6.2f C, Lim = %+6.2f C)\n",
temp,tempmin,tempmax,templim);
else
printf("\tfailed\n");
}