psensor->sess_lowest = UNKNOWN_DBL_VALUE;
psensor->sess_highest = UNKNOWN_DBL_VALUE;
- psensor->min = UNKNOWN_DBL_VALUE;
- psensor->max = UNKNOWN_DBL_VALUE;
+ if (type & SENSOR_TYPE_PERCENT) {
+ psensor->min = 0;
+ psensor->max = 100;
+ } else {
+ psensor->min = UNKNOWN_DBL_VALUE;
+ psensor->max = UNKNOWN_DBL_VALUE;
+ }
psensor->type = type;
}
/*
- Returns the minimal value of a given 'type' (SENSOR_TYPE_TEMP or
- SENSOR_TYPE_FAN)
+ * Returns the minimal value of a given 'type' (SENSOR_TYPE_TEMP or
+ * SENSOR_TYPE_FAN)
*/
static double get_min_value(struct psensor **sensors, int type)
{
}
/*
- Returns the maximal value of a given 'type' (SENSOR_TYPE_TEMP or
- SENSOR_TYPE_FAN)
+ * Returns the maximal value of a given 'type' (SENSOR_TYPE_TEMP or
+ * SENSOR_TYPE_FAN)
*/
double get_max_value(struct psensor **sensors, int type)
{