From 5ec59d8a3e369edba8c7f76ab74acdd9db624bd3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 20 Dec 2021 15:35:42 +1100 Subject: [PATCH] AP_Proximity: use have_serial when detecting avoid find_serial() as it changes port options --- libraries/AP_Proximity/AP_Proximity_Backend_Serial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Proximity/AP_Proximity_Backend_Serial.cpp b/libraries/AP_Proximity/AP_Proximity_Backend_Serial.cpp index f328f24110..4d77598cce 100644 --- a/libraries/AP_Proximity/AP_Proximity_Backend_Serial.cpp +++ b/libraries/AP_Proximity/AP_Proximity_Backend_Serial.cpp @@ -39,7 +39,7 @@ AP_Proximity_Backend_Serial::AP_Proximity_Backend_Serial(AP_Proximity &_frontend // configured serial port bool AP_Proximity_Backend_Serial::detect() { - return AP::serialmanager().find_serial(AP_SerialManager::SerialProtocol_Lidar360, 0) != nullptr; + return AP::serialmanager().have_serial(AP_SerialManager::SerialProtocol_Lidar360, 0); } #endif // HAL_PROXIMITY_ENABLED