28 #define AP_SCHEDULER_NAME_INITIALIZER(_name) .name = #_name, 33 #define SCHED_TASK_CLASS(classname, classptr, func, _rate_hz, _max_time_micros) { \ 34 .function = FUNCTOR_BIND(classptr, &classname::func, void),\ 35 AP_SCHEDULER_NAME_INITIALIZER(func)\ 37 .max_time_micros = _max_time_micros\ 59 AP_Scheduler(scheduler_fastloop_fn_t fastloop_fn =
nullptr);
75 void init(
const Task *tasks, uint8_t num_tasks, uint32_t log_performance_bit);
96 void run(uint32_t time_available);
scheduler_fastloop_fn_t _fastloop_fn
uint8_t debug_flags(void)
uint16_t get_loop_rate_hz(void)
uint32_t get_loop_period_us()
float get_loop_period_s()
static int8_t current_task
void init(const Task *tasks, uint8_t num_tasks, uint32_t log_performance_bit)
float get_filtered_time() const
float get_last_loop_time_s(void) const
AP_Scheduler & operator=(const AP_Scheduler &)=delete
AP_HAL::Util::perf_counter_t * _perf_counters
uint32_t _task_time_allowed
A system for managing and storing variables that are of general interest to the system.
void run(uint32_t time_available)
uint32_t _log_performance_bit
bool is_zero(const T fVal1)
void Log_Write_Performance()
AP_Scheduler(scheduler_fastloop_fn_t fastloop_fn=nullptr)
uint32_t _task_time_started
float get_filtered_loop_time(void) const
const struct Task * _tasks
uint16_t time_available_usec(void)
static const struct AP_Param::GroupInfo var_info[]
AP_Int16 _active_loop_rate_hz
uint32_t _loop_timer_start_us
FUNCTOR_TYPEDEF(scheduler_fastloop_fn_t, void)