mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
intermediate: prepare for dynamic boat data
This commit is contained in:
@@ -10,6 +10,16 @@ GwBoatData::~GwBoatData(){
|
||||
}
|
||||
}
|
||||
|
||||
template<class T> GwBoatItem<T> *GwBoatData::getOrCreate(T dummy, String name, String format,
|
||||
unsigned long invalidTime)
|
||||
{
|
||||
for (auto it=values.begin();it != values.end();it++){
|
||||
if ((*it)->getName() == name){
|
||||
return *it;
|
||||
}
|
||||
}
|
||||
return new GwBoatItem<T>(name,format,invalidTime,&values);
|
||||
}
|
||||
String GwBoatData::toJson() const {
|
||||
unsigned long minTime=millis();
|
||||
GwBoatItemBase::GwBoatItemMap::const_iterator it;
|
||||
|
||||
Reference in New Issue
Block a user