Files
MeshCore-mqtt-observer/scripts
agessaman 405a7d52f4 fix(wifi): keep the TX power cap in effect across reconnects and APs
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.
2026-10-22 16:19:26 -07:00
..