mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 02:09:30 +02:00
Initial hal changes
This commit is contained in:
parent
d6cbd1bcdd
commit
12b402f994
77 changed files with 924 additions and 672 deletions
|
@ -246,13 +246,13 @@ static bool publish_common_info(void) {
|
|||
doc["pause_status"] = get_emulator_pause_status();
|
||||
|
||||
//only publish these values if BMS is active and we are comunication with the battery (can send CAN messages to the battery)
|
||||
if (datalayer.battery.status.CAN_battery_still_alive && allowed_to_send_CAN && millis() > BOOTUP_TIME) {
|
||||
if (datalayer.battery.status.CAN_battery_still_alive && allowed_to_send_CAN && esp32hal->system_booted_up()) {
|
||||
set_battery_attributes(doc, datalayer.battery, "", battery->supports_charged_energy());
|
||||
}
|
||||
|
||||
if (battery2) {
|
||||
//only publish these values if BMS is active and we are comunication with the battery (can send CAN messages to the battery)
|
||||
if (datalayer.battery2.status.CAN_battery_still_alive && allowed_to_send_CAN && millis() > BOOTUP_TIME) {
|
||||
if (datalayer.battery2.status.CAN_battery_still_alive && allowed_to_send_CAN && esp32hal->system_booted_up()) {
|
||||
set_battery_attributes(doc, datalayer.battery2, "_2", battery2->supports_charged_energy());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue