AP_RangeFinder: use have_serial when detecting

avoid find_serial() as it changes port options
This commit is contained in:
Andrew Tridgell 2021-12-20 15:35:43 +11:00
parent f516977491
commit 0a018c323c
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ uint32_t AP_RangeFinder_Backend_Serial::initial_baudrate(const uint8_t serial_in
*/
bool AP_RangeFinder_Backend_Serial::detect(uint8_t serial_instance)
{
return AP::serialmanager().find_serial(AP_SerialManager::SerialProtocol_Rangefinder, serial_instance) != nullptr;
return AP::serialmanager().have_serial(AP_SerialManager::SerialProtocol_Rangefinder, serial_instance);
}