You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(kingsong): retry name + alarms queries until the wheel replies
Field report from a KS-16X owner on the latest firmware: 'EUC Planet
only works after I open the official KingSong app first'. Once primed
by the official app the wheel responds to ours fine, and the state
survives across our reconnect until power-off.
Diagnosis: the wheel silently drops writes during the first ~second
after the phone subscribes to notifications. Our init sent 0x9B
(queryName) and 0x98 (queryLimits) exactly once, so when those landed
in the dead window the wheel never replied -- no model string, no
alarm/max-speed reply, no connect chirp. The upstream reference
adapter re-asks name and serial on every incoming frame until they
arrive; one of those retries eventually lands and unlocks the wheel.
Fix: track 'have we heard the 0xBB / 0xA4 replies yet', and from
pollRealtime re-emit the corresponding init write each tick (capped
to 10 attempts) once the wheel has started pushing any frame. Gated
on firstFrameSeen so we don't pile retries into the same dead window
the original writes already fell into. State resets on disconnect so
a reconnect starts a fresh retry budget.
KingSong-only change -- the polling loop's empty-default for V14 /
Veteran / Begode / P6 is untouched.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments