turn off wifi nosleep

This commit is contained in:
proddy
2024-09-05 23:35:04 +02:00
parent 316c1d0912
commit 42572977d4
2 changed files with 10 additions and 3 deletions

View File

@@ -1226,6 +1226,12 @@ bool System::check_upgrade(bool factory_settings) {
});
}
// force WiFi sleep to off (was default on < 3.7.0-dev-33)
EMSESP::esp8266React.getNetworkSettingsService()->update([&](NetworkSettings & networkSettings) {
networkSettings.nosleep = true;
return StateUpdateResult::CHANGED;
});
// Network Settings Wifi tx_power is now using the value * 4.
EMSESP::esp8266React.getNetworkSettingsService()->update([&](NetworkSettings & networkSettings) {
if (networkSettings.tx_power == 20) {