deplacement v6
Fork of Deplacement by
Deplacement.h@5:327f0df4ba8e, 2017-02-09 (annotated)
- Committer:
- fab16
- Date:
- Thu Feb 09 14:35:28 2017 +0000
- Revision:
- 5:327f0df4ba8e
- Parent:
- 4:bd8b50f91f81
- Child:
- 6:ad9dd32c18c7
v2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fab16 | 5:327f0df4ba8e | 1 | #include "m3pi.h" |
aure | 1:662d3c47637f | 2 | #include "mbed.h" |
aure | 0:d6b2da5ef6cb | 3 | |
fab16 | 5:327f0df4ba8e | 4 | class Deplacement |
aure | 0:d6b2da5ef6cb | 5 | { |
fab16 | 5:327f0df4ba8e | 6 | protected: |
fab16 | 5:327f0df4ba8e | 7 | |
fab16 | 5:327f0df4ba8e | 8 | int posx; |
fab16 | 5:327f0df4ba8e | 9 | int posy; |
fab16 | 5:327f0df4ba8e | 10 | float vitesse; |
fab16 | 5:327f0df4ba8e | 11 | |
fab16 | 5:327f0df4ba8e | 12 | |
fab16 | 5:327f0df4ba8e | 13 | private: |
fab16 | 5:327f0df4ba8e | 14 | |
fab16 | 5:327f0df4ba8e | 15 | Timer t; |
fab16 | 5:327f0df4ba8e | 16 | int mseconds; |
fab16 | 5:327f0df4ba8e | 17 | |
fab16 | 5:327f0df4ba8e | 18 | |
fab16 | 5:327f0df4ba8e | 19 | public: |
aure | 0:d6b2da5ef6cb | 20 | |
fab16 | 5:327f0df4ba8e | 21 | Deplacement();//constructeur; |
fab16 | 5:327f0df4ba8e | 22 | ~Deplacement(); |
fab16 | 5:327f0df4ba8e | 23 | /////////// |
fab16 | 5:327f0df4ba8e | 24 | void setVitesse(float v); |
fab16 | 5:327f0df4ba8e | 25 | void tourner_droite(); //implementer temps rotation |
fab16 | 5:327f0df4ba8e | 26 | void tourner_gauche(); //implementer temps rotation |
fab16 | 5:327f0df4ba8e | 27 | void avancer(); |
fab16 | 5:327f0df4ba8e | 28 | void reculer(); |
fab16 | 5:327f0df4ba8e | 29 | void stop(); |
fab16 | 5:327f0df4ba8e | 30 | |
fab16 | 5:327f0df4ba8e | 31 | float getVitesse(); |
fab16 | 5:327f0df4ba8e | 32 | int getPosX(); |
fab16 | 5:327f0df4ba8e | 33 | int getPosY(); |
fab16 | 5:327f0df4ba8e | 34 | void RAZ(); |
fab16 | 5:327f0df4ba8e | 35 | |
fab16 | 5:327f0df4ba8e | 36 | |
aure | 0:d6b2da5ef6cb | 37 | }; |