mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
PR #6195 widened the syncer guards to match Health Connect's enforced bounds, but widened too much: it overlooked that some of Gadgetbridge's in-band sentinel values fall inside HC's accepted range, so placeholder readings leaked into Health Connect and showed up as spurious data points. - HeartRate / RestingHeartRate: 255 is GB's "illegal value" marker for a bad measurement (ActivitySample.getHeartRate), and it sits inside HC's 1..300 / 0..300 range. Exclude it explicitly while keeping HC's bounds. - SpO2: 0 means "not measured" (sample providers return null on 0 and all SpO2 charts filter getSpo2() > 0). Raise the lower bound to 1. Add HeartRateSyncerTest covering the HeartRateSyncer.sync() path (sentinel 255 and 0 are not inserted; valid range passes) and extend SyncerRangeValidationTest with the new boundaries.