deplacement v6
Fork of Deplacement by
Diff: Deplacement.cpp
- Revision:
- 6:ad9dd32c18c7
- Parent:
- 5:327f0df4ba8e
- Child:
- 7:cc426369e073
--- a/Deplacement.cpp Thu Feb 09 14:35:28 2017 +0000 +++ b/Deplacement.cpp Thu Feb 09 16:14:08 2017 +0000 @@ -10,6 +10,12 @@ posx=0; posy=0; this->vitesse=0; //pointeur this + init(0.2); +} + +void Deplacement::init(float val){ + m3piD.right_motor(val); + m3piD.left_motor(val); } Deplacement::~Deplacement() @@ -45,7 +51,7 @@ void Deplacement::tourner_gauche() { - int copie=0; + int copie=0; t.reset(); t.start(); @@ -59,6 +65,7 @@ posx=copie; posx=-posy; posy=copie; + } void Deplacement::avancer() @@ -101,6 +108,13 @@ return(this->posy); } +void Deplacement::tourner_droite_t() +{ + + m3piD.left_motor(this->vitesse); + m3piD.right_motor(-(this->vitesse)); +} +