mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Ignore time taken to update profile with stick commands
This commit is contained in:
parent
2c5accb8ba
commit
f5ee6cfd08
2 changed files with 4 additions and 1 deletions
|
@ -816,6 +816,9 @@ void changePidProfileFromCellCount(uint8_t cellCount)
|
||||||
|
|
||||||
void changePidProfile(uint8_t pidProfileIndex)
|
void changePidProfile(uint8_t pidProfileIndex)
|
||||||
{
|
{
|
||||||
|
// The config switch will cause a big enough delay in the current task to upset the scheduler
|
||||||
|
schedulerIgnoreTaskExecTime();
|
||||||
|
|
||||||
if (pidProfileIndex < PID_PROFILE_COUNT) {
|
if (pidProfileIndex < PID_PROFILE_COUNT) {
|
||||||
systemConfigMutable()->pidProfileIndex = pidProfileIndex;
|
systemConfigMutable()->pidProfileIndex = pidProfileIndex;
|
||||||
loadPidProfile();
|
loadPidProfile();
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
// taskUpdateRxMain() has occasional peaks in execution time so normal moving average duration estimation doesn't work
|
// taskUpdateRxMain() has occasional peaks in execution time so normal moving average duration estimation doesn't work
|
||||||
// Decay the estimated max task duration by 1/(1 << RX_TASK_DECAY_SHIFT) on every invocation
|
// Decay the estimated max task duration by 1/(1 << RX_TASK_DECAY_SHIFT) on every invocation
|
||||||
#define RX_TASK_DECAY_SHIFT 5
|
#define RX_TASK_DECAY_SHIFT 7
|
||||||
// Add a margin to the task duration estimation
|
// Add a margin to the task duration estimation
|
||||||
#define RX_TASK_MARGIN 1
|
#define RX_TASK_MARGIN 1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue