AP_Proximity: 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:42 +11:00
parent b79962f38e
commit f516977491
1 changed files with 1 additions and 1 deletions

View File

@ -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