mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Trigger gyro SPI DMA reads in EXTI handler if supported and lock gyroTask loop to gyro to eliminate missed updates and jitter
This commit is contained in:
parent
415d4db5aa
commit
d5f62be013
63 changed files with 755 additions and 379 deletions
|
@ -81,6 +81,8 @@
|
|||
|
||||
#include "rx/rx.h"
|
||||
|
||||
#include "scheduler/scheduler.h"
|
||||
|
||||
#include "sensors/acceleration.h"
|
||||
#include "sensors/adcinternal.h"
|
||||
#include "sensors/barometer.h"
|
||||
|
@ -91,8 +93,6 @@
|
|||
#include "sensors/sensors.h"
|
||||
#include "sensors/rangefinder.h"
|
||||
|
||||
#include "scheduler/scheduler.h"
|
||||
|
||||
#include "telemetry/telemetry.h"
|
||||
#include "telemetry/crsf.h"
|
||||
|
||||
|
@ -170,9 +170,9 @@ bool taskUpdateRxMainInProgress()
|
|||
|
||||
static void taskUpdateRxMain(timeUs_t currentTimeUs)
|
||||
{
|
||||
// Where we are using a state machine call ignoreTaskTime() for all states bar one
|
||||
// Where we are using a state machine call ignoreTaskStateTime() for all states bar one
|
||||
if (rxState != MODES) {
|
||||
ignoreTaskTime();
|
||||
ignoreTaskStateTime();
|
||||
}
|
||||
|
||||
switch (rxState) {
|
||||
|
@ -418,7 +418,6 @@ void tasksInit(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(USE_TASK_STATISTICS)
|
||||
#define DEFINE_TASK(taskNameParam, subTaskNameParam, checkFuncParam, taskFuncParam, desiredPeriodParam, staticPriorityParam) { \
|
||||
.taskName = taskNameParam, \
|
||||
.subTaskName = subTaskNameParam, \
|
||||
|
@ -427,15 +426,6 @@ void tasksInit(void)
|
|||
.desiredPeriodUs = desiredPeriodParam, \
|
||||
.staticPriority = staticPriorityParam \
|
||||
}
|
||||
#else
|
||||
#define DEFINE_TASK(taskNameParam, subTaskNameParam, checkFuncParam, taskFuncParam, desiredPeriodParam, staticPriorityParam) { \
|
||||
.checkFunc = checkFuncParam, \
|
||||
.taskFunc = taskFuncParam, \
|
||||
.desiredPeriodUs = desiredPeriodParam, \
|
||||
.staticPriority = staticPriorityParam \
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
task_t tasks[TASK_COUNT] = {
|
||||
[TASK_SYSTEM] = DEFINE_TASK("SYSTEM", "LOAD", NULL, taskSystemLoad, TASK_PERIOD_HZ(10), TASK_PRIORITY_MEDIUM_HIGH),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue