mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_Proximity: use have_serial when detecting
avoid find_serial() as it changes port options
This commit is contained in:
parent
0da0f6dd37
commit
93d8a0606f
@ -39,7 +39,7 @@ AP_Proximity_Backend_Serial::AP_Proximity_Backend_Serial(AP_Proximity &_frontend
|
|||||||
// configured serial port
|
// configured serial port
|
||||||
bool AP_Proximity_Backend_Serial::detect()
|
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
|
#endif // HAL_PROXIMITY_ENABLED
|
||||||
|
Loading…
Reference in New Issue
Block a user