summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-28 11:52:01 +0200
committerJérémy Dufour2008-04-28 11:52:01 +0200
commitf0233e89e7c8825cfcc0b389af47bd9d1883eadc (patch)
tree59699835bfd0fbec2dabfaf3d154f773e31a1b63 /digital/io/src
parentb53fd5bc4ae5ad3ccbdf76b3f73af4ce1ae1b782 (diff)
* digital/io/src
- add a command to open or close the rear panel.
Diffstat (limited to 'digital/io/src')
-rw-r--r--digital/io/src/main.c22
1 files changed, 17 insertions, 5 deletions
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;