From c8482dfa6f95e2730d9b236164eaad03ec117ffc Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Mon, 24 May 2021 20:45:47 +0200 Subject: [PATCH] Raised maximum mixer scheduler period to 50ms (20Hz) Resolves #7 --- radio/src/mixer_scheduler.h | 2 +- radio/src/tasks.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/mixer_scheduler.h b/radio/src/mixer_scheduler.h index 75a6ad1aa..f138bd268 100644 --- a/radio/src/mixer_scheduler.h +++ b/radio/src/mixer_scheduler.h @@ -24,7 +24,7 @@ #define MIXER_SCHEDULER_DEFAULT_PERIOD_US 4000u // 4ms #define MIN_REFRESH_RATE 1750 /* us */ -#define MAX_REFRESH_RATE 25000 /* us */ +#define MAX_REFRESH_RATE 50000 /* us */ #if !defined(SIMU) diff --git a/radio/src/tasks.cpp b/radio/src/tasks.cpp index c635c2ae1..6411827ad 100644 --- a/radio/src/tasks.cpp +++ b/radio/src/tasks.cpp @@ -111,7 +111,7 @@ void sendSynchronousPulses(uint8_t runMask) } constexpr uint8_t MIXER_FREQUENT_ACTIONS_PERIOD = 5 /*ms*/; -constexpr uint8_t MIXER_MAX_PERIOD = 30 /*ms*/; +constexpr uint8_t MIXER_MAX_PERIOD = MAX_REFRESH_RATE / 1000 /*ms*/; void execMixerFrequentActions() {