I’m a beginner of the ardupilot. When I check the source code (arducopter.cpp), I found there are several maximum time here:
/*
scheduler table for fast CPUs - all regular tasks apart from the fast_loop()
should be listed here, along with how often they should be called (in hz)
and the maximum time they are expected to take (in microseconds)
*/
const AP_Scheduler::Task Copter::scheduler_tasks[] = {
SCHED_TASK(rc_loop, 100, 130),
…
My questions are:
how do you calculate these time deadlines?
Is there any way that I can calculate such time deadline of a given function/task?