summaryrefslogtreecommitdiff
path: root/i/chuck/src/es
diff options
context:
space:
mode:
Diffstat (limited to 'i/chuck/src/es')
-rw-r--r--i/chuck/src/es/es.cc15
-rw-r--r--i/chuck/src/es/es.hh2
2 files changed, 9 insertions, 8 deletions
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