Skip to content

Instantly share code, notes, and snippets.

@foosel
Last active December 17, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foosel/340663399b9f812c759f to your computer and use it in GitHub Desktop.
Save foosel/340663399b9f812c759f to your computer and use it in GitHub Desktop.
Crazyflie input mapping for XBox360 controller on Raspberry Pi using xboxdrv. Maps left analog stick to Pitch and Roll, right analog stick to Yaw, right shoulder trigger to Thrust, trimming for Pitch and Roll to the button pad, killswitch to "start" and exit app to "back". For Win7 version (has different axis enumeration for whatever reason) see…
{
"inputconfig": {
"inputdevice": {
"updateperiod": 10,
"name": "foosel",
"axis": [
{
"scale": 1.0,
"type": "Input.AXIS",
"name": "thrust",
"key": "thrust",
"id": 4
},
{
"scale": 1.0,
"type": "Input.AXIS",
"name": "yaw",
"key": "yaw",
"id": 2
},
{
"scale": 1.0,
"type": "Input.AXIS",
"name": "roll",
"key": "roll",
"id": 0
},
{
"scale": -1.0,
"type": "Input.AXIS",
"name": "pitch",
"key": "pitch",
"id": 1
},
{
"scale": -1.0,
"type": "Input.BUTTON",
"id": 0,
"key": "pitchcal",
"name": "pitchNeg"
},
{
"scale": 1.0,
"type": "Input.BUTTON",
"id": 3,
"key": "pitchcal",
"name": "pitchPos"
},
{
"scale": 1.0,
"type": "Input.BUTTON",
"id": 7,
"key": "estop",
"name": "killswitch"
},
{
"scale": -1.0,
"type": "Input.BUTTON",
"id": 2,
"key": "rollcal",
"name": "rollNeg"
},
{
"scale": 1.0,
"type": "Input.BUTTON",
"id": 1,
"key": "rollcal",
"name": "rollPos"
},
{
"scale": 1.0,
"type": "Input.BUTTON",
"id": 6,
"key": "exit",
"name": "exitapp"
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment