From a3957d051456f452d8f160b1a1e54a4e1b959745 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Tue, 4 Jan 2022 21:16:06 +0100 Subject: [PATCH] Commented out heap debug code; Added saving boot-battery-wh --- main/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/main.cpp b/main/main.cpp index 6953535..6dd1e40 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -94,6 +94,9 @@ extern "C" void app_main() { const auto now = espchrono::millis_clock::now(); +// if (!heap_caps_check_integrity_all(true)) +// ESP_LOGW(TAG, "OIS IM OARSCH!!!!!"); + for (auto &schedulerTask : schedulerTasks) { schedulerTask.loop(); @@ -124,7 +127,10 @@ extern "C" void app_main() } avgVoltage = avgVoltage / controllers.size(); if (avgVoltage > 30) + { battery::bootBatPercentage = getBatteryPercentage(avgVoltage, BatteryCellType(configs.battery.cellType.value)); + battery::bootBatWh = getRemainingWattHours(); + } } } }