AP_Vehicle: don't do any GCS stuff in delay callback if we're Replay

We haven't initialised the GCS at all, so it's not a great idea to
update_receive() and the like.
This commit is contained in:
Peter Barker 2020-03-11 19:47:44 +11:00 committed by Andrew Tridgell
parent 29d042dbc7
commit 0d396f4235
1 changed files with 5 additions and 0 deletions

View File

@ -173,6 +173,11 @@ void AP_Vehicle::get_common_scheduler_tasks(const AP_Scheduler::Task*& tasks, ui
*/
void AP_Vehicle::scheduler_delay_callback()
{
#if APM_BUILD_TYPE(APM_BUILD_Replay)
// compass.init() delays, so we end up here.
return;
#endif
static uint32_t last_1hz, last_50hz, last_5s;
AP_Logger &logger = AP::logger();