1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2026-03-28 18:06:37 +01:00

First step for N2K devicelist

This commit is contained in:
2026-01-08 18:42:48 +01:00
parent a8cf34343f
commit b2e67880d3
2 changed files with 8 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ static const int TIMEOUT_OFFLINE=256; //# of timeouts to consider offline
Nmea2kTwai::Nmea2kTwai(gpio_num_t _TxPin, gpio_num_t _RxPin, unsigned long recP, unsigned long logP):
tNMEA2000(),RxPin(_RxPin),TxPin(_TxPin)
{
pN2kDeviceList = new tN2kDeviceList(this);
if (RxPin < 0 || TxPin < 0){
disabled=true;
}
@@ -161,6 +162,8 @@ bool Nmea2kTwai::checkRecovery(){
return strt;
}
void Nmea2kTwai::loop(){
if (disabled) return;
timers.loop();
@@ -201,4 +204,4 @@ const char * Nmea2kTwai::stateStr(const Nmea2kTwai::STATE &st){
case ST_DISABLED: return "DISABLED";
}
return "ERROR";
}
}