1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2026-03-28 18:06:37 +01:00

Moved to c++17 and espressif32 @ 6.9.0, fixed waypoint boatdata code

This commit is contained in:
2025-08-06 14:04:54 +02:00
parent 2d47702627
commit f823dadc6b
7 changed files with 1983 additions and 1995 deletions

View File

@@ -121,7 +121,13 @@ template<class T> class GwBoatItem : public GwBoatItemBase{
if (! isValid(millis())) return defaultv;
return data;
}
virtual double getDoubleValue(){return (double)data;}
virtual double getDoubleValue(){
if constexpr (std::is_same<T, String>::value) {
return 0.0; // TODO any better ideas?
} else {
return (double)data;
}
}
virtual void fillString();
virtual void toJsonDoc(GwJsonDocument *doc, unsigned long minTime);
virtual int getLastSource(){return lastUpdateSource;}