Use the correct CAN interface when Zoe sends in double battery setup

This commit is contained in:
Jaakko Haakana 2025-06-30 23:06:42 +03:00
parent a7007e9c63
commit f40eb9e9a3

View file

@ -166,7 +166,7 @@ void RenaultZoeGen1Battery::handle_incoming_can_frame(CAN_frame rx_frame) {
switch (frame0) {
case 0x10: //PID HEADER, datarow 0
requested_poll = rx_frame.data.u8[3];
transmit_can_frame(&ZOE_ACK_79B, can_config.battery);
transmit_can_frame(&ZOE_ACK_79B, can_interface);
if (requested_poll == GROUP1_CELLVOLTAGES_1_POLL) {
cellvoltages[0] = (rx_frame.data.u8[4] << 8) | rx_frame.data.u8[5];
@ -469,7 +469,7 @@ void RenaultZoeGen1Battery::transmit_can(unsigned long currentMillis) {
// Send 100ms CAN Message
if (currentMillis - previousMillis100 >= INTERVAL_100_MS) {
previousMillis100 = currentMillis;
transmit_can_frame(&ZOE_423, can_config.battery);
transmit_can_frame(&ZOE_423, can_interface);
if ((counter_423 / 5) % 2 == 0) { // Alternate every 5 messages between these two
ZOE_423.data.u8[4] = 0xB2;
@ -508,7 +508,7 @@ void RenaultZoeGen1Battery::transmit_can(unsigned long currentMillis) {
ZOE_POLL_79B.data.u8[2] = current_poll;
transmit_can_frame(&ZOE_POLL_79B, can_config.battery);
transmit_can_frame(&ZOE_POLL_79B, can_interface);
}
}