introduce a source field in GwApi::BoatValue
This commit is contained in:
parent
faadccd6cb
commit
84aed8bc89
|
@ -15,6 +15,7 @@ class GwApi{
|
||||||
public:
|
public:
|
||||||
double value=0;
|
double value=0;
|
||||||
bool valid=false;
|
bool valid=false;
|
||||||
|
int source=-1;
|
||||||
bool changed=false; //will be set by getBoatDataValues
|
bool changed=false; //will be set by getBoatDataValues
|
||||||
BoatValue(){}
|
BoatValue(){}
|
||||||
BoatValue(const String &n):name(n){
|
BoatValue(const String &n):name(n){
|
||||||
|
|
|
@ -286,6 +286,11 @@ public:
|
||||||
double newValue=item->getDoubleValue();
|
double newValue=item->getDoubleValue();
|
||||||
if (newValue != list[i]->value) list[i]->changed=true;
|
if (newValue != list[i]->value) list[i]->changed=true;
|
||||||
list[i]->value=newValue;
|
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());
|
list[i]->setFormat(item->getFormat());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue