Skip to content

Upstream sync#423

Merged
VIXIVIXIV merged 4 commits intoVIXIVIXIV:snapshotfrom
Klipper3d:master
Mar 22, 2026
Merged

Upstream sync#423
VIXIVIXIV merged 4 commits intoVIXIVIXIV:snapshotfrom
Klipper3d:master

Conversation

@VIXIVIXIV
Copy link
Owner

No description provided.

Rework the comparison to avoid using an expensive divide operation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
There is no need for elaborate math scaling of the cycle_time value to
the local clock ticks.  Just hardcode a scale of 16, which simplifies
the math calculations.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use a MAX_PWM of 256 (instead of 255) to avoid an expensive run-time
divide operation.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Use a different method of setting the hardware pwm registers so that
the actual cycle_time is much closer to the requested cycle_time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
@VIXIVIXIV VIXIVIXIV merged commit b2ec4bd into VIXIVIXIV:snapshot Mar 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants