Skip to content

Commit

Permalink
fix of build regression for Raspberry Edition
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Nov 30, 2020
1 parent d09950b commit b010b66
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions software/firmware/source/SoftRF/src/protocol/data/JSON.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,14 @@ void parsePING(JsonObject& root)
fo.no_track = false;
fo.rssi = 0;

Traffic_Update(&fo);

int j;

/* Try to find and update an entry with the same aircraft ID */
for (j=0; j < MAX_TRACKING_OBJECTS; j++) {
if (Container[j].addr == fo.addr && Container[j].protocol == fo.protocol) {
Container[j] = fo;
Traffic_Update(j);
break;
}
}
Expand All @@ -230,7 +231,6 @@ void parsePING(JsonObject& root)
if (Container[j].addr == 0 &&
memcmp(Container[j].raw, EmptyFO.raw, sizeof(EmptyFO.raw)) == 0) {
Container[j] = fo;
Traffic_Update(j);
break;
}
}
Expand All @@ -243,7 +243,6 @@ void parsePING(JsonObject& root)
for (j=0; j < MAX_TRACKING_OBJECTS; j++) {
if (timestamp - Container[j].timestamp > ENTRY_EXPIRATION_TIME) {
Container[j] = fo;
Traffic_Update(j);
break;
}
}
Expand Down Expand Up @@ -626,13 +625,14 @@ void parseD1090(JsonObject& root)
fo.no_track = false;
fo.rssi = aircraft_array[i].rssi;

Traffic_Update(&fo);

int j;

/* Try to find and update an entry with the same aircraft ID */
for (j=0; j < MAX_TRACKING_OBJECTS; j++) {
if (Container[j].addr == fo.addr && Container[j].protocol == fo.protocol) {
Container[j] = fo;
Traffic_Update(j);
break;
}
}
Expand All @@ -646,7 +646,6 @@ void parseD1090(JsonObject& root)
if (Container[j].addr == 0 &&
memcmp(Container[j].raw, EmptyFO.raw, sizeof(EmptyFO.raw)) == 0) {
Container[j] = fo;
Traffic_Update(j);
break;
}
}
Expand All @@ -659,7 +658,6 @@ void parseD1090(JsonObject& root)
for (j=0; j < MAX_TRACKING_OBJECTS; j++) {
if (timestamp - Container[j].timestamp > ENTRY_EXPIRATION_TIME) {
Container[j] = fo;
Traffic_Update(j);
break;
}
}
Expand Down

0 comments on commit b010b66

Please sign in to comment.