mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 07:28:29 -04:00
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
f842c27070
commit
43bef1ac9e
@ -239,7 +239,7 @@ bool AP_Proximity_Backend::ignore_reading(uint16_t angle_deg) const
|
|||||||
// check angle vs each ignore area
|
// check angle vs each ignore area
|
||||||
for (uint8_t i=0; i < PROXIMITY_MAX_IGNORE; i++) {
|
for (uint8_t i=0; i < PROXIMITY_MAX_IGNORE; i++) {
|
||||||
if (frontend._ignore_width_deg[i] != 0) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user