mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-27 10:21:40 +00:00
Update sleep timer for the CPU clock
This commit is contained in:
parent
2450d98b59
commit
3061860dab
@ -2,7 +2,7 @@
|
|||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "meshhttpStatic.h"
|
#include "meshHttpStatic.h"
|
||||||
#include "meshwifi/meshwifi.h"
|
#include "meshwifi/meshwifi.h"
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
#include <WebServer.h>
|
#include <WebServer.h>
|
||||||
@ -79,9 +79,11 @@ void handleWebResponse()
|
|||||||
insecureServer->loop();
|
insecureServer->loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Slow down the CPU if we have not received a request within the last
|
/*
|
||||||
// 2 minutes.
|
Slow down the CPU if we have not received a request within the last few
|
||||||
if (millis() - timeSpeedUp >= (2 * 60 * 1000)) {
|
seconds.
|
||||||
|
*/
|
||||||
|
if (millis() - timeSpeedUp >= (25 * 1000)) {
|
||||||
setCpuFrequencyMhz(80);
|
setCpuFrequencyMhz(80);
|
||||||
timeSpeedUp = millis();
|
timeSpeedUp = millis();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user