From 3061860dabaf598640d0229793c19cec72dcd9f7 Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Sun, 18 Oct 2020 18:30:19 -0700 Subject: [PATCH] Update sleep timer for the CPU clock --- src/meshwifi/meshhttp.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/meshwifi/meshhttp.cpp b/src/meshwifi/meshhttp.cpp index 1d6c7cead..a63a5d8e5 100644 --- a/src/meshwifi/meshhttp.cpp +++ b/src/meshwifi/meshhttp.cpp @@ -2,7 +2,7 @@ #include "NodeDB.h" #include "configuration.h" #include "main.h" -#include "meshhttpStatic.h" +#include "meshHttpStatic.h" #include "meshwifi/meshwifi.h" #include "sleep.h" #include @@ -79,9 +79,11 @@ void handleWebResponse() insecureServer->loop(); } - // Slow down the CPU if we have not received a request within the last - // 2 minutes. - if (millis() - timeSpeedUp >= (2 * 60 * 1000)) { + /* + Slow down the CPU if we have not received a request within the last few + seconds. + */ + if (millis() - timeSpeedUp >= (25 * 1000)) { setCpuFrequencyMhz(80); timeSpeedUp = millis(); }