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.
Revision 4:bafb7f483e93, committed 2017-02-06
- Comitter:
- eencae
- Date:
- Mon Feb 06 19:40:40 2017 +0000
- Parent:
- 3:964a6d95acdd
- Child:
- 5:ce5eae9ee934
- Commit message:
- Removed references to LCD and Joystick libraries.
Changed in this revision
| Gamepad.cpp | Show annotated file Show diff for this revision Revisions of this file |
| Gamepad.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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
--- a/Gamepad.h Mon Feb 06 19:33:29 2017 +0000
+++ b/Gamepad.h Mon Feb 06 19:40:40 2017 +0000
@@ -101,7 +101,6 @@
Vector2D get_coord(); // cartesian co-ordinates x,y
Vector2D get_mapped_coord(); // x,y mapped to circle
- Direction get_direction(); // N,NE,E,SE etc.
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;