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: BSP_DISCO_F746NG F746_GUI LCD_DISCO_F746NG SDFileSystem TS_DISCO_F746NG ResistiveTouchController Map CYS8218Controller MedianFilter
Diff: main.cpp
- Revision:
- 44:560ed042317c
- Parent:
- 42:29ce1ff3b220
- Child:
- 45:e5b175383624
--- a/main.cpp Sat Oct 08 19:08:42 2016 +0000
+++ b/main.cpp Sat Oct 08 22:33:03 2016 +0200
@@ -1,6 +1,7 @@
#include "mbed.h"
#include "Screens.hpp"
#include "ResistiveTouchController.hpp"
+#include "Map.hpp"
//--- Function Prototypes
void GUIThread();
@@ -42,6 +43,7 @@
//-- Sensors and Actuator objects
ResistiveTouchController plate(A0,A1,A3,A4,A5);
+Map plateMapper(0,1024, -170,170);
float tCal[3][2];
int calPoint = 0;
@@ -190,8 +192,8 @@
if( ballOnPlate )
{
plate.Measure();
- x = plate.X();
- y = plate.Y();
+ x = plateMapper(floor(plate.X());
+ y = plateMapper(floor(plate.Y());
}
}