From 7d3a1739d8bb9f6045fcb2bcede236614e37d0c3 Mon Sep 17 00:00:00 2001 From: murata Date: Sat, 17 Apr 2021 20:19:00 +0900 Subject: [PATCH] AP_Proximity: Integrate the judgment --- libraries/AP_Proximity/AP_Proximity_TeraRangerTowerEvo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Proximity/AP_Proximity_TeraRangerTowerEvo.cpp b/libraries/AP_Proximity/AP_Proximity_TeraRangerTowerEvo.cpp index 3f6e985534..c9fac09587 100644 --- a/libraries/AP_Proximity/AP_Proximity_TeraRangerTowerEvo.cpp +++ b/libraries/AP_Proximity/AP_Proximity_TeraRangerTowerEvo.cpp @@ -150,7 +150,7 @@ void AP_Proximity_TeraRangerTowerEvo::update_sector_data(int16_t angle_deg, uint // Get location on 3-D boundary based on angle to the object const AP_Proximity_Boundary_3D::Face face = boundary.get_face(angle_deg); //check for target too far, target too close and sensor not connected - const bool valid = (distance_cm != 0xffff) && (distance_cm != 0x0000) && (distance_cm != 0x0001); + const bool valid = (distance_cm != 0xffff) && (distance_cm > 0x0001); if (valid && !check_obstacle_near_ground(angle_deg, distance_cm * 0.001f)) { boundary.set_face_attributes(face, angle_deg, ((float) distance_cm) / 1000); // update OA database