mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
CAN-FD testing
This commit is contained in:
parent
7bba6237c2
commit
e92f35e50b
4 changed files with 5 additions and 8 deletions
|
@ -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;
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -25,9 +25,6 @@ String settings_processor(const String& var) {
|
|||
#ifdef DOUBLE_BATTERY
|
||||
content += "<h4 style='color: white;'>Battery #2 interface: <span id='Battery'>" +
|
||||
String(getCANInterfaceName(can_config.battery_double)) + "</span></h4>";
|
||||
#else
|
||||
content += "<h4 style='color: gray;'>Battery #2 interface: <span id='Battery'>" +
|
||||
String(getCANInterfaceName(can_config.battery_double)) + "</span></h4>";
|
||||
#endif // DOUBLE_BATTERY
|
||||
|
||||
#ifdef CAN_INVERTER_SELECTED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue