Only commit gap time to awakeSleepDuration when sleep actually resumes
(bridge confirmed), instead of speculatively counting all non-sleep
time as awake. Fixes total duration exceeding session span.
Fix dead code bug where MAX_WAKE_PHASE_LENGTH could never trigger
because Block A unconditionally nulled sleepStart before Block B
could check it. Non-sleep samples now only break a session if the
user has step activity or the gap exceeds 1 hour. Bridged gaps are
counted as awake sleep duration.
See: #5757
- Enable supportsInstalledAppManagement() to show the Apps tab in App Manager
- Fix RPK install protocol: include versionCode (field 2 of RpkInfo) in the
install request; the band silently ignores requests with versionCode=0
- Fix CMD_RPK_INSTALLED (subtype=2): handle band's post-install notification
to refresh the app list at the right time
- Fix deleteRpk() UUID comparison: use .equals() instead of ==
- Refresh app list after delete (band sends no explicit delete response)
- Read versionCode from RPK manifest.json in XiaomiFWHelper
- Fix various wrong proto field reads (watchface fields used for RPK responses)
getActivityKindForSample was written before AWAKE_SLEEP existed in
ActivityKind (April 2024 vs August 2024), so decoded stage 5 (awake
during sleep) fell through to UNKNOWN. This caused the sleep overlay
to skip awake periods, which may fragment sleep sessions in
SleepAnalysis and result in missing or truncated Health Connect
sleep records.
See: https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/5920
The device setting was conflated with "third_party_apps_set_settings" in c3d76477ec, but after reviewing PebbleKitSupport class, the allowed PebbleKit actions are not capable of changing settings on the android device as all of them are just piping data to and from the Pebble device.
PebbleKit messages can change settings on a Pebble device, though, this is possibly the source of the original confusion.
It looks like the 'NOT_CONNECTED' state does not get intercepted, change it to 'CONNECTING' as Gadgetbridge will attempt a reconnection immediately after disconnect
Use the standard field encoding for coordinates. Untested as my watch does not show the contents of the coordinate fields, but verified that they used to be invalid in the test cases and are now properly populated.
Also update test cases to match.
Change the order of the calls to the various setters in GarminSupport to reproduce the former fields' ordering in definition and data messages.
Update the tests in FitWeather to incorporate the new logic for local messages.
Add a new test that uses the legacy "setFieldByName" methods to ensure the serialization is equal.
Add full Gadgetbridge integration for the Braun iCheck 7 BPW4500
blood pressure monitor using its proprietary BLE protocol (Kaz USA).
New files:
- BraunBPW4500DeviceCoordinator: device detection via BLE name "BPW4500",
WHO blood pressure classification, GenericBloodPressureSampleProvider
- BraunBPW4500DeviceSupport: BLE communication, 19-byte measurement
packet parsing (systolic, diastolic), RTC sync
- DashboardBloodPressureWidget: dashboard gauge with WHO color coding
- BloodPressureChartFragment: line chart, measurement list,
PDF and CSV export with user profile info
Modified files:
- DeviceType: register BRAUN_BPW4500
- DashboardFragment: register bloodpressure widget
- DefaultChartsProvider: register BloodPressureChartFragment
- arrays.xml: add blood pressure to dashboard and charts tab lists
- strings.xml: add device name, bp_systolic, bp_diastolic strings
- shared_paths.xml: add pdf/csv cache paths for FileProvider export
Known limitation: offline stored measurements cannot be retrieved
reliably as the device transmits history data before GATT service
discovery completes in Gadgetbridge.
fixed chart monthly/weekly view
remodeled blood pressure fragments
fix remaining review comments