mirror of
https://github.com/agessaman/MeshCore.git
synced 2026-11-27 08:38:04 +00:00
Follow-up to wifi.txpower from review:
- Re-apply the cap from the WiFi event task on STA_CONNECTED and GOT_IP.
maintain() samples every 10 s, so a quick auto-reconnect was invisible
to it, and association may reset the cap; it also left WiFi uncapped
when the MQTT bridge is off.
- Serialize store + apply under a mutex so a delayed apply from one task
cannot restore an older value set from another.
- Report a failed esp_wifi_set_max_tx_power() instead of passing the old
readback off as the new cap ("OK - saved as X, but failed to apply").
- Start the radio as an unassociated STA and apply the cap before raising
the setup AP and the OTA AP, so neither beacons at the SDK default. The
OTA AP turns WiFi back off on release if it was the one that started it.
- Mock server: report "not applied yet (WiFi off)" like the firmware.