remove cpu frequency changes

they disconnect wifi clients in AP mode
This commit is contained in:
Gabriel Augendre 2023-03-20 10:38:52 +01:00
parent 819f3e3625
commit 2d37812553

View file

@ -37,8 +37,6 @@ void setup()
displayWifiCreds(); displayWifiCreds();
displayStatus(); displayStatus();
setCpuFrequencyMhz(80);
// Setup is done, light up the LED // Setup is done, light up the LED
delay(500); delay(500);
Serial.println("All setup & ready to go!"); Serial.println("All setup & ready to go!");
@ -57,13 +55,11 @@ void loop()
if (running && !wasRunning) if (running && !wasRunning)
{ {
wasRunning = true; wasRunning = true;
setCpuFrequencyMhz(240);
} }
else if (!running && wasRunning) else if (!running && wasRunning)
{ {
wasRunning = false; wasRunning = false;
updateLastAction(); updateLastAction();
setCpuFrequencyMhz(80);
} }
if (!running && ((millis() - lastActionTime) > DEEP_SLEEP_DELAY_MS)) if (!running && ((millis() - lastActionTime) > DEEP_SLEEP_DELAY_MS))