feat(train): a ride's watts, cadences and wheel to Health Connect, and auto-pause by the wheel (ADR 0030, D51)
Health Connect gets the power meter's watts, the crank's cadence (CyclingPedalingCadenceRecord), a run's step cadence (StepsCadenceRecord) and, where the wheel measured the ride, the wheel's speed. The cadences' permissions are asked with writing's and each record is left out where its permission isn't granted; healthRecordsVersion in the fingerprint writes every workout once more. On a bike, the wheel's speed decides auto-pause while its sensor sends, GPS's once it has been silent 5 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
edd2df79bd
commit
64366d5420
1 changed files with 400 additions and 29 deletions
|
|
@ -1281,6 +1281,35 @@ Strava. What was found, 27 Oct:
|
|||
deploy, the size of Europe's database unpacked and Photon's memory on it, whether
|
||||
1.3.0 reads GraphHopper's `1.0` build (the folder GraphHopper offers for Photon's
|
||||
1.x releases), the field on a phone.
|
||||
- **D51 What a ride's sensors and a run's steps give Health Connect, and the wheel's
|
||||
auto-pause** (recommended, the developer's; 29 Oct; step 13, what D49 left open):
|
||||
- **Health Connect** (13a): a ride's power meter's watts as `PowerRecord` samples (as
|
||||
the rower's), its crank's cadence as `CyclingPedalingCadenceRecord`, and where its
|
||||
distance is the wheel's (D49) the wheel's speed as `SpeedRecord` in place of GPS's;
|
||||
a run's or walk's steps' cadence as `StepsCadenceRecord` (the cadence series, D48),
|
||||
over a ride's alone. The two cadences' permissions are asked with writing's, but
|
||||
writing stays on without them, so that those who switched it on before keep it:
|
||||
records Health Connect hasn't allowed are left out. Workouts written before are
|
||||
written again with them, as any change to what a workout gives is.
|
||||
- **Auto-pause by the wheel** (13b): while the speed sensor sends, the wheel's speed
|
||||
decides with a bike's thresholds (paused below 3 km/h for 5 s, going on above
|
||||
5 km/h); GPS's again once the wheel has been silent 5 s (over moving while either
|
||||
says so, which never pauses on a trainer where GPS drifts).
|
||||
- Built: 13a and 13b. `healthRecordsOf` adds the power meter's watts to the rower's,
|
||||
the crank's cadence (`pedalling`) and the steps' (`stepsCadence`, the series' 10 s
|
||||
windows), and on a ride whose distance is the wheel's its speed over stretches of
|
||||
5 s at least (`_wheelSpeeds`), pauses left out. `HealthRecords.kt` maps them to
|
||||
`CyclingPedalingCadenceRecord` and `StepsCadenceRecord`; the bridge asks for their
|
||||
permissions (`WRITE_EXERCISE` and `WRITE_STEPS`, as Health Connect names them,
|
||||
which a JVM test holds the manifest to for every kind written) with writing's
|
||||
(`ASKED_WITH`), and leaves out the records not allowed. So that workouts written
|
||||
before are written again, the fingerprint deciding it now folds in
|
||||
`healthRecordsVersion` (2): every workout is written once more after the update.
|
||||
`AutoPause.wheel` takes the wheel's speed (`WheelSpeed` in `CyclingSensors.kt`,
|
||||
over at least half a second, past the 32-bit rollover, by the circumference the
|
||||
ride starts with), and GPS's speed is ignored while the wheel sent within 5 s; a
|
||||
ride without a circumference (no speed sensor) pauses by GPS as before. Not tried
|
||||
with a real sensor or Health Connect.
|
||||
|
||||
## Consequences
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue