summaryrefslogtreecommitdiff
path: root/digital/asserv/src/asserv/twi_proto.c
diff options
context:
space:
mode:
authorNicolas Schodet2008-04-20 19:18:20 +0200
committerNicolas Schodet2008-04-20 19:18:20 +0200
commit0f5fb480d954339158033be901a19f15c3815847 (patch)
treede10f60e720d642d48afde6416b08246fc1a9a33 /digital/asserv/src/asserv/twi_proto.c
parent1457b88a0acdda5835e9bba8251acb1205435467 (diff)
* digital/asserv/src/asserv:
- added goto_xya command. - reduced the goto_angle proto parameter size. * digital/io/doc: - added goto_xya command. * digital/asserv/tools: - added goto_xya command.
Diffstat (limited to 'digital/asserv/src/asserv/twi_proto.c')
-rw-r--r--digital/asserv/src/asserv/twi_proto.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/digital/asserv/src/asserv/twi_proto.c b/digital/asserv/src/asserv/twi_proto.c
index 171a6895..c7564766 100644
--- a/digital/asserv/src/asserv/twi_proto.c
+++ b/digital/asserv/src/asserv/twi_proto.c
@@ -139,7 +139,7 @@ twi_proto_callback (u8 *buf, u8 size)
/* Go to the dispenser. */
traj_gtd_start (0);
break;
- case c ('x', 0):
+ case c ('x', 6):
/* Go to position.
* - 3b: x position.
* - 3b: y position. */
@@ -147,11 +147,21 @@ twi_proto_callback (u8 *buf, u8 size)
v8_to_v32 (buf[5], buf[6], buf[7], 0),
0);
break;
- case c ('y', 0):
+ case c ('y', 2):
/* Go to angle.
* - w: angle. */
traj_goto_angle_start (v8_to_v32 (0, buf[2], buf[3], 0), 0);
break;
+ case c ('X', 8):
+ /* Go to position, then angle.
+ * - 3b: x position.
+ * - 3b: y position.
+ * - w: angle. */
+ traj_goto_xya_start (v8_to_v32 (buf[2], buf[3], buf[4], 0),
+ v8_to_v32 (buf[5], buf[6], buf[7], 0),
+ v8_to_v32 (0, buf[8], buf[9], 0),
+ 0);
+ break;
case c ('b', 3):
/* Move the arm.
* - w: new position.