Skip to content

v0.6.0

Latest

Choose a tag to compare

@mcdax mcdax released this 20 Nov 23:00
· 20 commits to main since this release

Adds support for the KingSmith R3 and makes FTMS command handling safer under concurrency. Thanks @pookey (#8).

  • KingSmith R3 (KS-AP-*, model KS-R3Q): detected as FTMS and tested with connect, start, set speed, pause and stop.
  • Pause before STOP on the R3: the R3 rejects FTMS STOP while the belt moves. For devices in FTMS_PAUSE_BEFORE_STOP_PREFIXES (currently only KS-AP-), stop() pauses first. It sends STOP only after a fresh Treadmill Data frame reports 0 km/h. STOP rejected during the R3's 3-2-1 start countdown is handled too. Other FTMS devices still send a single STOP.
  • Command serialisation (all FTMS devices): start, stop, set_target_speed, set_target_inclination and reset now run under an operation lock, and Control Point write-and-ack has its own lock. A speed command issued while start() waits for the belt now queues behind it instead of interleaving. pause() only takes the Control Point lock, so it can still halt the belt.
  • STOP result (all FTMS devices): if the STOP indication is dropped but FM Status reports the session ended (02 01), stop() now returns success.
  • Clearer logs when a stop can't be confirmed (connection lost, no telemetry, belt still moving, no active session).

Known follow-ups: #10, #11, #12, #13, #14.