Announcement

Collapse
No announcement yet.

Support for gamepad buttons under sticks?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Support for gamepad buttons under sticks?

    In RobotC, there was support for buttons under the left and right sticks on the gamepads. You could move the sticks up/down and left/right and also push them in to click on a button. Some of the teams I worked with used these buttons when driving (for example, to switch to a slow speed mode, etc.).

    For example, they were buttons 11 and 12 as shown in this image.

    In looking at the Gamepad class in the SDK, I don't see any support for these under-stick buttons. Can support for these buttons be added?

    Thanks for your consideration.

  • #2
    Hello Cheer4FTC,

    Unfortunately Android doesn't detect when these buttons are pressed on the Logitech F310.

    - Jonathan

    Comment


    • #3
      Thanks for trying.

      Comment


      • #4
        Originally posted by Jonathan Berling View Post
        Hello Cheer4FTC,

        Unfortunately Android doesn't detect when these buttons are pressed on the Logitech F310.

        - Jonathan
        Hi

        You may want to recheck this.
        My test app reports the two joystick buttons as:

        BUTTON_THUMBL and BUTTON_THUMBR

        It does this on Android 4.4 and 5.0

        Phil.

        Comment


        • #5
          Originally posted by Philbot View Post
          Hi

          You may want to recheck this.
          My test app reports the two joystick buttons as:

          BUTTON_THUMBL and BUTTON_THUMBR

          It does this on Android 4.4 and 5.0

          Phil.
          Which Android device did you test with?
          Last edited by Jonathan Berling; 06-27-2015, 10:12 PM.

          Comment


          • #6
            I also see the button events using tincore (a universal android joystick test program and driver). This is tested on a phone where the FTC app doesnot even recognize the f310.

            Jonathan, can you clarify the route of the USB data to the app? Are you using the android hid drivers and keymapping or are you reading low level USB packets and have you implemented your own driver on top of this?

            Comment


            • #7
              Originally posted by Jonathan Berling View Post
              Which Android device did you test with?
              This is a screen cap from a ZTE Speed.



              Phil.

              Comment


              • #8
                Hi Jonathan

                I'm wondering if your initial testing was performed with an earlier version of the ZTE Speed OS or something.

                My experience (only in the last month) with the ZTE SPEED and the F310 controller is that even without any apps loaded, it's hard to get the phone to STOP responding to the game controller.

                From a clean factory start, you can use the left joystick and XABY buttons to run the normal phone GUI if you like.
                Bring up the apps grid, and navigate it using the left Joystick. Run the app by hitting the blue X button.

                In the case of the test app that I captured above, all these inputs hit my test app through the Activitiy's dispatchKeyEvent() and dispatchGenericMotionEvent() methods.

                I have to explicitly NOT pass them on up the chain for the activity to action, otherwise they effect the menu and can even exit the app.

                Phil.

                Comment

                Working...
                X