mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
correctly handle data timeouts, always set source if for updates
This commit is contained in:
@@ -47,7 +47,6 @@ GwBoatItemBase::GwBoatItemBase(String name, String format, GwBoatItemBase::TOTyp
|
||||
this->format = format;
|
||||
this->type = 0;
|
||||
this->lastUpdateSource = -1;
|
||||
this->toType=TOType::user;
|
||||
}
|
||||
void GwBoatItemBase::setInvalidTime(unsigned long it, bool force){
|
||||
if (toType != TOType::user || force ){
|
||||
@@ -375,7 +374,7 @@ GwBoatItem<T> *GwBoatData::getOrCreate(T initial, GwBoatItemNameProvider *provid
|
||||
provider->getBoatItemFormat(),
|
||||
provider->getInvalidTime(),
|
||||
&values);
|
||||
rt->update(initial);
|
||||
rt->update(initial,-1);
|
||||
LOG_DEBUG(GwLog::LOG, "creating boatItem %s, type %d",
|
||||
name.c_str(), rt->getCurrentType());
|
||||
return rt;
|
||||
|
||||
Reference in New Issue
Block a user