Commit Graph

4 Commits

Author SHA1 Message Date
portersky 97c83aa460 feat: implement cel_crsf_param_set_power
Enumerate parameters until TX Power entry is found, match
requested mW against TEXT_SELECT options, and write the
selected option index.

Added:
- str_contains_ci() for case-insensitive substring matching
- is_power_param() to detect power-related parameters
- match_power_option() to find mW in option strings
- 4 new tests: null port, frame roundtrip, success, not found
2026-06-14 22:40:26 +02:00
portersky 7b3905084e feat: implement cel_crsf_param_ping and cel_crsf_param_read
Ping sends DEVICE_PING frame and waits for DEVICE_INFO response.
Read sends PARAM_READ frame and waits for matching PARAM_ENTRY.
Both use cel_crsf_stream_feed() with a clock-based timeout loop.
2026-06-14 22:08:51 +02:00
portersky 8c4045e2a4 feat: implement cel_crsf_param_write
Fire-and-forget parameter write. Builds CRSF PARAM_WRITE frame
and sends it over the serial port.
2026-06-14 21:55:15 +02:00
portersky 5d18258330 feat: implement cel_crsf_param_parse
Parse PARAM_ENTRY payload into cel_crsf_param struct. Handles
TEXT_SELECT with options string and UINT8/INT8 with min/max/default/
value fields. Respects hidden flag (bit 7 of type byte). Truncates
name and options to buffer limits.
2026-06-14 21:50:12 +02:00