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:
parent
33636bb847
commit
324711ddda
9 changed files with 59 additions and 54 deletions
4
Makefile
4
Makefile
|
@ -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 \
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -20,7 +20,8 @@
|
|||
#include <math.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "scheduler.h"
|
||||
|
||||
#include "scheduler/scheduler.h"
|
||||
|
||||
#include "common/maths.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue