Rover: only send WATER_DEPTH for boat frames

This commit is contained in:
Peter Barker 2024-12-16 10:51:41 +11:00 committed by Peter Barker
parent 9f2253a109
commit 07edfdd323

View File

@ -192,6 +192,11 @@ void GCS_MAVLINK_Rover::send_water_depth() const
return; return;
} }
// only send for boats:
if (!rover.is_boat()) {
return;
}
RangeFinder *rangefinder = RangeFinder::get_singleton(); RangeFinder *rangefinder = RangeFinder::get_singleton();
if (rangefinder == nullptr || !rangefinder->has_orientation(ROTATION_PITCH_270)){ if (rangefinder == nullptr || !rangefinder->has_orientation(ROTATION_PITCH_270)){