Add runtime axis and homing direction control - #28493
Draft
ellensp wants to merge 5 commits into
Draft
Conversation
Contributor
Author
|
This has not been tested on real hardware at all yet. Just wanted to make it public for constructive feedback. The G-codes were picked at random. I have no problems if they get changed |
|
I'd suggest to use RRF gcodes, so incompatibility doesn't grow. |
Contributor
Author
|
M569 https://reprap.org/wiki/G-code#M569:_Stepper_driver_control is quite different and extensive... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds two optional runtime tuning features:
RUNTIME_AXIS_DIRECTION: Change motor direction at runtime with G-code (M670) instead of rebuilding firmware.RUNTIME_HOMING_DIRECTION: Change homing direction at runtime with G-code (M671), including matching endstop behavior when both min/max pins exist.Both settings are saved to EEPROM, so changes persist after restart. A reset (
M502) restores defaults from configuration.Requirements
RUNTIME_AXIS_DIRECTIONand/orRUNTIME_HOMING_DIRECTIONinConfiguration_adv.h.Benefits
Configurations
mega2560build.M670to flip an axis direction and confirm movement changes.M671to switch homing direction and confirm homing/endstop behavior.M500/M501, then verify reset behavior withM502.Related Issues
Feature request: runtime control of axis direction and homing direction without reflashing.