gamepad library
Fork of Gamepad by
Diff: Gamepad.cpp
- Revision:
- 4:bafb7f483e93
- Parent:
- 3:964a6d95acdd
- Child:
- 7:019671f7bd83
diff -r 964a6d95acdd -r bafb7f483e93 Gamepad.cpp --- a/Gamepad.cpp Mon Feb 06 19:33:29 2017 +0000 +++ b/Gamepad.cpp Mon Feb 06 19:40:40 2017 +0000 @@ -10,8 +10,6 @@ led_5 = new PwmOut(PTC4); led_6 = new PwmOut(PTD3); - joystick = new Joystick(PTB10,PTB11,PTC16); - button_A = new InterruptIn(PTB9); button_B = new InterruptIn(PTD0); button_X = new InterruptIn(PTC17); @@ -44,7 +42,6 @@ void Gamepad::init() { - lcd->init(); leds_off(); // read centred values of joystick @@ -215,7 +212,7 @@ return p.angle; } -Direction Joystick::get_direction() +Direction Gamepad::get_direction() { float angle = get_angle(); // 0 to 360, -1 for centred