summaryrefslogtreecommitdiff
path: root/digital/io-hub/src
diff options
context:
space:
mode:
authorJerome Jutteau2013-04-02 00:39:34 +0200
committerJerome Jutteau2013-04-02 00:39:34 +0200
commit1ede732a9b2e592248c5c13fec2f111953f4a706 (patch)
treead37ccb7709b26643f129f070c054570a67e9757 /digital/io-hub/src
parent5bbf34872d8e052b31176a9d239cda7ca1cad7ec (diff)
digital/io-hub/src/apbirthday: add candles arm manipulation commands to proto
Diffstat (limited to 'digital/io-hub/src')
-rw-r--r--digital/io-hub/src/apbirthday/robot.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/digital/io-hub/src/apbirthday/robot.cc b/digital/io-hub/src/apbirthday/robot.cc
index 900a4fda..2e795c03 100644
--- a/digital/io-hub/src/apbirthday/robot.cc
+++ b/digital/io-hub/src/apbirthday/robot.cc
@@ -269,6 +269,20 @@ Robot::proto_handle (ucoo::Proto &proto, char cmd, const uint8_t *args, int size
stats_pressure_cpt_ = stats_pressure_ = args[0];
stats_proto_ = &proto;
break;
+ case c ('b', 2):
+ // Candles arm manipulation.
+ // - 1B: manipulate arm (0) or punchers (1)
+ // - 1B: action:
+ // * deploy arm (0)
+ // * undeploy arm (1)
+ // * candle value
+ if (args[0] == 0 && args[1] == 0)
+ FSM_HANDLE (AI, ai_candle_deploy);
+ else if (args[0] == 0 && args[1] == 1)
+ FSM_HANDLE (AI, ai_candle_deploy);
+ else
+ candles.blow (args[1]);
+ break;
default:
proto.send ('?');
return;