Short-bus / pilomar

RaspberryPi based miniature observatory
https://shortbus.blog/
GNU General Public License v3.0
63 stars 14 forks source link

Microcontroller MoveMotor() more efficient mode and direction signals. #68

Closed Short-bus closed 2 weeks ago

Short-bus commented 4 months ago

circuitpython/code.py

The original code repeats setting the 'mode' and 'direction' signals for each individual step. This is a throwback to earlier code which supported synchronised movement of motors. In the current program only 1 motor moves at a time, so the mode and direction signals only need setting at the start of the move. This reduces a little processing overhead from each move pulse cycle.

The 'mode' and 'direction' signals could be relocated from MoveFullStep() to the start of MoveMotor(). Estimate 15% cycle time saved for each step.

Short-bus commented 3 months ago

The MoveFullStep and MoveMotor methods are refactored in the latest development copy. It takes this issue into account.

Short-bus commented 3 weeks ago

'Observation' and 'Slew' moves are now supported with the new code. This means the telescope can perform GOTO and HOME movements more rapidly, but when making observations it can then use finer motor control.

Added function to the menu to select from some recommended move/stepping possibilities. For example when combining microstepping and faster 'slew' movements. The latest version has multiple parameters available for controlling how movements are made, there is a risk that manually editing the parameter file may leave some parameter options in an incompatible state. By using the menu options it should always configure a valid combination of parameter settings.

Short-bus commented 2 weeks ago

2024-04 Development branch now merged. Closes this issue.