mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Our implementation of scale and offset was backwards: we were adding offset and then dividing by scale when decoding fields, but the publicly available protocol description dictates otherwise ( http://web.archive.org/web/20240519102659/https://developer.garmin.com/fit/protocol/#scaleoffset ): "the binary quantity is divided by the scale factor and then the offset is subtracted". For this reason the sign of GARMIN_TIME_EPOCH in Timestamp field definition must be flipped as well.