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

Allow RX and OSD tasks to be scheduled at the second attempt on F411 processors

This commit is contained in:
Steve Evans 2022-01-20 13:54:38 +00:00
parent 2af98ae7c8
commit b3903edf55
3 changed files with 19 additions and 10 deletions

View file

@ -26,6 +26,6 @@
PG_REGISTER_WITH_RESET_TEMPLATE(schedulerConfig_t, schedulerConfig, PG_SCHEDULER_CONFIG, 0); PG_REGISTER_WITH_RESET_TEMPLATE(schedulerConfig_t, schedulerConfig, PG_SCHEDULER_CONFIG, 0);
PG_RESET_TEMPLATE(schedulerConfig_t, schedulerConfig, PG_RESET_TEMPLATE(schedulerConfig_t, schedulerConfig,
.rxRelaxDeterminism = 25, .rxRelaxDeterminism = SCHEDULER_RELAX_RX,
.osdRelaxDeterminism = 25, .osdRelaxDeterminism = SCHEDULER_RELAX_OSD,
); );

View file

@ -22,6 +22,15 @@
#include "pg/pg.h" #include "pg/pg.h"
#ifdef STM32F411xE
// Allow RX and OSD tasks to be scheduled at the second attempt on F411 processors
#define SCHEDULER_RELAX_RX 1
#define SCHEDULER_RELAX_OSD 1
#else
#define SCHEDULER_RELAX_RX 25
#define SCHEDULER_RELAX_OSD 25
#endif
typedef struct schedulerConfig_s { typedef struct schedulerConfig_s {
uint16_t rxRelaxDeterminism; uint16_t rxRelaxDeterminism;
uint16_t osdRelaxDeterminism; uint16_t osdRelaxDeterminism;

View file

@ -19,17 +19,17 @@
extern "C" { extern "C" {
#include "platform.h" #include "platform.h"
#include "pg/pg.h" #include "pg/pg.h"
#include "pg/pg_ids.h" #include "pg/pg_ids.h"
#include "pg/scheduler.h" #include "pg/scheduler.h"
#include "scheduler/scheduler.h" #include "scheduler/scheduler.h"
PG_REGISTER_WITH_RESET_TEMPLATE(schedulerConfig_t, schedulerConfig, PG_SCHEDULER_CONFIG, 0); PG_REGISTER_WITH_RESET_TEMPLATE(schedulerConfig_t, schedulerConfig, PG_SCHEDULER_CONFIG, 0);
PG_RESET_TEMPLATE(schedulerConfig_t, schedulerConfig, PG_RESET_TEMPLATE(schedulerConfig_t, schedulerConfig,
.rxRelaxDeterminism = 25, .rxRelaxDeterminism = 25,
.osdRelaxDeterminism = 25, .osdRelaxDeterminism = 25,
); );
} }
#include "unittest_macros.h" #include "unittest_macros.h"