From f0233e89e7c8825cfcc0b389af47bd9d1883eadc Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Mon, 28 Apr 2008 11:52:01 +0200 Subject: * digital/io/src - add a command to open or close the rear panel. --- digital/io/src/main.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'digital/io/src') diff --git a/digital/io/src/main.c b/digital/io/src/main.c index 07c94eae..d36043a9 100644 --- a/digital/io/src/main.c +++ b/digital/io/src/main.c @@ -250,12 +250,24 @@ proto_callback (uint8_t cmd, uint8_t size, uint8_t *args) break; case c ('T', 1): - /* Setup traps to open a path to a destination box. - * - 1b: box identification - */ - trap_setup_path_to_box (args[0]); + { + /* Setup traps to open a path to a destination box. + * - 1b: box identification + */ + switch (args[0]) + { + case 'o': + trap_open_rear_panel (); + break; + case 'c': + trap_close_rear_panel (); + break; + default: + trap_setup_path_to_box (args[0]); + break; + } + } break; - case c ('s', 2): /* Set servo motor to a desired position using the servo module. * - 1b: servo id number; -- cgit v1.2.3