From 4e83b1642c5c6f9fe6b5ae95d7aefe3671b2d846 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 26 Jan 2023 19:32:30 +0100 Subject: [PATCH] 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. --- src/suunto_eonsteel_parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c index c5d7a63..907eca7 100644 --- a/src/suunto_eonsteel_parser.c +++ b/src/suunto_eonsteel_parser.c @@ -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);