mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_Scheduler: all vehicles now use functors
This commit is contained in:
parent
ec2d429513
commit
dd691ae75c
@ -87,11 +87,7 @@ void AP_Scheduler::run(uint16_t time_available)
|
||||
task_fn_t func;
|
||||
pgm_read_block(&_tasks[i].function, &func, sizeof(func));
|
||||
current_task = i;
|
||||
#if APM_BUILD_FUNCTOR
|
||||
func();
|
||||
#else
|
||||
func();
|
||||
#endif
|
||||
current_task = -1;
|
||||
|
||||
// record the tick counter when we ran. This drives
|
||||
|
@ -41,11 +41,7 @@
|
||||
class AP_Scheduler
|
||||
{
|
||||
public:
|
||||
#if APM_BUILD_FUNCTOR
|
||||
FUNCTOR_TYPEDEF(task_fn_t, void);
|
||||
#else
|
||||
typedef void (*task_fn_t)(void);
|
||||
#endif
|
||||
|
||||
struct Task {
|
||||
task_fn_t function;
|
||||
|
Loading…
Reference in New Issue
Block a user