Skip to content

Commit

Permalink
Firmware revision 11 (patch 6)
Browse files Browse the repository at this point in the history
Disable deceleration slew rate until sync'ed
  • Loading branch information
neoxic committed Aug 19, 2024
1 parent 38ed02f commit 3a22240
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--);
Expand Down

0 comments on commit 3a22240

Please sign in to comment.