From a0e468b16e0ed58b4adc0b1aa146cb83a9258c3f Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Sat, 26 Oct 2024 20:04:46 +1000 Subject: [PATCH] Remove unused AXP debug code (#5149) This was shuffled around a couple years ago, but hasn't been used since, and we had two copies in the code. Delete it. --- src/detect/axpDebug.h | 19 ------------------- src/main.cpp | 3 +-- src/platform/esp32/main-esp32.cpp | 22 +--------------------- 3 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 src/detect/axpDebug.h diff --git a/src/detect/axpDebug.h b/src/detect/axpDebug.h deleted file mode 100644 index fd75745f2..000000000 --- a/src/detect/axpDebug.h +++ /dev/null @@ -1,19 +0,0 @@ -#if 0 -// Turn off for now -uint32_t axpDebugRead() -{ - axp.debugCharging(); - LOG_DEBUG("vbus current %f", axp.getVbusCurrent()); - LOG_DEBUG("charge current %f", axp.getBattChargeCurrent()); - LOG_DEBUG("bat voltage %f", axp.getBattVoltage()); - LOG_DEBUG("batt pct %d", axp.getBattPercentage()); - LOG_DEBUG("is battery connected %d", axp.isBatteryConnect()); - LOG_DEBUG("is USB connected %d", axp.isVBUSPlug()); - LOG_DEBUG("is charging %d", axp.isChargeing()); - - return 30 * 1000; -} - -Periodic axpDebugOutput(axpDebugRead); -axpDebugOutput.setup(); -#endif \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 3c1406a65..e71d1df5f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,7 +27,6 @@ #include "detect/ScanI2CTwoWire.h" #include #endif -#include "detect/axpDebug.h" #include "detect/einkScan.h" #include "graphics/RAKled.h" #include "graphics/Screen.h" @@ -1190,4 +1189,4 @@ void loop() mainDelay.delay(delayMsec); } } -#endif +#endif \ No newline at end of file diff --git a/src/platform/esp32/main-esp32.cpp b/src/platform/esp32/main-esp32.cpp index 033801d77..7b3493f95 100644 --- a/src/platform/esp32/main-esp32.cpp +++ b/src/platform/esp32/main-esp32.cpp @@ -166,26 +166,6 @@ void esp32Setup() #endif } -#if 0 -// Turn off for now - -uint32_t axpDebugRead() -{ - axp.debugCharging(); - LOG_DEBUG("vbus current %f", axp.getVbusCurrent()); - LOG_DEBUG("charge current %f", axp.getBattChargeCurrent()); - LOG_DEBUG("bat voltage %f", axp.getBattVoltage()); - LOG_DEBUG("batt pct %d", axp.getBattPercentage()); - LOG_DEBUG("is battery connected %d", axp.isBatteryConnect()); - LOG_DEBUG("is USB connected %d", axp.isVBUSPlug()); - LOG_DEBUG("is charging %d", axp.isChargeing()); - - return 30 * 1000; -} - -Periodic axpDebugOutput(axpDebugRead); -#endif - /// loop code specific to ESP32 targets void esp32Loop() { @@ -263,4 +243,4 @@ void cpuDeepSleep(uint32_t msecToWake) esp_sleep_enable_timer_wakeup(msecToWake * 1000ULL); // call expects usecs esp_deep_sleep_start(); // TBD mA sleep current (battery) -} \ No newline at end of file +}