AP_Proximity: log if any drivers created

allows logging even if only 2nd proximity sensor is configured
This commit is contained in:
Randy Mackay 2022-07-07 20:18:29 +09:00 committed by Andrew Tridgell
parent 436f77d673
commit 826cf558eb

View File

@ -308,8 +308,8 @@ void AP_Proximity::set_rangefinder_alt(bool use, bool healthy, float alt_cm)
// Write proximity sensor distances
void AP_Proximity::log()
{
// exit immediately if not enabled
if (get_status() == AP_Proximity::Status::NotConnected) {
// exit immediately if no sensors
if (num_sensors() == 0) {
return;
}