From 3a222405e5020ee4d048eb5be4337d26ff58381a Mon Sep 17 00:00:00 2001 From: neoxic Date: Mon, 19 Aug 2024 11:34:47 -0700 Subject: [PATCH] Firmware revision 11 (patch 6) Disable deceleration slew rate until sync'ed --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 5b3cf3f..238faab 100644 --- a/src/main.c +++ b/src/main.c @@ -669,7 +669,7 @@ void main(void) { int b = a >> 3; if (r < (a & 7)) ++b; if (++r == 8) r = 0; - if (curduty > newduty ? (curduty -= b) < newduty : (curduty += b) > newduty) curduty = newduty; // Duty cycle slew rate limiting + if (curduty > newduty ? sync < 6 || (curduty -= b) < newduty : (curduty += b) > newduty) curduty = newduty; // Duty cycle slew rate limiting } #ifdef FULL_DUTY // Allow 100% duty cycle int ccr = scale(curduty, 0, 2000, running && cfg.damp ? DEAD_TIME : 0, arr--);