slaclab / lcls-tools

Python tools for LCLS: post processing data, PV handling, pulling archive settings, etc.
Apache License 2.0
2 stars 20 forks source link

Allow SC stepper motors to handle a negative maximum step size #132

Open lisazacarias opened 7 months ago

lisazacarias commented 7 months ago

Describe the bug If the user passes in a negative max step size, the condition if abs(numSteps) <= maxSteps will always fail

To Reproduce Steps to reproduce the behavior:

  1. Call StepperTuner.move() with a negative maxSteps

Expected behavior If the magnitude of the requested step size is > the magnitude of the max, only step max steps in the appropriate direction as needed

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context This was called from the SRF Parking GUI asking for movement by steps, not frequency