From f77401a26f353abf2c51c5828d6296a2974addd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C3=96ster?= Date: Thu, 17 Jul 2025 23:59:39 +0300 Subject: [PATCH] Handle WUP pin better for reboots --- Software/src/battery/BMW-I3-BATTERY.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Software/src/battery/BMW-I3-BATTERY.cpp b/Software/src/battery/BMW-I3-BATTERY.cpp index 291ac86f..0ff906a7 100644 --- a/Software/src/battery/BMW-I3-BATTERY.cpp +++ b/Software/src/battery/BMW-I3-BATTERY.cpp @@ -44,7 +44,7 @@ uint8_t BmwI3Battery::increment_alive_counter(uint8_t counter) { void BmwI3Battery::update_values() { //This function maps all the values fetched via CAN to the battery datalayer if (datalayer.system.settings.equipment_stop_active == true) { digitalWrite(wakeup_pin, LOW); // Turn off wakeup pin - } else { + } else if (millis() > INTERVAL_1_S) { digitalWrite(wakeup_pin, HIGH); // Wake up the battery } @@ -507,5 +507,5 @@ void BmwI3Battery::setup(void) { // Performs one time setup at startup datalayer_battery->info.number_of_cells = NUMBER_OF_CELLS; pinMode(wakeup_pin, OUTPUT); - digitalWrite(wakeup_pin, HIGH); // Wake up the battery + digitalWrite(wakeup_pin, LOW); // Set pin to low, prepare to wakeup later on! }