mirror of https://github.com/ArduPilot/ardupilot
Plane: Don't log SONR if there are no rangefinders
This commit is contained in:
parent
dbf67aa38a
commit
cc55e5a8fa
|
@ -46,8 +46,9 @@ void Plane::read_rangefinder(void)
|
|||
|
||||
rangefinder.update();
|
||||
|
||||
if (should_log(MASK_LOG_SONAR))
|
||||
if ((rangefinder.num_sensors() > 0) && should_log(MASK_LOG_SONAR)) {
|
||||
Log_Write_Sonar();
|
||||
}
|
||||
|
||||
rangefinder_height_update();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue