1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 01:05:21 +03:00

SCHEDULER: Move scheduler code to a separate directory

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2016-03-15 22:04:57 +10:00
parent 33636bb847
commit 324711ddda
9 changed files with 59 additions and 54 deletions

View file

@ -223,8 +223,8 @@ COMMON_SRC = build_config.c \
common/typeconversion.c \
common/encoding.c \
common/filter.c \
scheduler.c \
scheduler_tasks.c \
scheduler/scheduler.c \
scheduler/scheduler_tasks.c \
main.c \
mw.c \
flight/failsafe.c \

View file

@ -24,9 +24,10 @@
#include <ctype.h>
#include "platform.h"
#include "scheduler.h"
#include "version.h"
#include "scheduler/scheduler.h"
#include "build_config.h"
#include "common/axis.h"

View file

@ -24,7 +24,8 @@
#include "build_config.h"
#include "debug.h"
#include "platform.h"
#include "scheduler.h"
#include "scheduler/scheduler.h"
#include "common/axis.h"
#include "common/color.h"

View file

@ -21,7 +21,8 @@
#include <string.h>
#include "platform.h"
#include "scheduler.h"
#include "scheduler/scheduler.h"
#include "common/axis.h"
#include "common/color.h"

View file

@ -21,9 +21,10 @@
#include <math.h>
#include "platform.h"
#include "scheduler.h"
#include "debug.h"
#include "scheduler/scheduler.h"
#include "common/maths.h"
#include "common/axis.h"
#include "common/color.h"

View file

@ -162,7 +162,7 @@ void rescheduleTask(cfTaskId_e taskId, uint32_t newPeriodMicros)
{
if (taskId == TASK_SELF || taskId < TASK_COUNT) {
cfTask_t *task = taskId == TASK_SELF ? currentTask : &cfTasks[taskId];
task->desiredPeriod = MAX(100, newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging
task->desiredPeriod = MAX((uint32_t)100, newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging
}
}

View file

@ -20,7 +20,8 @@
#include <math.h>
#include "platform.h"
#include "scheduler.h"
#include "scheduler/scheduler.h"
#include "common/maths.h"