Cadence from the CSC sensor #49

Open
opened 2026-08-31 17:25:15 +02:00 by robert · 0 comments
robert commented 2026-08-31 17:25:15 +02:00 (Migrated from git.butzei.de)

Goal

The Cycling Speed & Cadence characteristic already being parsed for wheel speed also carries crank revolutions. Exposing cadence is nearly free.

Acceptance criteria

  • Crank revolution count and last crank event time parsed from 0x2A5B
  • 16-bit crank event-time wraparound handled, as for the wheel fields
  • Cadence in rpm computed and smoothed, and clamped to zero when the cranks stop
  • Sensors that report only wheel data, or only crank data, both handled without error
  • Cadence sent to the watch and shown as a ride data field
  • Cadence written into the recorded GPX using the standard TrackPointExtension
  • Wraparound and stop-detection covered by unit tests

Files

  • companion/.../sensors/CscClient.kt
  • watchapp/src/c/view_ride.c

Notes

See docs/DECISIONS.md D16.

## Goal The Cycling Speed & Cadence characteristic already being parsed for wheel speed also carries crank revolutions. Exposing cadence is nearly free. ## Acceptance criteria - [ ] Crank revolution count and last crank event time parsed from `0x2A5B` - [ ] 16-bit crank event-time wraparound handled, as for the wheel fields - [ ] Cadence in rpm computed and smoothed, and clamped to zero when the cranks stop - [ ] Sensors that report only wheel data, or only crank data, both handled without error - [ ] Cadence sent to the watch and shown as a ride data field - [ ] Cadence written into the recorded GPX using the standard TrackPointExtension - [ ] Wraparound and stop-detection covered by unit tests ## Files - `companion/.../sensors/CscClient.kt` - `watchapp/src/c/view_ride.c` ## Notes See docs/DECISIONS.md D16.
Sign in to join this conversation.
No description provided.