Skip to content

Commit

Permalink
Merge pull request #1 from keenanlang/patch-1
Browse files Browse the repository at this point in the history
Add support for Joystick and Controller
  • Loading branch information
prjemian committed Mar 30, 2016
2 parents b297cc6 + 2fe9456 commit 927d024
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
21 changes: 21 additions & 0 deletions edgeRoboArmIOC/support/usb-1-0/usbApp/Db/LogitechATKIII.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#Logitech ATK III Joystick Vendor: 0x046D Product: 0xC214

#Joystick
HORIZONTAL_STATE [0] -> UInt8
VERTICAL_STATE [1] -> UInt8

#Toggle
SWITCH_STATE [2] -> UInt8

#Buttons
TRIGGER_PRESSED [3] -> Bool /0x01
BUTTON2_PRESSED [3] -> Bool /0x02
BUTTON3_PRESSED [3] -> Bool /0x04
BUTTON4_PRESSED [3] -> Bool /0x08
BUTTON5_PRESSED [3] -> Bool /0x10
BUTTON6_PRESSED [3] -> Bool /0x20
BUTTON7_PRESSED [3] -> Bool /0x40
BUTTON8_PRESSED [3] -> Bool /0x80
BUTTON9_PRESSED [4] -> Bool /0x01
BUTTON10_PRESSED [4] -> Bool /0x02
BUTTON11_PRESSED [4] -> Bool /0x04
25 changes: 25 additions & 0 deletions edgeRoboArmIOC/support/usb-1-0/usbApp/Db/LogitechDualAction.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#Logitech Dual Action Controller Vendor: 0x046D Product: 0xC216

#Joystick
LSTICK_LR_STATE [0] -> UInt8
LSTICK_UD_STATE [1] -> UInt8
RSTICK_LR_STATE [2] -> UInt8
RSTICK_UD_STATE [3] -> UInt8

#DPAD
DPAD_STATE [4] -> UInt8 /0x0F

#Buttons
BUTTON1_PRESSED [4] -> Bool /0x10
BUTTON2_PRESSED [4] -> Bool /0x20
BUTTON3_PRESSED [4] -> Bool /0x40
BUTTON4_PRESSED [4] -> Bool /0x80

BUTTON5_PRESSED [5] -> Bool /0x01
BUTTON6_PRESSED [5] -> Bool /0x02
BUTTON7_PRESSED [5] -> Bool /0x04
BUTTON8_PRESSED [5] -> Bool /0x08
BUTTON9_PRESSED [5] -> Bool /0x10
BUTTON10_PRESSED [5] -> Bool /0x20
LSTICK_PRESSED [5] -> Bool /0x40
RSTICK_PRESSED [5] -> Bool /0x80

0 comments on commit 927d024

Please sign in to comment.