mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Change default state of bms_Status to INACTIVE and only switch to ACTIVE upon reception of SOC from battery.
- Change default state of bms_Status to INACTIVE - switch to ACTIVE upon reception of SOC from battery. - Do not change bms_mode to ACTIVE upon reception of info/warning/debug event. - Reset bms_mode to INACTIVE and CAN_battery_still_alive when resetting all events
This commit is contained in:
parent
dccfca17ea
commit
f6c73e9481
26 changed files with 61 additions and 2 deletions
|
@ -255,6 +255,9 @@ void reset_all_events() {
|
|||
events.entries[i].MQTTpublished = false; // Not published by default
|
||||
}
|
||||
events.level = EVENT_LEVEL_INFO;
|
||||
|
||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||
datalayer.battery.status.bms_status = INACTIVE;
|
||||
update_bms_status();
|
||||
}
|
||||
|
||||
|
@ -495,7 +498,6 @@ static void update_bms_status(void) {
|
|||
case EVENT_LEVEL_INFO:
|
||||
case EVENT_LEVEL_WARNING:
|
||||
case EVENT_LEVEL_DEBUG:
|
||||
datalayer.battery.status.bms_status = ACTIVE;
|
||||
break;
|
||||
case EVENT_LEVEL_UPDATE:
|
||||
datalayer.battery.status.bms_status = UPDATING;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue