From d94a78cb3ec97649a44c8dd9ed948e312c0ab88f Mon Sep 17 00:00:00 2001 From: Steve Evans Date: Sat, 18 Dec 2021 13:36:55 +0000 Subject: [PATCH] Reduce timing margins --- src/main/scheduler/scheduler.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scheduler/scheduler.h b/src/main/scheduler/scheduler.h index e38fe4ae89..1f54ab5b28 100644 --- a/src/main/scheduler/scheduler.h +++ b/src/main/scheduler/scheduler.h @@ -31,12 +31,12 @@ #define LOAD_PERCENTAGE_ONE 100 -#define SCHED_START_LOOP_MIN_US 4 // Wait at start of scheduler loop if gyroTask is nearly due +#define SCHED_START_LOOP_MIN_US 1 // Wait at start of scheduler loop if gyroTask is nearly due #define SCHED_START_LOOP_MAX_US 12 #define SCHED_START_LOOP_DOWN_STEP 50 // Fraction of a us to reduce start loop wait #define SCHED_START_LOOP_UP_STEP 1 // Fraction of a us to increase start loop wait -#define TASK_GUARD_MARGIN_MIN_US 4 // Add an amount to the estimate of a task duration +#define TASK_GUARD_MARGIN_MIN_US 1 // Add an amount to the estimate of a task duration #define TASK_GUARD_MARGIN_MAX_US 6 #define TASK_GUARD_MARGIN_DOWN_STEP 50 // Fraction of a us to reduce task guard margin #define TASK_GUARD_MARGIN_UP_STEP 1 // Fraction of a us to increase task guard margin