Shared ESP-NOW wire-format header for the navigation and sensor electronics suite:
| Repo | Role |
|---|---|
| petegale/esp_utility | Sensor hub (WeAct CAN485 ESP32) |
| petegale/remote | Autopilot remote (Beetle ESP32-C6) |
| petegale/sensor-node | Wireless sensor node (M5Stack Atom + DS1603L) |
remote_protocol.h — protocol-level definitions shared by all three:
PROTOCOL_VERSION— bump when packet structures change; all nodes must matchremote_packet_t(5 bytes) — remote → hub button commandschannel_probe_t(4 bytes) — channel-discovery handshake (broadcast + unicast reply)sensor_v2_packet_t(8 bytes) — sensor-node → hub readings (tank mm, temp centi-°C, RPM)command_t,sensor_type_tenumsFLAG_*bits, battery thresholds, WiFi channel range
Not here: project-local timing constants (ESPNOW_ACK_TIMEOUT_MS, CHANNEL_PROBE_LISTEN_MS, MAX_TX_RETRIES, button debounce/chord/hold timings). Those live in each project's config.h so they can be tuned independently without touching the shared header.
git submodule add https://github.com/petegale/remote-protocol protocolThen in platformio.ini:
build_flags = -I protocolInclude as:
#include "remote_protocol.h"git submodule update --remote protocol
git add protocol
git commit -m "chore: bump remote-protocol submodule"| Version | Date | Change |
|---|---|---|
0x01 |
Apr 2026 | Initial: sensor_packet_t (tank-only, 7 bytes) |
0x02 |
May 2026 | sensor_v2_packet_t (8 bytes) with sensor_type discriminator; UDP $XDR transport removed from hub |