The project is not done yet
Dependencies: USBHost USBHostXpad mbed-rtos mbed
Fork of Totaleprogramma by
utils.h@1:da390b3b1330, 2015-03-02 (annotated)
- Committer:
- juliandekker
- Date:
- Mon Mar 02 10:58:30 2015 +0000
- Revision:
- 1:da390b3b1330
- Parent:
- 0:345f76c72b9a
xbox controller robot
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
347467 | 0:345f76c72b9a | 1 | |
347467 | 0:345f76c72b9a | 2 | #ifndef utilshhh |
347467 | 0:345f76c72b9a | 3 | #define utilshhh |
347467 | 0:345f76c72b9a | 4 | |
347467 | 0:345f76c72b9a | 5 | |
347467 | 0:345f76c72b9a | 6 | double ghettoFloor(double d); |
347467 | 0:345f76c72b9a | 7 | double round(double d); |
347467 | 0:345f76c72b9a | 8 | |
347467 | 0:345f76c72b9a | 9 | float xpadNormalizeAnalog(int x); |
347467 | 0:345f76c72b9a | 10 | float xpadNormalizeTrigger(int x); |
347467 | 0:345f76c72b9a | 11 | struct Xbox360ControllerState{ |
347467 | 0:345f76c72b9a | 12 | int buttons; |
347467 | 0:345f76c72b9a | 13 | int analogLeftX; |
347467 | 0:345f76c72b9a | 14 | int analogLeftY; |
347467 | 0:345f76c72b9a | 15 | int analogRightX; |
347467 | 0:345f76c72b9a | 16 | int analogRightY; |
347467 | 0:345f76c72b9a | 17 | int triggerLeft; |
347467 | 0:345f76c72b9a | 18 | int triggerRight; |
347467 | 0:345f76c72b9a | 19 | Xbox360ControllerState(){}; |
347467 | 0:345f76c72b9a | 20 | Xbox360ControllerState(int buttons, int stick_lx, int stick_ly, int stick_rx, int stick_ry, int trigger_l, int trigger_r) |
347467 | 0:345f76c72b9a | 21 | : buttons(buttons), analogLeftX(stick_lx), analogLeftY(stick_ly), analogRightX(stick_rx), analogRightY(stick_ry), triggerLeft(trigger_l), triggerRight(trigger_r) |
347467 | 0:345f76c72b9a | 22 | {} |
347467 | 0:345f76c72b9a | 23 | }; |
347467 | 0:345f76c72b9a | 24 | |
347467 | 0:345f76c72b9a | 25 | |
347467 | 0:345f76c72b9a | 26 | #endif |