Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: USBHost USBHostXpad mbed-rtos mbed
Fork of x4180_Tank by
utils.h
- Committer:
- hotwheelharry
- Date:
- 2014-11-26
- Revision:
- 3:c1620db50a75
- Parent:
- 0:79485480cd7e
File content as of revision 3:c1620db50a75:
#ifndef utilshhh #define utilshhh double ghettoFloor(double d); double round(double d); float xpadNormalizeAnalog(int x); float xpadNormalizeTrigger(int x); struct Xbox360ControllerState{ int buttons; int analogLeftX; int analogLeftY; int analogRightX; int analogRightY; int triggerLeft; int triggerRight; Xbox360ControllerState(){}; Xbox360ControllerState(int buttons, int stick_lx, int stick_ly, int stick_rx, int stick_ry, int trigger_l, int trigger_r) : buttons(buttons), analogLeftX(stick_lx), analogLeftY(stick_ly), analogRightX(stick_rx), analogRightY(stick_ry), triggerLeft(trigger_l), triggerRight(trigger_r) {} }; #endif