From 15d37c37024b67ae275f8b8ff7124eba2e468c77 Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Sat, 27 Apr 2013 14:52:49 +0200 Subject: digital/io-hub/src/apbirthday: fix candles timeout and proto callback test --- digital/io-hub/src/apbirthday/candles.cc | 4 ++-- digital/io-hub/src/apbirthday/robot.cc | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'digital/io-hub') 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) -- cgit v1.2.3