View Single Post
  #2   Spotlight this post!  
Unread 04-19-2015, 12:54 PM
ghead ghead is offline
Registered User
FRC #3103
 
Join Date: Aug 2013
Location: US
Posts: 13
ghead is an unknown quantity at this point
Re: Button Layout on Dual Shock 4

Use the GetPOV() method of Joystck to get the current DPad reading. We've used something similar to this in the past::

Code:
switch (m_driveStick.GetPOV())
    {
        case 0:
            // Do Something - the 'up' button
            break;

        case 90:
            // Do Something - the 'right' button
            break;

        case 180:
            // Do Something - down
            break;

        case 270:
            // Do Something - left
            break;

        default:
            break;
    }
Reply With Quote