diff --git a/Software/Software.ino b/Software/Software.ino index e0a918aa..44b552ca 100644 --- a/Software/Software.ino +++ b/Software/Software.ino @@ -913,7 +913,7 @@ void transmit_can(CAN_frame_t* tx_frame, int interface) { set_event(EVENT_INTERFACE_MISSING, interface); #endif //DUAL_CAN } break; - case CAN_ADDON_FD_MCP2518: + case CAN_ADDON_FD_MCP2518: { #ifdef CAN_FD CANFDMessage MCP2518Frame; MCP2518Frame.id = tx_frame->MsgID; @@ -926,7 +926,7 @@ void transmit_can(CAN_frame_t* tx_frame, int interface) { #else // Interface not compiled, and settings try to use it set_event(EVENT_INTERFACE_MISSING, interface); #endif //CAN_FD - break; + } break; default: // Invalid interface sent with function call. TODO: Raise event that coders messed up break; diff --git a/Software/USER_SETTINGS.cpp b/Software/USER_SETTINGS.cpp index 0171c248..3bf88616 100644 --- a/Software/USER_SETTINGS.cpp +++ b/Software/USER_SETTINGS.cpp @@ -12,7 +12,7 @@ CAN_ADDON_FD_MCP2518 = Add-on CAN-FD MCP2518 connected to GPIO pins */ volatile CAN_Configuration can_config = { - .battery = CAN_NATIVE, // Which CAN is your battery connected to? + .battery = CAN_ADDON_FD_MCP2518, // Which CAN is your battery connected to? .inverter = CAN_NATIVE, // Which CAN is your inverter connected to? (No need to configure incase you use RS485) .battery_double = CAN_ADDON_MCP2515, // (OPTIONAL) Which CAN is your second battery connected to? .charger = CAN_NATIVE // (OPTIONAL) Which CAN is your charger connected to? diff --git a/Software/USER_SETTINGS.h b/Software/USER_SETTINGS.h index 3f594a5a..9c7db26d 100644 --- a/Software/USER_SETTINGS.h +++ b/Software/USER_SETTINGS.h @@ -14,7 +14,7 @@ //#define IMIEV_CZERO_ION_BATTERY //#define JAGUAR_IPACE_BATTERY //#define KIA_HYUNDAI_64_BATTERY -//#define KIA_E_GMP_BATTERY +#define KIA_E_GMP_BATTERY //#define KIA_HYUNDAI_HYBRID_BATTERY //#define MG_5_BATTERY //#define NISSAN_LEAF_BATTERY @@ -49,7 +49,7 @@ //#define CONTACTOR_CONTROL //Enable this line to have pins 25,32,33 handle automatic precharge/contactor+/contactor- closing sequence //#define PWM_CONTACTOR_CONTROL //Enable this line to use PWM logic for contactors, which lower power consumption and heat generation //#define DUAL_CAN //Enable this line to activate an isolated secondary CAN Bus using add-on MCP2515 controller (Needed for some inverters / double battery) -//#define CAN_FD //Enable this line to activate an isolated secondary CAN-FD bus using add-on MCP2517FD controller (Needed for some batteries) +#define CAN_FD //Enable this line to activate an isolated secondary CAN-FD bus using add-on MCP2517FD controller (Needed for some batteries) //#define SERIAL_LINK_RECEIVER //Enable this line to receive battery data over RS485 pins from another Lilygo (This LilyGo interfaces with inverter) //#define SERIAL_LINK_TRANSMITTER //Enable this line to send battery data over RS485 pins to another Lilygo (This LilyGo interfaces with battery) #define WEBSERVER //Enable this line to enable WiFi, and to run the webserver. See USER_SETTINGS.cpp for the Wifi settings. diff --git a/Software/src/devboard/webserver/settings_html.cpp b/Software/src/devboard/webserver/settings_html.cpp index 00e1feed..b70fa454 100644 --- a/Software/src/devboard/webserver/settings_html.cpp +++ b/Software/src/devboard/webserver/settings_html.cpp @@ -25,9 +25,6 @@ String settings_processor(const String& var) { #ifdef DOUBLE_BATTERY content += "

Battery #2 interface: " + String(getCANInterfaceName(can_config.battery_double)) + "

"; -#else - content += "

Battery #2 interface: " + - String(getCANInterfaceName(can_config.battery_double)) + "

"; #endif // DOUBLE_BATTERY #ifdef CAN_INVERTER_SELECTED