From 4aa70c9e2a0b4f3ad123fa33d799a925155a1e32 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 13 Jul 2023 13:53:15 -0700 Subject: [PATCH] garmin_parser: add a HRM profile message stub This is an empty stub for the HRM profile message, which isn't actually used by anything I know of, but came up as a result of some mis-parsing of odd FIT files generated by the Suunto mobile app. Losing synchronization in the FIT file then caused the parser to think it needed this message type, and not having it then caused an early abort. While it's not actually needed once parsing things correctly, since I looked up the message number and name for this message type, let's just keep it around. It won't hurt, and maybe it avoids me having to look it up in the future. Signed-off-by: Linus Torvalds --- src/garmin_parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/garmin_parser.c b/src/garmin_parser.c index a641b34..81d8fac 100644 --- a/src/garmin_parser.c +++ b/src/garmin_parser.c @@ -880,6 +880,7 @@ DECLARE_MESG(DEVICE_SETTINGS) = { } }; DECLARE_MESG(USER_PROFILE) = { }; +DECLARE_MESG(HRM_PROFILE) = { }; DECLARE_MESG(ZONES_TARGET) = { }; DECLARE_MESG(SPORT) = { @@ -1088,6 +1089,7 @@ static const struct { SET_MESG( 0, FILE), SET_MESG( 2, DEVICE_SETTINGS), SET_MESG( 3, USER_PROFILE), + SET_MESG( 4, HRM_PROFILE), SET_MESG( 7, ZONES_TARGET), SET_MESG( 12, SPORT), SET_MESG( 13, WTF_13),