BLE CSC wheel sensor client and wheel-circumference calibration #18
Labels
No labels
area:companion
area:docs
area:shared
area:tooling
area:watchapp
blocker
kind:chore
kind:feature
kind:spike
kind:test
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Depends on
#19 Speed-source arbitration and GPS quality reporting
robert/PedalPebble
#49 Cadence from the CSC sensor
robert/PedalPebble
#50 BLE Cycling Power meter support
robert/PedalPebble
#54 Sensor and battery dropout alerts
robert/PedalPebble
#14 Android project skeleton and Gradle setup
robert/PedalPebble
Reference
robert/PedalPebble#18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Optional wheel sensor for instant, tunnel-proof speed.
Acceptance criteria
0x1816CSC Measurementcharacteristic0x2A5Bparsed: cumulative wheel revolutions and last wheel event timeFiles
companion/.../sensors/CscClient.ktClosed by PR #99 (merged): CSC UUIDs verified live against the current Bluetooth SIG spec (0x1816/0x2A5B/0x2A5C), wraparound-safe uint32/uint16 delta math via Math.floorMod (JVM's always-non-negative modulo, not %'s sign-follows-dividend), 23 host tests including fixtures that actually cross real uint16 and uint32 rollover boundaries. WheelSpeedTracker wired directly against #44's WheelCircumference settings type. Sensor state modeled as a proper sealed class (NotConnected/Scanning/Connecting/Reconnecting/Connected) so "no sensor" and "sensor stationary" (NoNewRevolution) can never collapse into a fabricated 0 speed \u2014 sets #19 (speed-source arbitration) up to consume this honestly later.\n\nReal bug caught by actually compiling against this project's real compileSdk 37: API 37 deprecates the old connectGatt(Context, boolean, callback, transport) overload in favor of connectGatt(BluetoothGattConnectionSettings, Executor, callback) \u2014 confirmed via the installed SDK's api-versions.xml, not assumed. AndroidCscClient branches on SDK_INT since minSdk is 31.\n\nVerified:
:companion:core:test23/23,:companion:sensors:assembleDebug/:companion:assembleDebugboth clean. No Bluetooth hardware in this sandbox \u2014 the scan/connect/notify path against a real sensor was compiled, not exercised.