diff --git a/libraries/AP_Scheduler/examples/Scheduler_test/Scheduler_test.cpp b/libraries/AP_Scheduler/examples/Scheduler_test/Scheduler_test.cpp index c2a4ec24c3..e08240dde6 100644 --- a/libraries/AP_Scheduler/examples/Scheduler_test/Scheduler_test.cpp +++ b/libraries/AP_Scheduler/examples/Scheduler_test/Scheduler_test.cpp @@ -83,7 +83,7 @@ void SchedTest::setup(void) AP_InertialSensor::RATE_50HZ); // initialise the scheduler - scheduler.init(&scheduler_tasks[0], sizeof(scheduler_tasks)/sizeof(scheduler_tasks[0])); + scheduler.init(&scheduler_tasks[0], ARRAY_SIZE(scheduler_tasks)); } void SchedTest::loop(void)