Skip to content

Commit

Permalink
Merge pull request #69 from StefanLobas/master
Browse files Browse the repository at this point in the history
Changed the logic to detect new values for float and int arrays.
  • Loading branch information
vranki authored Dec 1, 2020
2 parents 3b82798 + ebf338c commit 2f5e9fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extplane-server/tcpclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ void TcpClient::refChanged(DataRef *ref) {
bool bigenough = false;
QVector<float> values = refF->value();

if(_refValueFA.contains(ref) || refF->accuracy() == 0) {
if(!_refValueFA.contains(ref) || refF->accuracy() == 0) {
// New value or accuracy not set.
_refValueFA.insert(ref, values);
} else {
Expand All @@ -263,7 +263,7 @@ void TcpClient::refChanged(DataRef *ref) {
bool bigenough = false;

QVector<int> values = refI->value();
if(_refValueIA.contains(ref) || refI->accuracy() == 0) {
if(!_refValueIA.contains(ref) || refI->accuracy() == 0) {
// New value or accuracy not set.
_refValueIA.insert(ref, values);
} else {
Expand Down

0 comments on commit 2f5e9fd

Please sign in to comment.