Skip to content

drivers: stepper: refactor stepper move_to and move_by calls #88676

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

Merged

Conversation

dipakgmx
Copy link
Member

@dipakgmx dipakgmx commented Apr 15, 2025

Refactored stepper move_to calls and move_by calls.
Now, relative movement required, or the absolute target position
is calculated and then redirected to move_by or move_to calls
respectively.

@github-actions github-actions bot added platform: ADI Analog Devices, Inc. area: Stepper labels Apr 15, 2025
@dipakgmx dipakgmx force-pushed the feat/stepper-refactor-clones branch from 03c76c2 to ebf6203 Compare April 15, 2025 17:44
@dipakgmx dipakgmx changed the title drivers: stepper: refactor stepper move_to to use move_by drivers: stepper: refactor stepper move_to and move_by calls Apr 15, 2025
@dipakgmx dipakgmx force-pushed the feat/stepper-refactor-clones branch from ebf6203 to 1b7ff30 Compare April 15, 2025 18:23
}
int32_t target_position = position + micro_steps;

LOG_DBG("Stepper motor controller %s moved to %d by steps: %d", dev->name, target_position,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOG_DBG("%s moved to %d by steps: %d", dev->name, target_position,

@dipakgmx dipakgmx force-pushed the feat/stepper-refactor-clones branch 2 times, most recently from 399f583 to aec7aa0 Compare April 15, 2025 20:06
Refactored stepper move_to calls and move_by calls.
Now, relative movement required or absolute target position
is calculated and then redirected to move_by or move_to calls
respectively.

Signed-off-by: Dipak Shetty <[email protected]>
@dipakgmx dipakgmx force-pushed the feat/stepper-refactor-clones branch from aec7aa0 to 9675be9 Compare April 15, 2025 20:41
@kartben kartben merged commit 8f6b0b2 into zephyrproject-rtos:main Apr 17, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Stepper platform: ADI Analog Devices, Inc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants