feat: per-board TX power range, TX_POWER_MAX sentinel (-128)

- Each board exports TX_POWER_RANGE constant (min, max dBm)
- RadioConfig::validate() uses the board's range, not hardcoded limits
- TX_POWER_MAX sentinel (-128 on the wire) means "use board's maximum"
  — resolved to the actual max before storing config
- GetConfig returns the resolved actual power, not the sentinel
- Default configs in examples use TX_POWER_MAX
- Protocol docs updated
This commit is contained in:
swaits committed 2026-03-29 20:42:58 -06:00
1 parent 0b4eb04591
commit ebe9197d04
8 files changed
+46 -14

No files matched your search

+1 -1
View File
@@ -67,7 +67,7 @@ Postcard is a compact binary format. The subset used by DongLoRa:
| `sf` | `u8` | varint | 5 – 12 | Spreading factor |
| `cr` | `u8` | varint | 5 – 8 | Coding rate denominator (5 = CR 4/5) |
| `sync_word` | `u16` | varint | any | LoRa sync word (e.g. `0x3444`) |
| `tx_power_dbm` | `i8` | zigzag varint | -9 – +22 | TX power in dBm |
| `tx_power_dbm` | `i8` | raw signed byte | board-dependent | TX power in dBm. `-128` = max power for this board. |
## Bandwidth