summaryrefslogtreecommitdiffhomepage
path: root/digital/io-hub
diff options
context:
space:
mode:
authorJerome Jutteau2013-04-27 14:52:49 +0200
committerJerome Jutteau2013-04-27 14:52:49 +0200
commit15d37c37024b67ae275f8b8ff7124eba2e468c77 (patch)
tree4f65be2dc81490f32f7ca7fac3fe753b9036b01e /digital/io-hub
parentb76f2df3c117ce3a61527fbc81c89e2164caa231 (diff)
digital/io-hub/src/apbirthday: fix candles timeout and proto callback test
Diffstat (limited to 'digital/io-hub')
-rw-r--r--digital/io-hub/src/apbirthday/candles.cc4
-rw-r--r--digital/io-hub/src/apbirthday/robot.cc6
2 files changed, 8 insertions, 2 deletions
diff --git a/digital/io-hub/src/apbirthday/candles.cc b/digital/io-hub/src/apbirthday/candles.cc
index c60281f4..b77f9773 100644
--- a/digital/io-hub/src/apbirthday/candles.cc
+++ b/digital/io-hub/src/apbirthday/candles.cc
@@ -297,12 +297,12 @@ FSM_TRANS (AI_CANDLE_READY, ai_candle_undeploy, AI_CANDLE_UNDEPLOYING)
Candles::undeploy_arm_1 ();
}
-FSM_TRANS_TIMEOUT (AI_CANDLE_UNDEPLOYING, 160, AI_CANDLE_UNDEPLOYING_2)
+FSM_TRANS_TIMEOUT (AI_CANDLE_UNDEPLOYING, 200, AI_CANDLE_UNDEPLOYING_2)
{
Candles::undeploy_arm_2 ();
}
-FSM_TRANS_TIMEOUT (AI_CANDLE_UNDEPLOYING_2, 56, AI_CANDLE_UNDEPLOYING_3)
+FSM_TRANS_TIMEOUT (AI_CANDLE_UNDEPLOYING_2, 42, AI_CANDLE_UNDEPLOYING_3)
{
Candles::undeploy_arm_3 ();
}
diff --git a/digital/io-hub/src/apbirthday/robot.cc b/digital/io-hub/src/apbirthday/robot.cc
index e5910d74..6a425085 100644
--- a/digital/io-hub/src/apbirthday/robot.cc
+++ b/digital/io-hub/src/apbirthday/robot.cc
@@ -336,9 +336,11 @@ Robot::proto_handle (ucoo::Proto &proto, char cmd, const uint8_t *args, int size
// - 01: near
// - 00: push
// - 01: unpush
+ // - 02: event push
// - 02: far
// - 00: push
// - 01: unpush
+ // - 02: event push
// - 03: deploying
// - 00: deploy
// - 01: undeploy 1
@@ -368,10 +370,14 @@ Robot::proto_handle (ucoo::Proto &proto, char cmd, const uint8_t *args, int size
Candles::push_near ();
else if (args[0] == 1 && args[1] == 1)
Candles::unpush_near ();
+ else if (args[0] == 1 && args[1] == 2)
+ FSM_HANDLE (AI, ai_candle_near_punch);
else if (args[0] == 2 && args[1] == 0)
Candles::push_far ();
else if (args[0] == 2 && args[1] == 1)
Candles::unpush_far ();
+ else if (args[0] == 2 && args[1] == 2)
+ FSM_HANDLE (AI, ai_candle_far_punch);
else if (args[0] == 3 && args[1] == 0)
Candles::deploy_arm ();
else if (args[0] == 3 && args[1] == 1)