This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
misc:hacks:rasberrypi [2013-05-21 13:48] foosel [Make the client startup automatically on Crazyradio plug in] |
misc:hacks:rasberrypi [2013-06-09 23:31] absoloodle37 Clarified how to create the cfheadless and xbox360 executable files in the /root/bin folder |
||
---|---|---|---|
Line 81: | Line 81: | ||
INFO: | INFO: | ||
INFO: | INFO: | ||
+ | </ | ||
+ | |||
+ | **Note**: If you have more than one controller attached, you can select the one to use using the commandline parameter '' | ||
+ | |||
+ | < | ||
+ | usage: cfheadless [-h] [-u URI] [-i INPUT] [-d] [-c CONTROLLER] | ||
+ | [--controllers] | ||
+ | |||
+ | optional arguments: | ||
+ | -h, --help | ||
+ | -u URI, --uri URI URI to use for connection to the Crazyradio dongle, | ||
+ | defaults to radio:// | ||
+ | -i INPUT, --input INPUT | ||
+ | Input mapping to use for the controller, defaults to | ||
+ | PS3_Mode_1 | ||
+ | -d, --debug | ||
+ | -c CONTROLLER, --controller CONTROLLER | ||
+ | Use controller with specified id, id defaults to 0 | ||
+ | --controllers | ||
</ | </ | ||
Line 96: | Line 115: | ||
* Still dependent on QT (the plan is to remove this very soon) | * Still dependent on QT (the plan is to remove this very soon) | ||
* Not much error handling yet (the plan is to improve this) | * Not much error handling yet (the plan is to improve this) | ||
- | * Values are still hardcoded in the script (like mapping and URI for Crazyflie). They can be changed at the bottom in lib/ | + | * <del>Values are still hardcoded in the script (like mapping and URI for Crazyflie). They can be changed at the bottom in lib/ |
- | * The headless client will open the first input-device found (so don't plug more than one) | + | * <del>The headless client will open the first input-device found (so don't plug more than one)</ |
* No good way to quit it yet so you will have to kill the process | * No good way to quit it yet so you will have to kill the process | ||
===== Make the client startup automatically on Crazyradio plug in ===== | ===== Make the client startup automatically on Crazyradio plug in ===== | ||
Line 115: | Line 134: | ||
if test " | if test " | ||
then | then | ||
- | / | + | / |
echo $! > / | echo $! > / | ||
else | else | ||
Line 127: | Line 146: | ||
</ | </ | ||
- | Don't forget to make it executable: '' | + | You can only create the cfheadless file above in the /root/bin/ folder by being root--not pi or any other user name. Switch to root by typing: sudo -i and then navigating to the /root/bin/ folder: cd / |
And for the XBox360 Controller (after an " | And for the XBox360 Controller (after an " |