Use the correct field for the setpoint sample

This only happened to work correctly because both the setpoint and ppO2
field have the same data type and are located at the same offset in the
union.
This commit is contained in:
Jef Driesen 2023-01-26 19:32:30 +01:00
parent 9eef8c50c0
commit 4e83b1642c

View File

@ -829,11 +829,11 @@ static void sample_setpoint_type(const struct type_desc *desc, struct sample_dat
}
if (!strcasecmp(type, "Low"))
sample.ppo2 = info->eon->cache.lowsetpoint;
sample.setpoint = info->eon->cache.lowsetpoint;
else if (!strcasecmp(type, "High"))
sample.ppo2 = info->eon->cache.highsetpoint;
sample.setpoint = info->eon->cache.highsetpoint;
else if (!strcasecmp(type, "Custom"))
sample.ppo2 = info->eon->cache.customsetpoint;
sample.setpoint = info->eon->cache.customsetpoint;
else {
DEBUG(info->eon->base.context, "sample_setpoint_type(%u) unknown type '%s'", value, type);
free(type);