AP_Logger: panic in SITL if we fail to log a Replay block

// failing to log a block means that when we go to replay the log
    // things will almost certainly go sour.
This commit is contained in:
Peter Barker 2021-01-28 11:30:00 +11:00 committed by Peter Barker
parent a5d33cacb5
commit dbae56eb3a
1 changed files with 7 additions and 0 deletions

View File

@ -708,6 +708,13 @@ bool AP_Logger::WriteReplayBlock(uint8_t msg_id, const void *pBuffer, uint16_t s
}
}
}
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
// failing to log a block means that when we go to replay the log
// things will almost certainly go sour.
if (!ret) {
AP_HAL::panic("Failed to log replay block");
}
#endif
return ret;
}