Rover: DPTH messages logged even with no position

This commit is contained in:
Randy Mackay 2021-04-17 10:40:00 +09:00 committed by Andrew Tridgell
parent 09718a0f11
commit b8b1a7270c
1 changed files with 1 additions and 3 deletions

View File

@ -46,9 +46,7 @@ void Rover::Log_Write_Depth()
// get position
Location loc;
if (!ahrs.get_position(loc)) {
return;
}
IGNORE_RETURN(ahrs.get_position(loc));
// check if new sensor reading has arrived
uint32_t reading_ms = rangefinder.last_reading_ms(ROTATION_PITCH_270);