From 59d80abbebe482bd04ff5c8b1f89a481855c444b Mon Sep 17 00:00:00 2001 From: WillB97 Date: Fri, 19 Apr 2024 18:36:55 +0100 Subject: [PATCH] Fix hardcoded value --- src/servo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servo.c b/src/servo.c index 5b40829..d9cba2d 100644 --- a/src/servo.c +++ b/src/servo.c @@ -185,7 +185,7 @@ static void calculate_phase_steps(uint8_t phase) { sorted_servo_steps[step].rising = true; if (step == (SERVOS_PER_PHASE - 1)) { // this gap is the remaining delay before the first falling edge - sorted_servo_steps[step].next_steps = sorted_servo_states[0].pulse - (TICKS_BETWEEN_EDGES * 3); + sorted_servo_steps[step].next_steps = sorted_servo_states[0].pulse - (TICKS_BETWEEN_EDGES * (SERVOS_PER_PHASE - 1)); } else { sorted_servo_steps[step].next_steps = TICKS_BETWEEN_EDGES; }