From 6728a7f681f644a69197cb99a8e2ac43b9a1fffb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 20 Dec 2021 15:48:35 +1100 Subject: [PATCH] AP_ADSB: use have_serial when detecting avoid find_serial() as it changes port options --- libraries/AP_ADSB/AP_ADSB_Sagetech.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp b/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp index b196a5474f..008ecd201d 100644 --- a/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp +++ b/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp @@ -45,7 +45,7 @@ // detect if any port is configured as Sagetech bool AP_ADSB_Sagetech::detect() { - return (AP::serialmanager().find_serial(AP_SerialManager::SerialProtocol_ADSB, 0) != nullptr); + return AP::serialmanager().have_serial(AP_SerialManager::SerialProtocol_ADSB, 0); } // Init, called once after class is constructed