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.
Fork of Deplacement by
Revision 12:5459169b6a52, committed 2017-03-23
- Comitter:
- aure
- Date:
- Thu Mar 23 12:46:35 2017 +0000
- Parent:
- 11:5bc41c46cf28
- Commit message:
- fbuyfgygf
Changed in this revision
Deplacement.cpp | Show annotated file Show diff for this revision Revisions of this file |
Deplacement.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5bc41c46cf28 -r 5459169b6a52 Deplacement.cpp --- a/Deplacement.cpp Thu Mar 23 09:47:28 2017 +0000 +++ b/Deplacement.cpp Thu Mar 23 12:46:35 2017 +0000 @@ -60,7 +60,7 @@ } -void Deplacement::avancer(int temps) +void Deplacement::avancer(float temps) { m3piD.forward(this->vitesse); wait(temps); @@ -68,7 +68,7 @@ m3piD.stop(); } -void Deplacement::reculer(int temps) +void Deplacement::reculer(float temps) { m3piD.right(this->vitesse); wait(1.8); @@ -78,13 +78,13 @@ m3piD.stop(); } -void Deplacement::gauche(int temps){ +void Deplacement::gauche(float temps){ m3piD.left(this->vitesse); wait(0.9); avancer(temps); } -void Deplacement::droite(int temps){ +void Deplacement::droite(float temps){ m3piD.right(this->vitesse); wait(0.9); avancer(temps);
diff -r 5bc41c46cf28 -r 5459169b6a52 Deplacement.h --- a/Deplacement.h Thu Mar 23 09:47:28 2017 +0000 +++ b/Deplacement.h Thu Mar 23 12:46:35 2017 +0000 @@ -24,10 +24,10 @@ void setVitesse(float v); void tourner_droite(); //implementer temps rotation void tourner_gauche(); //implementer temps rotation - void gauche(int temps); - void droite(int temps); - void avancer(int temps); - void reculer(int temps); + void gauche(float temps); + void droite(float temps); + void avancer(float temps); + void reculer(float temps); void stop(); void tourner_droite_t(); void quartRotation();