-
-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Add sanity check for MAXIMUM_STEPPER_RATE #27764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sanity check for MAXIMUM_STEPPER_RATE #27764
Conversation
e14293d
to
29cee68
Compare
282e286
to
35a455a
Compare
Build Test (LPC1769) (.../examples/Azteeg/X5GT) failed with |
The currently failing test is ["Test LPC1769] Cohesion3D Remix DELTA | ABL Bilinear | EEPROM | Sensorless Homing/Probing | I Axis..." example has "#define I_DRIVER_TYPE TB6560" so it gets set to the slowest driver
This is set as part of the test https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.1.x/buildroot/tests/LPC1769#L47 as is DEFAULT_AXIS_STEPS_PER_UNIT '{ 80, 80, 400, 500, 80 }' \
DEFAULT_MAX_FEEDRATE '{ 300, 300, 5, 25, 300 }' \
If you update the test file buildroot/tests/LPC1769 lines 48-49 with valid values, this test will pass |
@ellensp, thank you for the clarification! Initially I mistakenly thought that considering all configurations from Configurations/config/examples/ would be enough. Now I see that all scripts from Marlin/buildroot/tests/ should also be taken into account. |
Description
It was observed that when the actual stepper motor rate (calculated from
DEFAULT_AXIS_STEPS_PER_UNIT
andDEFAULT_MAX_FEEDRATE
) exceeds hardware limitations (i.e.,MAXIMUM_STEPPER_RATE
), unpredictable behavior occurs (#27496).Several lines of code were added to SanityCheck.h to trigger a compile-time error in such cases.
Example
Use extreme values for
DEFAULT_MAX_FEEDRATE
to trigger a compile-time error.Requirements
No specific hardware components are required.
Benefits
This change ensures a compile-time error occurs instead of the unpredictable behavior that might occur otherwise.
Configurations
This applies to all configurations where
MAXIMUM_STEPPER_RATE
is defined.Related Issues
#27496