Fixed can fix

This commit is contained in:
CommanderRedYT
2022-03-24 20:51:29 +01:00
parent 5f23b8dec5
commit 37961639d1

View File

@ -280,7 +280,7 @@ void sendCanCommands()
const auto status = twai_get_status_info(&status_info);
const auto timestamp_after = espchrono::millis_clock::now();
if ((result == ESP_ERR_TIMEOUT || status == TWAI_STATE_BUS_OFF) || (status == ESP_OK && status_info.bus_error_count > can_sequential_bus_errors))
if ((result == ESP_ERR_TIMEOUT || status_info.state == TWAI_STATE_BUS_OFF) || (status == ESP_OK && status_info.bus_error_count > can_sequential_bus_errors))
{
++can_sequential_error_cnt;
++can_total_error_cnt;