diff --git a/src/main.cpp b/src/main.cpp index 01fccf2b0..df4b622f1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,9 +11,6 @@ #include "airtime.h" #include "buzz.h" -#include "error.h" -#include "power.h" -// #include "debug.h" #include "FSCommon.h" #include "Led.h" #include "RTC.h" @@ -22,6 +19,8 @@ #include "concurrency/OSThread.h" #include "concurrency/Periodic.h" #include "detect/ScanI2C.h" +#include "error.h" +#include "power.h" #if !MESHTASTIC_EXCLUDE_I2C #include "detect/ScanI2CTwoWire.h" @@ -39,7 +38,6 @@ #include "target_specific.h" #include #include -// #include #ifdef ARCH_ESP32 #if !MESHTASTIC_EXCLUDE_WEBSERVER @@ -1106,10 +1104,6 @@ void loop() { runASAP = false; - // axpDebugOutput.loop(); - - // heap_caps_check_integrity_all(true); // FIXME - disable this expensive check - #ifdef ARCH_ESP32 esp32Loop(); #endif @@ -1118,9 +1112,6 @@ void loop() #endif powerCommandsCheck(); - // For debugging - // if (rIf) ((RadioLibInterface *)rIf)->isActivelyReceiving(); - #ifdef DEBUG_STACK static uint32_t lastPrint = 0; if (!Throttle::isWithinTimespanMs(lastPrint, 10 * 1000L)) { @@ -1129,22 +1120,13 @@ void loop() } #endif - // TODO: This should go into a thread handled by FreeRTOS. - // handleWebResponse(); - service->loop(); long delayMsec = mainController.runOrDelay(); - /* if (mainController.nextThread && delayMsec) - LOG_DEBUG("Next %s in %ld\n", mainController.nextThread->ThreadName.c_str(), - mainController.nextThread->tillRun(millis())); */ - // We want to sleep as long as possible here - because it saves power if (!runASAP && loopCanSleep()) { - // if(delayMsec > 100) LOG_DEBUG("sleeping %ld\n", delayMsec); mainDelay.delay(delayMsec); } - // if (didWake) LOG_DEBUG("wake!\n"); } #endif \ No newline at end of file