From 6352b90a34703be057e808696fd0e776085ea25b Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 23 Jul 2016 15:32:50 +0900 Subject: [PATCH] Suunto EON Steel: fix the event begin/end flag This fixes a bug where the begin/end marker was mistakenly added as the value instead of as flag. Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- src/suunto_eonsteel_parser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c index 99fbed9..5e3ee7b 100644 --- a/src/suunto_eonsteel_parser.c +++ b/src/suunto_eonsteel_parser.c @@ -686,7 +686,7 @@ static void sample_event_state_value(const struct type_desc *desc, struct sample if (sample.event.type == SAMPLE_EVENT_NONE) return; - sample.event.value = value ? SAMPLE_FLAGS_BEGIN : SAMPLE_FLAGS_END; + sample.event.flags = value ? SAMPLE_FLAGS_BEGIN : SAMPLE_FLAGS_END; if (info->callback) info->callback(DC_SAMPLE_EVENT, sample, info->userdata); } @@ -708,7 +708,7 @@ static void sample_event_notify_value(const struct type_desc *desc, struct sampl if (sample.event.type == SAMPLE_EVENT_NONE) return; - sample.event.value = value ? SAMPLE_FLAGS_BEGIN : SAMPLE_FLAGS_END; + sample.event.flags = value ? SAMPLE_FLAGS_BEGIN : SAMPLE_FLAGS_END; if (info->callback) info->callback(DC_SAMPLE_EVENT, sample, info->userdata); } @@ -731,7 +731,7 @@ static void sample_event_warning_value(const struct type_desc *desc, struct samp if (sample.event.type == SAMPLE_EVENT_NONE) return; - sample.event.value = value ? SAMPLE_FLAGS_BEGIN : SAMPLE_FLAGS_END; + sample.event.flags = value ? SAMPLE_FLAGS_BEGIN : SAMPLE_FLAGS_END; if (info->callback) info->callback(DC_SAMPLE_EVENT, sample, info->userdata); } @@ -754,7 +754,7 @@ static void sample_event_alarm_value(const struct type_desc *desc, struct sample if (sample.event.type == SAMPLE_EVENT_NONE) return; - sample.event.value = value ? SAMPLE_FLAGS_BEGIN : SAMPLE_FLAGS_END; + sample.event.flags = value ? SAMPLE_FLAGS_BEGIN : SAMPLE_FLAGS_END; if (info->callback) info->callback(DC_SAMPLE_EVENT, sample, info->userdata); }