AP_Scheduler: all vehicles now use functors

This commit is contained in:
Andrew Tridgell 2015-06-01 15:16:11 +10:00
parent ec2d429513
commit dd691ae75c
2 changed files with 0 additions and 8 deletions

View File

@ -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

View File

@ -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;