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
{{ message }}
Repository navigation
refactor(firmware): name the comment-only protocol values so the client sync can read them #346
The client's npm run sync (SkyHawkClient/scripts/sync-a4ec.ts) imports firmware protocol values by parsing named declarations: enum class X : T { … } (parseEnum) and constexpr T NAME = … (constexprNum). Values written that way are generated into the client and never hand-typed (e.g. NodeHealthFlag → NODE_HEALTH_FLAGS).
Nine protocol facts exist in firmware only as comments, bare literals or a format string, so the sync can't see them and the client hand-types them. The SkyHawkClient structure rewrite (milestone v1.0.0) requires every hardware value to come from the sync.
Scope
Add named declarations for these, no change to any byte on the wire and no behaviour change:
CANProtocol.h:52 comment, CANProtocol.cpp:436 bit math
4
ESR split: low byte TEC, high byte REC
CANProtocol.h:55 comment, CANProtocol.cpp:439
5
Die temp "unavailable" = INT8_MIN (0x80)
CANProtocol.h:82 comment, PanelBridge.cpp:66
6
_NODE_TELEM framing (18 hex)
NodeStatus.h:36-41 comment, PanelBridge.cpp:115 format
7
TELEM page body layouts (offsets, units)
NodeStatus.h:92-100 doc comment
8
NTC "unavailable" = INT16_MIN
NodeStatus.h:96-97 comment
9
Calibration payload field offsets (HELLO_ACK, CAL_DATA, SESSION_ACK, NACK, RAW, COMMIT)
AxisCal.h structs + SimGateway.cpp_put16 writers
Shape is up to the PR, e.g. enum class HeartbeatFlag : uint8_t { BOFF = 0x01, EPVF = 0x02 }, constexpr int8_t DIE_TEMP_UNAVAILABLE = INT8_MIN, constexpr uint8_t GATEWAY_NODE_ID = 0, offset constants per payload. Firmware code should use the new names where it currently uses the literals.
Done when
Named declarations added; firmware builds; compiled frames byte-identical
FirmwarePlan / TechSpec / docs/ updated where they quote these values (same PR)
check_doc_refs.py clean
Client follow-up: the SkyHawkClient rewrite's sync step reads them (tracked in the client's R1 issue)
Activity
refactor(firmware): name the comment-only protocol values so the clie…
build(sync): sync the newly named firmware protocol values (#108)