introduce a source field in GwApi::BoatValue

This commit is contained in:
andreas 2022-03-12 20:31:54 +01:00
parent faadccd6cb
commit 84aed8bc89
2 changed files with 6 additions and 0 deletions

View File

@ -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){

View File

@ -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());
}