Menu

Changing stepsize for push buttons

2022-07-17
2022-07-26
  • Juan Gonzalez

    Juan Gonzalez - 2022-07-17

    Hi everyone.
    I have built the standard drv8825 version and works fine from the pc, but I would like to use the push buttons when using the telescope in visual setup, without the camera, the pc... The problem is the stepsize is too small in my setup... I need a minimum of about 50 steps to notice a change in focus.
    Is there any way to change the stepsize associated to the push buttons? Also, I imagine I would need to increase the time that a button is pressed before sending continuous steps...

    Is there any way to change this?

    Thanks in advance
    Juan

     
  • brownrb

    brownrb - 2022-07-18

    Hi Juan

    Push buttons steps is not a part of the myfocuserpro2 arduino firmware. This has been implemented only in the next firmware release of the esp32 focuser firmware, not myFocuserPro2

    There are many reasons for this. myFP2 firmware has no room left to add anything, essentially we are out of space to put things in, and that would also mean pulling something out to make things fit. that then has ongoing issues with the many users out there that would immediately find their focusers stop working.

    And adding it as an option would not work either, because there is always a user that wants that option as well as something else, and the support issues are just not worth it (IMHO).

    Regards
    Robert

     
  • Juan Gonzalez

    Juan Gonzalez - 2022-07-18

    Understood. I'll try to do it through the IR option.
    Thanks
    Juan

     
  • Patrick PASC

    Patrick PASC - 2022-07-26

    Bonjour à tous,
    Pour augmenter la vitesse de déplacement avec les boutons poussoir il suffit de modifier la valeur de ftargetposition dans la section #ifdef PUSHBUTTONS.
    Moi j'ai mis -200 et +200.
    Voir copie ci-dessous

    int PBVal = readpbswitches();
    delay(20); // wait small delay in case user is holding pb down
    if ( readpbswitches() == PBVal ) // same key pressed
    {
    switch ( PBVal ) // now check the pbval using a switch for 1 2 and 3
    {
    case 0:
    return;
    break;
    case 1: // toggle sw1 is ON and 2 is off
    // move IN
    movedirection = MOVINGIN;
    myfocuser.focuserdirection = movedirection;
    ftargetposition = ftargetposition - 200;
    ftargetposition = (ftargetposition < 0) ? 0 : ftargetposition;
    writenow = 1;
    break;
    case 2: // toggle sw2 is ON and SW1 is OFF
    // move OUT
    movedirection = MOVINGOUT;
    myfocuser.focuserdirection = movedirection;
    ftargetposition = ftargetposition + 200;
    ftargetposition = (ftargetposition > myfocuser.maxstep) ? myfocuser.maxstep : ftargetposition;
    writenow = 1;
    break;
    case 3: // toggle sw1 and sw2 are ON

     

    Last edit: Patrick PASC 2022-09-15

Log in to post a comment.