diff --git a/src/main/scheduler.c b/src/main/scheduler.c index df1ad4a7b..77e738202 100755 --- a/src/main/scheduler.c +++ b/src/main/scheduler.c @@ -22,12 +22,9 @@ #include #ifdef UNIT_TEST -// cannot include platform.h in UNIT_TEST build, since if included the build #defines (eg MAG, GPS, etc) -// are set differently to test code typedef enum {TEST_IRQ = 0 } IRQn_Type; -#else -#include "platform.h" #endif +#include "platform.h" #include "scheduler.h" #include "debug.h" @@ -61,7 +58,7 @@ static cfTask_t* taskQueueArray[TASK_COUNT + 1]; // extra item for NULL pointer #endif STATIC_UNIT_TESTED void queueClear(void) { - memset(taskQueueArray, 0, sizeof(cfTask_t) * (TASK_COUNT + 1)); + memset(taskQueueArray, 0, sizeof(taskQueueArray)); taskQueuePos = 0; taskQueueSize = 0; }