This enhances the general GB code _without_ the device specific adjustments required to actually display values:
- chart elevation even if the activity has no GPS recording (e.g. treadmill and floor climbing)
- added distance chart
- added stride chart
- added step length chart
- added body energy chart - 24/7 energy level
- added stamina chart - activity specific endurance capacity
- added N2 load (Nitrogen) chart for diving
- added CNS toxicity (Central Nervous System) chart for diving
- added oxygen toxicity summary for diving
- added surface interval summary for diving
Sleep sessions that grow over time (partial data synced mid-sleep, full
data available after waking) were permanently stuck as partial records
in Health Connect. The sync cursor advanced past the session's start
after the first sync, so the full session was never re-processed.
Fix with two mechanisms:
- Set clientRecordId per sleep session (deterministic from device +
start hour) with clientRecordVersion = stage count, enabling HC's
native upsert: re-inserting the same session replaces partial data
with the full record.
- Hold the sync cursor behind sessions that ended less than 6 hours
ago (likely still in-progress), so they get re-processed on the
next sync with more complete data.
Create PebbleHardware.java as the single source of truth for all
Pebble hardware definitions and for determining what model and features
a watch has. The goal of this commit is to better unify the pebble watch
model definitions into a single source of truth to make adding new
models easier, as well as to bring all the relevant model specific logic
about what a watch is capable of, or which watch model to use into a
single file versus being spread out among multiple files making it
easier to fail to fix logic bugs.
The PebbleHardware class now has all the definitions for the following
information in one place:
- Platform enum with capabilities (BLE-only, hasHealth, hasHRM)
- Hardware revision registry mapping hardware IDs to codenames
- BLE-only device detection methods
- Platform name lookup for watchface installation
This cleans up PebbleUtils to only contain non-hardware utilities.
(maybe should move into the pebble directory away from the utils folder
in another commit?)
Replace single sync-time ZoneOffset with ZoneId, resolving the correct
offset per record timestamp via ZoneId.rules.getOffset(instant). Fixes
wrong offset metadata on records crossing DST boundaries (e.g. sleep
sessions starting in CET and ending in CEST).
Also fixes leading space in device model name after manufacturer prefix
strip.