Rover: tidy WATER_DEPTH send checks

This commit is contained in:
Peter Barker 2024-12-16 10:53:09 +11:00 committed by Peter Barker
parent 07edfdd323
commit 73710d888d
1 changed files with 7 additions and 2 deletions

View File

@ -199,7 +199,12 @@ void GCS_MAVLINK_Rover::send_water_depth() const
RangeFinder *rangefinder = RangeFinder::get_singleton();
if (rangefinder == nullptr || !rangefinder->has_orientation(ROTATION_PITCH_270)){
if (rangefinder == nullptr) {
return;
}
// depth can only be measured by a downward-facing rangefinder:
if (!rangefinder->has_orientation(ROTATION_PITCH_270)) {
return;
}