Rename library targets from celrs_* to cel* (celcrsf, celserial,
cellogger, cellog) and add cel:: namespace aliases. Add cel::cel
umbrella target that links all core libraries.
Add ENABLE_TESTING option (default ON) to gate Unity/CMock fetch
and test targets for downstream consumers.
verify_connection retried DEVICE_INFO pings up to 3x2s,
blocking startup for ~6s even when the module just needs
more time to come up. The main loop already pings every 5s
and shows DEVICE_INFO in the type breakdown, so the upfront
check added latency without useful signal.
Log how long opening the port took instead.
- Show top CRSF frame types received, by raw type byte,
with a name lookup table (mirrors the Python tool)
- Send DEVICE_PING every 5s so DEVICE_INFO keeps appearing
in the type breakdown
- Fix NO LINK status to trigger when uplink quality is 0
- Fix SNR display (drop erroneous extra -128 offset)
- Retry the initial DEVICE_INFO ping up to 3 times
- Probe 921600 baud before 400000/420000
CRSF battery frame is big-endian: voltage(u16 BE 0.1V),
current(u16 BE 0.1A), capacity(u24 BE mAh), remaining(u8 %).
Previous code read little-endian with wrong byte count (7 vs 8)
and wrong scaling (/1000 vs /10), producing 9.98V for a 1S battery.
CP210x chips can't hit 921600 exactly so try 400000/420000 first.
Raise FC_STALE_S from 2s to 5s so the dashboard doesn't flicker
STALE when FC telemetry arrives slowly.
Add trailing spaces to shorter status labels so they don't leave
residue when overwritten by longer ones. Replace em dashes with
regular dashes per project style.
Logger writes to stderr so it doesn't corrupt the dashboard on stdout.
Dashboard tracks its own line count and uses cursor-up instead of home
so log messages appear cleanly before/after instead of interleaved.
Add baud rate probing (921600/400000/420000), auto-detect ELRS
ports, verify module responds to CRSF ping before telemetry loop,
and increase RC send rate to 50 Hz to match Python reference.
Telemetry tool now:
- Reads raw bytes from serial port
- Parses frames incrementally via cel_crsf_stream
- Decodes link stats, battery, heartbeat, airspeed
- Sends RC frames periodically to keep link alive
- Handles Ctrl+C gracefully via signal handler
The old [0xC8][dest][src][type][size][payload][crc] format was never
used with real hardware. Remove cel_crsf_frame_legacy, *_legacy()
functions, and update tests/tools accordingly.
Switch CRC from CCITT (0x07) to DVB-S2 (0xD5) to match ELRS.
Adopt ELRS USB frame format: [addr][length][type][payload][crc].
Update frame type constants to match current ELRS protocol values.
New skeleton modules (stub implementations with TODO comments):
- crsf_telemetry.h/.c: telemetry decoders (GPS, battery, link..)
- crsf_stream.h/.c: incremental streaming frame reader
- crsf_param.h/.c: parameter protocol (read/write/set_power)
Retained old frame format as *_legacy functions for backward
compatibility with existing telemetry tool and tests.
Add cel_serial_find_elrs_port() and cel_serial_open_probe()
stubs to serial module for port auto-detection and baud probing.
Drop timeout_ms; read now returns immediately with whatever
data is available (0 if none), so callers don't block the rest
of their loop waiting on serial I/O.
telemetry's poll loop now sleeps interval_ms itself between
empty reads via a small sleep_ms helper.
test_serial mocked log_write.h, which serial.c never calls.
Split celrs_serial into celrs_serial (platform-agnostic logic)
and celrs_serial_platform (real Win/POSIX backend), matching
the celrs_logger/celrs_log_write split.
test_serial now mocks celrs/platform/serial_internal.h and
links only celrs_serial, so the list-ports tests verify the
max_ports clamping and pass-through logic without hitting the
real registry or /dev.
Implement cel_serial_list_ports/cel_serial_free_ports with
platform backends: Windows reads HKLM\HARDWARE\DEVICEMAP\
SERIALCOMM (fast, single registry read), POSIX scans /dev for
ttyUSB*/ttyACM*.
telemetry tool gains --list, --port, and --baudrate flags;
baud rate was previously hardcoded to 400000. Rename the
tool_telemetry CMake target to telemetry.
Fix test_free_ports_zero_count, which passed a stack array to
cel_serial_free_ports (which calls free() on it), corrupting
the heap.