From f17f84ea7c045ce1b56416a008edaa411ff749cc Mon Sep 17 00:00:00 2001 From: becquet Date: Thu, 17 May 2007 10:14:02 +0000 Subject: --- i/chuck/src/es/es.cc | 15 ++++++++------- i/chuck/src/es/es.hh | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'i/chuck/src/es') diff --git a/i/chuck/src/es/es.cc b/i/chuck/src/es/es.cc index e1ea228..668aab1 100644 --- a/i/chuck/src/es/es.cc +++ b/i/chuck/src/es/es.cc @@ -240,16 +240,17 @@ void Es::receive(char command, const Proto::Frame & frame) //Activation du truk ki monte et descend. void -Es::bouge_ascenceur(int sens,uint8_t vit,uint8_t tps) +Es::bouge_ascenceur(uint8_t vit,uint8_t tps,uint8_t sens) { - if (sens == UP) - { - proto_.send('a',"bbb",vit,tps,0x01); - } - if (sens == DOWN) + + proto_.send('a',"bbb",vit,tps,0x00); + for(int cpt=0;cpt<5;cpt++) { - proto_.send('a',"bbb",vit,tps,0x00); + proto_.send('a',"bbb",0xFF,0x05,0x01); + proto_.send('a',"bbb",0xFF,0x05,0x00); } + proto_.send('a',"bbb",vit,tps,0x01); + proto_.send('a',"bbb",vit,tps,0x01); //faire un static pour savoir la dernière commande. //permettra de faire l'inverse en automatique. } diff --git a/i/chuck/src/es/es.hh b/i/chuck/src/es/es.hh index 94470eb..f5eeff4 100644 --- a/i/chuck/src/es/es.hh +++ b/i/chuck/src/es/es.hh @@ -120,7 +120,7 @@ class Es : public Proto::Receiver void lcdGetKey (int freq); ///Activé l'assenceur - void bouge_ascenceur(int sens,uint8_t vit,uint8_t tps); + void bouge_ascenceur(uint8_t vit,uint8_t tps,uint8_t sens); ///rotate Left or Right int setcolorsens(void); //a finir pour def le vit -- cgit v1.2.3