mirror of
https://github.com/agessaman/MeshCore.git
synced 2026-11-25 21:59:37 +00:00
Adds `set/get wifi.txpower default|2..20` so the WiFi TX power cap can be changed per node without a rebuild. - Stored as whole dBm in MQTTPrefs (/mqtt.json wifi.tx_power). 0 means the build's MQTT_WIFI_TX_POWER, so saving prefs never pins today's default and a later build can still move a board's default. Files without the key load as board default; out-of-range values are repaired to it. - WifiTxPowerPolicy holds parsing, the build-default clamp to the SDK's [8, 84] quarter-dBm range, and formatting. No quantization table: replies report esp_wifi_get_max_tx_power() readback, since rounding is per chip. - Applied via esp_wifi_set_max_tx_power() right after WiFi.mode(WIFI_STA) (so association is capped), after every association, immediately from the CLI, and when the setup AP starts and tears down back to STA. - WebConfig: TX power selector with the radio's reported value; config JSON gains wifi.txpower and wifi.txpower_applied; key allowlisted; mock server and CLI audit updated. - Host tests for the policy and for serializer round-trip/repair.