Show
Ignore:
Timestamp:
04/09/07 19:48:57 (6 years ago)
Author:
jwrdegoede
Message:

Generic chip support / get featuretype fixes just received from Bob Schlarmann, as the version I committed wasn't the latest version

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/chips_generic.c

    r4365 r4366  
    194194  } 
    195195   
    196   /* TODO: check for FAULT */ 
    197   if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_ALARM) &&  
    198       TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_ALARM)) { 
     196  /* print out temperature sensor info */ 
     197  if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_SENS)) { 
     198    int sens = (int)TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_SENS); 
     199    printf("sensor = %s  ", sens == 0 ? "disabled" : 
     200                            sens == 1 ? "diode" : 
     201                            sens == 2 ? "transistor" : 
     202                            sens == 3 ? "thermal diode" : 
     203                            sens == 4 ? "thermistor" : 
     204                            "unkown"); 
     205  } 
     206   
     207  /* ALARM and FAULT features */ 
     208  if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_FAULT) && 
     209      TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_FAULT) > 0.5) { 
     210    printf(" FAULT"); 
     211  } else if (TEMP_FEATURE(SENSORS_FEATURE_TEMP_ALARM) &&  
     212      TEMP_FEATURE_VAL(SENSORS_FEATURE_TEMP_ALARM) > 0.5) { 
    199213    printf(" ALARM"); 
    200214  }