summaryrefslogtreecommitdiff
path: root/digital/asserv/src/asserv/twi_proto.c
diff options
context:
space:
mode:
authorNicolas Schodet2008-04-23 21:02:33 +0200
committerNicolas Schodet2008-04-23 21:02:33 +0200
commitb0e46d53dacdcc37dd4379c32fe886e5776f76c7 (patch)
treeb579095b3173c1fd925973f1335cacdb06a90dc0 /digital/asserv/src/asserv/twi_proto.c
parentbe1feaa0f9d7049efbeceb970ad6d7cc39988a68 (diff)
* digital/asserv/src/asserv:
- added backward goto commands.
Diffstat (limited to 'digital/asserv/src/asserv/twi_proto.c')
-rw-r--r--digital/asserv/src/asserv/twi_proto.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/digital/asserv/src/asserv/twi_proto.c b/digital/asserv/src/asserv/twi_proto.c
index 85ad6d2c..76639064 100644
--- a/digital/asserv/src/asserv/twi_proto.c
+++ b/digital/asserv/src/asserv/twi_proto.c
@@ -149,7 +149,15 @@ twi_proto_callback (u8 *buf, u8 size)
* - 3b: y position. */
traj_goto_start (v8_to_v32 (buf[2], buf[3], buf[4], 0),
v8_to_v32 (buf[5], buf[6], buf[7], 0),
- 0);
+ 0, 0);
+ break;
+ case c ('r', 6):
+ /* Go to position, backward allowed.
+ * - 3b: x position.
+ * - 3b: y position. */
+ traj_goto_start (v8_to_v32 (buf[2], buf[3], buf[4], 0),
+ v8_to_v32 (buf[5], buf[6], buf[7], 0),
+ 1, 0);
break;
case c ('y', 2):
/* Go to angle.
@@ -164,7 +172,17 @@ twi_proto_callback (u8 *buf, u8 size)
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);
+ 0, 0);
+ break;
+ case c ('R', 8):
+ /* Go to position, then angle, backward allowed.
+ * - 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),
+ 1, 0);
break;
case c ('b', 3):
/* Move the arm.