AP_Scheduler: initialise _last_loop_time_s in init()

This commit is contained in:
Andrew Tridgell 2018-02-13 16:48:10 +11:00
parent f190ca0867
commit 6cc007598e
1 changed files with 1 additions and 0 deletions

View File

@ -71,6 +71,7 @@ AP_Scheduler::AP_Scheduler(scheduler_fastloop_fn_t fastloop_fn) :
} else if (_loop_rate_hz > 2000) {
_loop_rate_hz.set(2000);
}
_last_loop_time_s = 1.0 / _loop_rate_hz;
}
// initialise the scheduler