mirror of https://github.com/ArduPilot/ardupilot
AP_Proximity: fix proximity ignored zone calulation
It seems there was a typo in the checking of proximity ignored zones.
This commit is contained in:
parent
61446d749b
commit
a58415391f
|
@ -239,7 +239,7 @@ bool AP_Proximity_Backend::ignore_reading(uint16_t angle_deg) const
|
|||
// check angle vs each ignore area
|
||||
for (uint8_t i=0; i < PROXIMITY_MAX_IGNORE; i++) {
|
||||
if (frontend._ignore_width_deg[i] != 0) {
|
||||
if (abs(angle_deg - frontend._ignore_width_deg[i]) <= (frontend._ignore_width_deg[i]/2)) {
|
||||
if (abs(angle_deg - frontend._ignore_angle_deg[i]) <= (frontend._ignore_width_deg[i]/2)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue