1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-13 05:53:06 +01:00

better display for bus off condition

This commit is contained in:
andreas
2023-08-26 11:06:11 +02:00
parent 28431bfdcf
commit b7a7dad290
3 changed files with 16 additions and 2 deletions

View File

@@ -157,6 +157,7 @@ Nmea2kTwai::Status Nmea2kTwai::logStatus(){
}
bool Nmea2kTwai::startRecovery(){
lastRecoveryStart=millis();
esp_err_t rt=twai_driver_uninstall();
if (rt != ESP_OK){
logDebug(LOG_ERR,"twai: deinit for recovery failed with %x",(int)rt);

View File

@@ -25,6 +25,7 @@ class Nmea2kTwai : public tNMEA2000{
STATE state=ST_ERROR;
} Status;
Status getStatus();
unsigned long getLastRecoveryStart(){return lastRecoveryStart;}
void loop();
static const char * stateStr(const STATE &st);
virtual bool CANOpen();
@@ -54,6 +55,7 @@ class Nmea2kTwai : public tNMEA2000{
gpio_num_t RxPin;
uint32_t txTimeouts=0;
GwIntervalRunner timers;
unsigned long lastRecoveryStart=0;
};
#endif