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:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user