diff --git a/lib/api/GwApi.h b/lib/api/GwApi.h index 9611707..b6be1cc 100644 --- a/lib/api/GwApi.h +++ b/lib/api/GwApi.h @@ -15,6 +15,7 @@ class GwApi{ public: double value=0; bool valid=false; + int source=-1; bool changed=false; //will be set by getBoatDataValues BoatValue(){} BoatValue(const String &n):name(n){ diff --git a/src/main.cpp b/src/main.cpp index 582372e..1c6b3d3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -286,6 +286,11 @@ public: double newValue=item->getDoubleValue(); if (newValue != list[i]->value) list[i]->changed=true; list[i]->value=newValue; + int newSource=item->getLastSource(); + if (newSource != list[i]->source){ + list[i]->source=newSource; + list[i]->changed=true; + } } list[i]->setFormat(item->getFormat()); }