Let both batteries transmit CAN

This commit is contained in:
Jaakko Haakana 2025-05-06 08:51:58 +03:00
parent 6a1f3ccfa4
commit a790b718a4

View file

@ -39,8 +39,16 @@ void update_values_battery() {
battery->update_values(); battery->update_values();
} }
// transmit_can_battery is called once and we need to
// call both batteries.
void transmit_can_battery(unsigned long currentMillis) { void transmit_can_battery(unsigned long currentMillis) {
battery->transmit_can(currentMillis); battery->transmit_can(currentMillis);
#ifdef DOUBLE_BATTERY
if (battery2) {
battery2->transmit_can(currentMillis);
}
#endif
} }
void handle_incoming_can_frame_battery(CAN_frame rx_frame) { void handle_incoming_can_frame_battery(CAN_frame rx_frame) {