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
Classes/NXPCam.h@0:8743b606abc3, 2020-02-11 (annotated)
- Committer:
- Wael_H
- Date:
- Tue Feb 11 15:41:45 2020 +0000
- Revision:
- 0:8743b606abc3
- Child:
- 1:a9af73d5abd4
Version direction a peu pres
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Wael_H | 0:8743b606abc3 | 1 | #ifndef NXPCAM_H |
| Wael_H | 0:8743b606abc3 | 2 | #define NXPCAM_H |
| Wael_H | 0:8743b606abc3 | 3 | |
| Wael_H | 0:8743b606abc3 | 4 | #include "PIXY2.h" |
| Wael_H | 0:8743b606abc3 | 5 | #include "Vector.h" |
| Wael_H | 0:8743b606abc3 | 6 | |
| Wael_H | 0:8743b606abc3 | 7 | #define SCREEN_CENTER 39.5f // resolution : 79 - 52 |
| Wael_H | 0:8743b606abc3 | 8 | #define INFO_NON_EXPLOITABLE 404 |
| Wael_H | 0:8743b606abc3 | 9 | |
| Wael_H | 0:8743b606abc3 | 10 | class NXPCam |
| Wael_H | 0:8743b606abc3 | 11 | { |
| Wael_H | 0:8743b606abc3 | 12 | public: |
| Wael_H | 0:8743b606abc3 | 13 | NXPCam(); |
| Wael_H | 0:8743b606abc3 | 14 | |
| Wael_H | 0:8743b606abc3 | 15 | /* Fonction qui renvoie une valeur entre -100 et 100 (à peu près) |
| Wael_H | 0:8743b606abc3 | 16 | * correspondant à l'écart de trajectoire entre la piste et |
| Wael_H | 0:8743b606abc3 | 17 | * le milieu de l'écran de la Pixy. |
| Wael_H | 0:8743b606abc3 | 18 | * La valeur est positive lorsque la voiture est trop à droite |
| Wael_H | 0:8743b606abc3 | 19 | * et négative lorsqu'elle est trop à gauche */ |
| Wael_H | 0:8743b606abc3 | 20 | int getDeviationTrajectoire(); |
| Wael_H | 0:8743b606abc3 | 21 | int getNormeVecteurs(); |
| Wael_H | 0:8743b606abc3 | 22 | |
| Wael_H | 0:8743b606abc3 | 23 | private: |
| Wael_H | 0:8743b606abc3 | 24 | PIXY2 pixy; |
| Wael_H | 0:8743b606abc3 | 25 | Vector v1, v2; |
| Wael_H | 0:8743b606abc3 | 26 | }; |
| Wael_H | 0:8743b606abc3 | 27 | |
| Wael_H | 0:8743b606abc3 | 28 | #endif // NXPCAM_H |