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

@@ -105,8 +105,8 @@ template<class T> class GwBoatItem : public GwBoatItemBase{
GwBoatItem(String name,String formatInfo,unsigned long invalidTime=INVALID_TIME,GwBoatItemMap *map=NULL);
GwBoatItem(String name,String formatInfo,TOType toType,GwBoatItemMap *map=NULL);
virtual ~GwBoatItem(){}
bool update(T nv, int source=-1);
bool updateMax(T nv,int sourceId=-1);
bool update(T nv, int source);
bool updateMax(T nv,int sourceId);
T getData(){
return data;
}
@@ -185,7 +185,6 @@ public:
#define GWSPECBOATDATA(clazz,name,toType,fmt) \
clazz *name=new clazz(#name,GwBoatItemBase::fmt,toType,&values) ;
class GwBoatData{
static const unsigned long DEF_TIME=4000;
private:
GwLog *logger;
GwBoatItemBase::GwBoatItemMap values;