Stop CAN at OTA-start

This commit is contained in:
Cabooman 2024-01-07 22:58:11 +01:00
parent da47e843ea
commit db7c76f6a0
2 changed files with 2 additions and 0 deletions

View file

@ -316,6 +316,7 @@ String processor(const String& var) {
void onOTAStart() { void onOTAStart() {
// Log when OTA has started // Log when OTA has started
Serial.println("OTA update started!"); Serial.println("OTA update started!");
ESP32Can.CANStop();
bms_status = 5; //Inform inverter that we are updating bms_status = 5; //Inform inverter that we are updating
LEDcolor = BLUE; LEDcolor = BLUE;
} }

View file

@ -8,6 +8,7 @@
#include "../../lib/me-no-dev-AsyncTCP/src/AsyncTCP.h" #include "../../lib/me-no-dev-AsyncTCP/src/AsyncTCP.h"
#include "../../lib/me-no-dev-ESPAsyncWebServer/src/ESPAsyncWebServer.h" #include "../../lib/me-no-dev-ESPAsyncWebServer/src/ESPAsyncWebServer.h"
#include "../config.h" // Needed for LED defines #include "../config.h" // Needed for LED defines
#include "../../lib/miwagner-ESP32-Arduino-CAN/ESP32CAN.h"
extern uint16_t SOC; //SOC%, 0-100.00 (0-10000) extern uint16_t SOC; //SOC%, 0-100.00 (0-10000)
extern uint16_t StateOfHealth; //SOH%, 0-100.00 (0-10000) extern uint16_t StateOfHealth; //SOH%, 0-100.00 (0-10000)