mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Remove crashing code section
This commit is contained in:
parent
c55e0c5549
commit
4706765b9a
2 changed files with 1 additions and 28 deletions
|
@ -291,9 +291,6 @@ void core_loop(void* task_time_us) {
|
|||
datalayer.system.status.mqtt_task_10s_max_us = 0;
|
||||
}
|
||||
#endif // FUNCTION_TIME_MEASUREMENT
|
||||
#ifdef DEBUG_LOG
|
||||
logging.log_bms_status(datalayer.battery.status.real_bms_status);
|
||||
#endif
|
||||
esp_task_wdt_reset(); // Reset watchdog to prevent reset
|
||||
vTaskDelayUntil(&xLastWakeTime, xFrequency);
|
||||
}
|
||||
|
|
|
@ -134,27 +134,3 @@ void Logging::printf(const char* fmt, ...) {
|
|||
previous_message_was_newline = message_buffer[size - 1] == '\n';
|
||||
#endif // DEBUG_LOG
|
||||
}
|
||||
|
||||
void Logging::log_bms_status(real_bms_status_enum bms_status) {
|
||||
static real_bms_status_enum previous_state = BMS_FAULT;
|
||||
if (previous_state != bms_status) {
|
||||
switch (bms_status) {
|
||||
case BMS_ACTIVE:
|
||||
logging.printf("Battery%s BMS state changed to: OK\n");
|
||||
break;
|
||||
case BMS_DISCONNECTED:
|
||||
logging.printf("Battery%s BMS state changed to: DISCONNECTED\n");
|
||||
break;
|
||||
case BMS_FAULT:
|
||||
logging.printf("Battery%s BMS state changed to: FAULT\n");
|
||||
break;
|
||||
case BMS_STANDBY:
|
||||
logging.printf("Battery%s BMS state changed to: STANDBY\n");
|
||||
break;
|
||||
default:
|
||||
logging.printf("Battery%s BMS state changed to: ??\n");
|
||||
break;
|
||||
}
|
||||
previous_state = bms_status;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue