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.
Diff: Gamepad.h
- Revision:
- 5:ce5eae9ee934
- Parent:
- 4:bafb7f483e93
- Child:
- 6:b1c3dfe67f7d
--- a/Gamepad.h Mon Feb 06 19:40:40 2017 +0000
+++ b/Gamepad.h Mon Feb 06 19:47:59 2017 +0000
@@ -52,12 +52,14 @@
bool r_pressed();
bool back_pressed();
bool start_pressed();
-
bool joystick_pressed();
+
float get_mag();
float get_angle();
Direction get_direction(); // N,NE,E,SE etc.
-
+ Vector2D get_coord(); // cartesian co-ordinates x,y
+ Vector2D get_mapped_coord(); // x,y mapped to circle
+ Polar get_polar(); // mag and angle in struct form
private:
@@ -99,10 +101,6 @@
void start_isr();
void joy_isr();
- Vector2D get_coord(); // cartesian co-ordinates x,y
- Vector2D get_mapped_coord(); // x,y mapped to circle
- Polar get_polar(); // mag and angle in struct form
-
bool a_flag,b_flag,x_flag,y_flag,l_flag,r_flag,back_flag,start_flag,joy_flag;
// centred x,y values