diff --git a/Software/src/devboard/safety/safety.cpp b/Software/src/devboard/safety/safety.cpp index 13dfaaa8..e9a592a2 100644 --- a/Software/src/devboard/safety/safety.cpp +++ b/Software/src/devboard/safety/safety.cpp @@ -220,6 +220,9 @@ void setBatteryPause(bool pause_battery, bool pause_CAN) { emulator_pause_status = RESUMING; clear_event(EVENT_PAUSE_END); } + + //immediate check if we can send CAN messages + emulator_pause_state_send_CAN_battery(); } /// @brief handle emulator pause status diff --git a/Software/src/lib/ayushsharma82-ElegantOTA/src/ElegantOTA.cpp b/Software/src/lib/ayushsharma82-ElegantOTA/src/ElegantOTA.cpp index a414f349..ec1b2a37 100644 --- a/Software/src/lib/ayushsharma82-ElegantOTA/src/ElegantOTA.cpp +++ b/Software/src/lib/ayushsharma82-ElegantOTA/src/ElegantOTA.cpp @@ -45,12 +45,6 @@ void ElegantOTAClass::begin(ELEGANTOTA_WEBSERVER *server, const char * username, // Pre-OTA update callback if (preUpdateCallback != NULL) preUpdateCallback(); - - // Sleep for 3 seconds to allow asynchronous preUpdateCallback tasks to complete - unsigned long sleepStart = millis(); - while (millis() - sleepStart < 3000) { // Sleep for 3 second - delay(1); // Yield to other tasks - } // Get header x-ota-mode value, if present OTA_Mode mode = OTA_MODE_FIRMWARE;