mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 10:49:42 +02:00
Add ifdef
This commit is contained in:
parent
1d8fc7f0c9
commit
e9f004c47b
1 changed files with 2 additions and 0 deletions
|
@ -123,8 +123,10 @@ void update_values_can_solax() { //This function maps all the values fetched fr
|
||||||
if (millis() - LastFrameTime >= SolaxTimeout) {
|
if (millis() - LastFrameTime >= SolaxTimeout) {
|
||||||
inverterAllowsContactorClosing = false;
|
inverterAllowsContactorClosing = false;
|
||||||
STATE = BATTERY_ANNOUNCE;
|
STATE = BATTERY_ANNOUNCE;
|
||||||
|
#ifndef DUAL_CAN
|
||||||
ESP32Can.CANStop(); // Baud rate switching might have taken down the interface. Reboot it!
|
ESP32Can.CANStop(); // Baud rate switching might have taken down the interface. Reboot it!
|
||||||
ESP32Can.CANInit(); // TODO: Incase this gets implemented in ESP32Can.cpp, remove these two lines!
|
ESP32Can.CANInit(); // TODO: Incase this gets implemented in ESP32Can.cpp, remove these two lines!
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
//Calculate the required values
|
//Calculate the required values
|
||||||
temperature_average = ((system_temperature_max_dC + system_temperature_min_dC) / 2);
|
temperature_average = ((system_temperature_max_dC + system_temperature_min_dC) / 2);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue