Using AGOpenGPS with a joystick

Click build AgOpengps in build section if it is successful click publish then install and copy .exe to existing aog install. Not ideal but it works.

Switch from debug to release.

Hello, maybe also usefull:

        // AB-Line aktivate

        if (keyData == (Keys.K))
        {
            btnABLine.PerformClick();
            return true;    // indicate that you handled this keystroke
        }

        // AB-Curve aktivate

        if (keyData == (Keys.I))
        {
            btnCurve.PerformClick();
            return true;    // indicate that you handled this keystroke
        }

Does someone know how to implement:

  1. U-turn Left / Uturn Right button

  2. Drive in

         // drive in
    
         if (keyData == (Keys.E))
         {
             btnInField_Click.PerformClick();
             return true;    // indicate that you handled this keystroke
         }
    

btnInField_Click.PerformanceClick() does not work:
Failure: btnInField_Click is not declarted

For the U-turn you may try:

// U-Turn Right
    if (keyData == (Keys.P))
    {
        if (isUTurnOn)
        {
            if (yt.isYouTurnTriggered){
                yt.ResetYouTurn();
            }else{
                yt.isYouTurnTriggered = true;
                yt.BuildManualYouTurn(true, true);
            }
        }
        return true;    // indicate that you handled this keystroke
    }


// U-Turn Left
    if (keyData == (Keys.O))
    {
        if (isUTurnOn)
        {
            if (yt.isYouTurnTriggered){
                yt.ResetYouTurn();
            }else{
                yt.isYouTurnTriggered = true;
                yt.BuildManualYouTurn(false, true);
            }
        }
        return true;    // indicate that you handled this keystroke
    }

It works… But it is the manual turn.
What i want to use is the auto uturn Switch left right turn. You know What i mean?

BR

The auto should work with this:

        if (keyData == (Keys.U))
        {
            btnAutoYouTurn.PerformClick();
            return true;    // indicate that you handled this keystroke
        }

I think that just the youturn on off?
But you know when uturn i active… You can choose which direction it goes left or right on the top of the screen.

You have to change the Code a little bit for the u turn instead of the lateral

       if (keyData == (Keys.U)) //swap U-turn
        {
                                         
                SwapDirection();
                yt.ResetYouTurn();
                return true;
                            
        }

This does work :slight_smile:

1 Like