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 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'i/chuck/src/es/es.cc') 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. } -- cgit v1.2.3