Don´t know whether this makes sense or not, but I will share my thoughts anyhow:
thought of a possible software solution to eventually control the focuser with the thumbstick on the joystick controller. Apparently the MC_MOVE_POS [x] and MC_MOVE_NEG [x] will make the focuser move in positive or negative direction with speed [x] until a) either a "0" is received via a new "MC_MOVE_XXX [x]" command or a soft limit (set via calibration) is hit. The backlash function also seems to be implemented in the firmware of the driver, so we don´t have to care about this.
So can´t we just declare two new variables in our driver, let´s say "move_focuser_neg" and "move_focuser_pos". Based on the value of these variables either a "MC_MOVE_POS" or "MC_MOVE_NEG" is being sent through the serial comm. That way we don´t need to touch the basic design of the driver with the either time based or abs/rel moves, but just add our code to the existing one. To control the focser by control panel you have to add two new buttons for Focus_in and Focus_out. These would be in addition to the existing ones, which toggle direction for the abs/rel moves. When you hit one of the buttons the "MC_MOVE_XXX ]x]" command would be sent with the speed value [x] based on the slider setting from the "has_variable_speed" capability. The speed range in this case would need to be defined from value 5 (slow) to 9 (fast). If you release the button the "MC_MOVE_XXX [x]" command would be sent with [0] as speed value to stop movement. Same could be done with the joystick. Depending on the axis reading you load the "move_focuser_neg"/"move_focuser_pos" variable and execute the move. As soon as you release the joystick a "MC_MOVE_XXX [0]" command would be sent to stop movement. To not accidentely move the focuser by unintended touches when you grab the joystick, one could potentially assign a button to block focuser movement by the joystick. The button could toggle joystick command on and off. On my joystick, this would leave three of the four buttons next to the thumbstick for storing/retrieving presets. A long button press could store the current position, a short press sends stored position to the existing absolute movement routine. The current positon is being read via the "MC_GET_POS" command.
Does this makes sense ?

Read More...