Fix off-by-one error that would ignore maxRange if it was exactly 360NM.
This commit is contained in:
parent
3b4c872ea6
commit
c55c71b57c
2
track.c
2
track.c
|
@ -312,7 +312,7 @@ static int doLocalCPR(struct aircraft *a, struct modesMessage *mm, uint64_t now,
|
|||
|
||||
if (Modes.maxRange <= 1852*180) {
|
||||
range_limit = Modes.maxRange;
|
||||
} else if (Modes.maxRange <= 1852*360) {
|
||||
} else if (Modes.maxRange < 1852*360) {
|
||||
range_limit = (1852*360) - Modes.maxRange;
|
||||
} else {
|
||||
return (-1); // Can't do receiver-centered checks at all
|
||||
|
|
Loading…
Reference in a new issue