From 43bef1ac9ef82d53d72b37c398bff9237171bee4 Mon Sep 17 00:00:00 2001 From: Andras Schaffer Date: Wed, 3 Jun 2020 00:07:06 +0200 Subject: [PATCH] AP_Proximity: fix proximity ignored zone calulation It seems there was a typo in the checking of proximity ignored zones. --- libraries/AP_Proximity/AP_Proximity_Backend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Proximity/AP_Proximity_Backend.cpp b/libraries/AP_Proximity/AP_Proximity_Backend.cpp index d598e7e333..25cc7f22ec 100644 --- a/libraries/AP_Proximity/AP_Proximity_Backend.cpp +++ b/libraries/AP_Proximity/AP_Proximity_Backend.cpp @@ -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; } }