summaryrefslogtreecommitdiff
path: root/i/chuck/src/es/es.cc
diff options
context:
space:
mode:
Diffstat (limited to 'i/chuck/src/es/es.cc')
-rw-r--r--i/chuck/src/es/es.cc40
1 files changed, 22 insertions, 18 deletions
diff --git a/i/chuck/src/es/es.cc b/i/chuck/src/es/es.cc
index 12a6f3d..452e689 100644
--- a/i/chuck/src/es/es.cc
+++ b/i/chuck/src/es/es.cc
@@ -83,8 +83,6 @@ Es::reset (void)
setAckStat (ackFreq_);
setOthersStat (othersStat_);
lcdGetKey (lcdKeyStat_);
-
- enableAllSensors (true);
log_ ("Es", Log::debug) << "Reset Es done.";
}
@@ -124,16 +122,6 @@ Es::isColorModeBlue (void)
return colorModeBlue_;
}
-/// Enable all the sensors or just the 4 and 1 near the ground
-void
-Es::enableAllSensors (bool enable)
-{
- if (enable)
- proto_.send ('u', "b", 1);
- else
- proto_.send ('u', "b", 0);
-}
-
/// Set frequency of jack, selectoul printed out function
void
Es::setOthersStat (int freq)
@@ -141,11 +129,11 @@ Es::setOthersStat (int freq)
proto_.send ('O', "b", freq);
}
-// Discute avec les servo...
-void Es::setServoPos (int servo_mask, int servoPos)
-{
- proto_.send ('m', "bb", servo_mask, servoPos);
-}
+
+
+
+
+
/// Set update frequency of sharps
void
@@ -188,7 +176,7 @@ Es::lcdGetKey (int freq)
void Es::receive(char command, const Proto::Frame & frame)
{
- int errCode, red, blue, clear, green, compt, value;
+ int errCode, clear, compt, value;
int stat1, stat2, stat3, stat4;
switch (command)
@@ -242,6 +230,22 @@ void Es::receive(char command, const Proto::Frame & frame)
sharps_[compt] = value;
}
break;
+ }
+}
+
+//Activation du truk ki monte et descend.
+void
+Es::bouge_ascenceur(int sens,uint8_t vit,uint8_t tps)
+{
+ if (sens == UP)
+ {
+ proto_.send('a',"bbb",vit,tps,0x01);
+ }
+ if (sens == DOWN)
+ {
+ proto_.send('a',"bbb",vit,tps,0x00);
}
+ //faire un static pour savoir la dernière commande.
+ //permettra de faire l'inverse en automatique.
}