psensor->id = id;
psensor->name = name;
psensor->chip = chip;
- psensor->min = UNKNOWN_DBL_VALUE;
- psensor->max = UNKNOWN_DBL_VALUE;
+ psensor->sess_lowest = UNKNOWN_DBL_VALUE;
+ psensor->sess_highest = UNKNOWN_DBL_VALUE;
psensor->type = type;
s->measures[s->values_max_length - 1].value = v;
s->measures[s->values_max_length - 1].time = tv;
- if (s->min == UNKNOWN_DBL_VALUE || v < s->min)
- s->min = v;
+ if (s->sess_lowest == UNKNOWN_DBL_VALUE || v < s->sess_lowest)
+ s->sess_lowest = v;
- if (s->max == UNKNOWN_DBL_VALUE || v > s->max)
- s->max = v;
+ if (s->sess_highest == UNKNOWN_DBL_VALUE || v > s->sess_highest)
+ s->sess_highest = v;
if (v > s->alarm_high_threshold || v < s->alarm_low_threshold) {
if (!s->alarm_raised && s->cb_alarm_raised) {
/* see psensor_type */
unsigned int type;
- /* The maximum detected value of the sensor */
- double max;
+ /* The highest value detected during this session. */
+ double sess_highest;
- /* The minimum detected value of the sensor */
- double min;
+ /* The lowest value detected during this session. */
+ double sess_lowest;
int alarm_high_threshold;
int alarm_low_threshold;
json_object_object_add(obj,
ATT_SENSOR_TYPE, json_object_new_int(s->type));
json_object_object_add(obj,
- ATT_SENSOR_MIN, json_object_new_double(s->min));
+ ATT_SENSOR_MIN,
+ json_object_new_double(s->sess_lowest));
json_object_object_add(obj,
- ATT_SENSOR_MAX, json_object_new_double(s->max));
+ ATT_SENSOR_MAX,
+ json_object_new_double(s->sess_highest));
json_object_object_add(obj,
ATT_SENSOR_MEASURES,
measures_to_json_object(s));
value = psensor_value_to_str(s->type,
psensor_get_current_value(s),
use_celsius);
- min = psensor_value_to_str(s->type, s->min, use_celsius);
- max = psensor_value_to_str(s->type, s->max, use_celsius);
+ min = psensor_value_to_str(s->type,
+ s->sess_lowest,
+ use_celsius);
+ max = psensor_value_to_str(s->type,
+ s->sess_highest,
+ use_celsius);
gtk_list_store_set(store, &iter,
COL_TEMP, value,