summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/main.c
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-24 17:29:13 +0200
committerJérémy Dufour2008-04-24 17:29:13 +0200
commit800e0f783b82824fdd3c3ef8ea25aed970555f24 (patch)
tree2cae4a7770a1cf0af59d55f8108a077e4f984ee3 /digital/io/src/main.c
parent1989b182606142ed199a4d94c013778142612843 (diff)
* digital/io/src
- add goto an absolute position command over UART.
Diffstat (limited to 'digital/io/src/main.c')
-rw-r--r--digital/io/src/main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/digital/io/src/main.c b/digital/io/src/main.c
index c0699f61..99967b6e 100644
--- a/digital/io/src/main.c
+++ b/digital/io/src/main.c
@@ -324,7 +324,21 @@ proto_callback (uint8_t cmd, uint8_t size, uint8_t *args)
}
}
break;
-
+ case c ('a', 9):
+ {
+ switch (args[0])
+ {
+ case 'x':
+ /* Go to an absolute position (X,Y) in mm.
+ * - 4b: x;
+ * - 4b: y.
+ */
+ asserv_goto (v8_to_v32 (args[1], args[2], args[3], args[4]),
+ v8_to_v32 (args[5], args[6], args[7], args[8]));
+ break;
+ }
+ }
+ break;
default:
/* Unknown commands */
proto_send0 ('?');