Skip to content

Commit 343e42b

Browse files
nickolas122claude
andcommitted
Declare power measurement in the FTMS feature bitmask
The Fitness Machine Feature characteristic (0x2ACC) reported 0x1483 for a cycle machine: average speed, cadence, resistance level, heart rate and elapsed time. Bit 14, power measurement, was clear. That contradicted what the machine actually sends. Indoor Bike Data (0x2AD2) sets flags bit 6 and carries the instantaneous power field in every notification, and QZ had real power to report - up to 35 W in the session that exposed this. Rouvy subscribes to 0x2AD2 and 0x2A63 without consulting the feature bitmask, so it never noticed. MyWhoosh reads 0x2ACC first and believes it: seeing no power capability it subscribed only to CSC 0x2A5B, took cadence and speed from crank revolutions, and left its power tile at 0 W with nothing feeding it. Discovery, connection and the control point handshake all succeeded, which made this look like a data path failure rather than a capability declaration. Set bit 14 so the bitmask matches the notifications: 0x1483 -> 0x5483. Target setting features are unchanged. The treadmill entry is untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 6849b69 commit 343e42b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/devices/dircon/dirconmanager.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ using namespace std::chrono_literals;
4848
#define DM_BT(A) QByteArrayLiteral(A)
4949

5050
#define DM_CHAR_OP(OP, P1, P2, P3, ZWIFT_ENABLED) \
51-
OP(FITNESS_MACHINE_CYCLE, 0x2ACC, DPKT_CHAR_PROP_FLAG_READ, DM_BT("\x83\x14\x00\x00\x0C\xE0\x00\x00"), \
51+
/* 0x5483 adds bit 14, power measurement. 0x2AD2 always carried power (flags bit 6); \
52+
clients that trust this field - MyWhoosh does, Rouvy does not - saw 0 W. */ \
53+
OP(FITNESS_MACHINE_CYCLE, 0x2ACC, DPKT_CHAR_PROP_FLAG_READ, DM_BT("\x83\x54\x00\x00\x0C\xE0\x00\x00"), \
5254
DP_PROCESS_WRITE_NULL, P1, P2, P3) \
5355
OP(FITNESS_MACHINE_CYCLE, 0x2AD6, DPKT_CHAR_PROP_FLAG_READ, DM_BT("\x0A\x00\x96\x00\x0A\x00"), \
5456
DP_PROCESS_WRITE_NULL, P1, P2, P3) \

0 commit comments

Comments
 (0)