1
0
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:
andreas
2024-10-13 16:09:17 +02:00
parent 98a95e62f7
commit e982389c75
3 changed files with 10 additions and 12 deletions

View File

@@ -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;