Hi Alan,
I appreciate your efforts to improve the joystick operation.
My feeling is that it should be nice if effectively you could use the set relative step. In that way each user could set a number of steps according to the gear reduction of his focuser system.
But maybe there is some drawbacks to implement this solution...
BR, Pierre-Yves
Yes there does appear to be some draw backs, it does not seem that the relative steps step value is available in the derived class for the focuser. Even if it was it would need to be set each startup. I'm back to implementing a 1, 10, 100 movement based on speed, which does not take much effort to implement, and retains the setting between power cycles. Would this be better than the current solution, though I suspect the current solution is not behaving as expected.
I am thinking I will just leave as is for now, until someone explains how the in out joystick is intended to work.
The following user(s) said Thank You: Jasem Mutlaq
So in theory you add more buttons and you can change the behavior here. If the relative steps were set to say, a 100, then in theory pressing the button would move them by this much. Feel free to play around with the code in order to get the most desirable behavior keeping in mind that it should work for all kind of focusers (DC and steppers).
Thanks for the heads up as to where in the code to look, and it looks to me like the code wold already do what we probably want. Unfortunately because this focuser has variable speed AND relative position, then the times move is used in preference the relative move.
From my point of view I would have thought relative move should have been first choice as it maintains accuracy of actual position.
My FocuserPro2 supports three speeds, so I assumed this means it is variable speed, but it is a stepper motor and not DC. Was this the intended purpose of variable speed or have I misunderstood? I don't see why a stepper motor would ever want to use a timed move as opposed to an abs/rel move.
I appreciate this is a global function, and so should not assume that everyone else would agree with my opinion, so how do we move forward on this?
I actually had the exact same though. Relative should be preferred over variable. I would make this change now, but please take a look at it in more depth so that it can be suited for more functionality later on.
You can do a relative move + or - using :64xxx#where xxx is the steps to move, for example :64-200# would move -200 steps from where the focus position is currently.
Does that help?
No not really, that is not the issue. I was just pointing out that if a focuser is defined to support variable speed(as this focuser is), then joystick button defaults to a "timed move" rather than the set "relative steps". I think it would be better the other way around.
I just tested the myFocuserPro2 with the Jasem fix. The joystick number of steps follows perfectly the relative position setting and, cherry on the cake, the backlash is taken into account. It seems to me that it was not the case with the precedent solution.
Thanks Jasem, saved me some time. I am now playing with getting Astroberry up and running on RPi 4 (4GB). Good progress so far, indi and kstatrs up and running, just need auto logon and vnc support.
Here is a MAC guy, proudly built my 3D printed focuser rotator, both controlled by Arduinos, via Astroberry.
Very enthusiastically downloaded the new kstars, and immediately reprogrammed my focuser Arduino with Myfocuserpro2, only to find out that my Astroberry doesn't speak that language yet....
would be so eager to try, and don't want to wait until Astroberry is updated.
Is there a "RbPi3" for dummies, or a simple explanation/ tutorial how to get that INDI driver uploaded to Astroberry?