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/Robot.h@17:aae5361ddddf, 2019-06-04 (annotated)
- Committer:
- theolp
- Date:
- Tue Jun 04 17:25:49 2019 +0000
- Revision:
- 17:aae5361ddddf
- Parent:
- 16:05665faaa489
- Child:
- 19:dad67302af25
Odometrie position, dbug position, angles compris entre -180 et 180, fonction updateCAN. Bonne version.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Wael_H | 10:efa507ba2b35 | 1 | #ifndef ROBOT_H |
Wael_H | 10:efa507ba2b35 | 2 | #define ROBOT_H |
Wael_H | 10:efa507ba2b35 | 3 | |
Wael_H | 10:efa507ba2b35 | 4 | #include "Deplacement.h" |
Wael_H | 10:efa507ba2b35 | 5 | #include "Laser.h" |
Wael_H | 10:efa507ba2b35 | 6 | #include "Rouleau.h" |
Wael_H | 10:efa507ba2b35 | 7 | #include <string> |
Wael_H | 10:efa507ba2b35 | 8 | |
Wael_H | 10:efa507ba2b35 | 9 | using namespace std; |
Wael_H | 10:efa507ba2b35 | 10 | |
Wael_H | 10:efa507ba2b35 | 11 | class Robot |
Wael_H | 10:efa507ba2b35 | 12 | { |
Wael_H | 10:efa507ba2b35 | 13 | public: |
Wael_H | 10:efa507ba2b35 | 14 | Robot(); |
Wael_H | 10:efa507ba2b35 | 15 | bool aBalle(); |
theolp | 17:aae5361ddddf | 16 | short pos(int); |
Wael_H | 13:9c62e263f245 | 17 | |
Wael_H | 10:efa507ba2b35 | 18 | // Déplacements // |
Wael_H | 15:3d4543a6c100 | 19 | bool avance(signed short=2500); |
Wael_H | 15:3d4543a6c100 | 20 | bool tourne(signed short=3600); |
Wael_H | 15:3d4543a6c100 | 21 | bool GoToXYT(unsigned short, unsigned short, unsigned short, signed char sens=0); |
Wael_H | 15:3d4543a6c100 | 22 | void setSpeed(unsigned short vitesse, unsigned short acceleration) const; |
Wael_H | 13:9c62e263f245 | 23 | void stop(); |
Wael_H | 13:9c62e263f245 | 24 | |
Wael_H | 10:efa507ba2b35 | 25 | // Lasers // |
Wael_H | 13:9c62e263f245 | 26 | float getDist(int, string unite="cm"); |
Wael_H | 13:9c62e263f245 | 27 | |
Wael_H | 10:efa507ba2b35 | 28 | // Rouleau // |
Wael_H | 10:efa507ba2b35 | 29 | void ejecte(int); |
Wael_H | 10:efa507ba2b35 | 30 | void gobe(int); |
Wael_H | 10:efa507ba2b35 | 31 | void stopRouleau(); |
Wael_H | 10:efa507ba2b35 | 32 | |
theolp | 17:aae5361ddddf | 33 | // Enum pour les infos sur la position // |
theolp | 17:aae5361ddddf | 34 | enum {Y, X, THETA}; |
theolp | 17:aae5361ddddf | 35 | |
Wael_H | 10:efa507ba2b35 | 36 | private: |
Wael_H | 10:efa507ba2b35 | 37 | Deplacement deplacement; |
theolp | 17:aae5361ddddf | 38 | Laser laserG, laserD, laserA; //Lasers télémétriques du Robot |
Wael_H | 10:efa507ba2b35 | 39 | Rouleau rouleau; |
Wael_H | 10:efa507ba2b35 | 40 | DigitalIn BPs; |
Wael_H | 10:efa507ba2b35 | 41 | }; |
Wael_H | 10:efa507ba2b35 | 42 | |
Wael_H | 10:efa507ba2b35 | 43 | #endif //ROBOT_H |