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: mbed
Diff: Classes/NXPCam.h
- Revision:
- 2:1103f5d61035
- Parent:
- 1:a9af73d5abd4
- Child:
- 3:07109a6bb472
--- a/Classes/NXPCam.h Wed Feb 26 16:47:05 2020 +0000
+++ b/Classes/NXPCam.h Wed Mar 11 14:24:48 2020 +0000
@@ -4,14 +4,18 @@
#include "PIXY2.h"
#include "Vector.h"
-#define SCREEN_CENTER 39.5f // resolution : 79 - 52
+#define SCREEN_CENTER 39 // resolution : 79 - 52
#define INFO_NON_EXPLOITABLE 404
+#define COEFF_VIRAGE 80 // + il est élevé + on tourne dans les virages
+
class NXPCam
{
public:
NXPCam();
+ /// STRATEGIE 1 ///
+ void init();
/* Fonction qui renvoie une valeur entre -100 et 100 (à peu près)
* correspondant à l'écart de trajectoire entre la piste et
* le milieu de l'écran de la Pixy.
@@ -24,9 +28,16 @@
int getXinutile(int x0, int x1, int x2);
int getXinutile(int x0, int x1, int x2, int x0past, int x1past);
+ /// STRATEGIE 2 ///
+ Point getPointDir(Vector& v1, Vector& v2);
+
+ void affVectors() const;
+ void affDiffs() const;
+
private:
PIXY2 pixy;
Vector v1, v2, v3;
+ Vector v1past, v2past;
};
#endif // NXPCAM_H
\ No newline at end of file