From 15c1291f908a625d38745e2e343e4e76d902384b Mon Sep 17 00:00:00 2001 From: Ole Date: Tue, 9 Apr 2024 22:13:57 +0200 Subject: [PATCH] Removed changes from webserver and fix MAX_CAN_FAILURES --- Software/src/battery/BMW-I3-BATTERY.cpp | 1 - Software/src/devboard/webserver/webserver.cpp | 6 ------ Software/src/devboard/webserver/webserver.h | 7 ------- 3 files changed, 14 deletions(-) diff --git a/Software/src/battery/BMW-I3-BATTERY.cpp b/Software/src/battery/BMW-I3-BATTERY.cpp index bca7f74e..241303c8 100644 --- a/Software/src/battery/BMW-I3-BATTERY.cpp +++ b/Software/src/battery/BMW-I3-BATTERY.cpp @@ -16,7 +16,6 @@ static unsigned long previousMillis5000 = 0; // will store last time a 5000ms static unsigned long previousMillis10000 = 0; // will store last time a 10000ms CAN Message was send static uint8_t CANstillAlive = 12; // counter for checking if CAN is still alive static uint16_t CANerror = 0; // counter on how many CAN errors encountered -#define MAX_CAN_FAILURES 500 // Amount of malformed CAN messages to allow before raising a warning #define ALIVE_MAX_VALUE 14 // BMW CAN messages contain alive counter, goes from 0...14 static const uint16_t WUPonDuration = 477; // in milliseconds how long WUP should be ON after poweron diff --git a/Software/src/devboard/webserver/webserver.cpp b/Software/src/devboard/webserver/webserver.cpp index f87257e8..46dc114f 100644 --- a/Software/src/devboard/webserver/webserver.cpp +++ b/Software/src/devboard/webserver/webserver.cpp @@ -529,12 +529,6 @@ String processor(const String& var) { } else { // > 0 content += "

Battery charging!

"; } -#ifdef BMW_I3_BATTERY - content += "

Battery Capacity cAh: " + String(battery_capacity_cah / 100.0, 2) + " Ah

"; - content += "

Battery SOC: " + String(battery_soc / 10.0, 1) + "%%

"; - content += "

Battery SOC hvMax: " + String(battery_soc_hvmax / 10.0, 1) + "%%

"; - content += "

Battery SOC hvMin: " + String(battery_soc_hvmin / 10.0, 1) + "%%

"; -#endif content += "

Automatic contactor closing allowed:

"; content += "

Battery: "; diff --git a/Software/src/devboard/webserver/webserver.h b/Software/src/devboard/webserver/webserver.h index eb2a8e76..527223ef 100644 --- a/Software/src/devboard/webserver/webserver.h +++ b/Software/src/devboard/webserver/webserver.h @@ -40,13 +40,6 @@ extern uint8_t LEDcolor; //Enum, 0-10 extern bool batteryAllowsContactorClosing; //Bool, 1=true, 0=false extern bool inverterAllowsContactorClosing; //Bool, 1=true, 0=false -#ifdef BMW_I3_BATTERY -extern uint16_t battery_soc; -extern uint16_t battery_soc_hvmax; -extern uint16_t battery_soc_hvmin; -extern uint16_t battery_capacity_cah; -#endif - extern const char* ssid; extern const char* password; extern const uint8_t wifi_channel;