From e5955adc9c33cee7d2fdda723fb02a2af5e612be Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 7 May 2009 22:39:46 +0200 Subject: * digital/asserv: - added forward go to the wall. - use defines for contacts. --- digital/io/doc/proto_asserv.txt | 3 ++- digital/io/src/asserv.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'digital/io') diff --git a/digital/io/doc/proto_asserv.txt b/digital/io/doc/proto_asserv.txt index 391950dd..e6e43c5b 100644 --- a/digital/io/doc/proto_asserv.txt +++ b/digital/io/doc/proto_asserv.txt @@ -70,7 +70,8 @@ This table describe the list of supported commands by the *asserv* card: +---------+-------+-----------------+------------------------------------------+ | 'a' | Move | - angle (2b) | Angular move (0 <=> 0° ; 65536 <=> 360) | +---------+-------+-----------------+------------------------------------------+ -| 'f' | Move | None | Go to the wall (backward movement) | +| 'f' | Move | - direction (b) | Go to the wall | +| | | | - direction: 0 = forward, 1 = backward | +---------+-------+-----------------+------------------------------------------+ | 'F' | Move | None | Go to a distributor (forward movement) | +---------+-------+-----------------+------------------------------------------+ diff --git a/digital/io/src/asserv.c b/digital/io/src/asserv.c index a3175176..e6cbc1b4 100644 --- a/digital/io/src/asserv.c +++ b/digital/io/src/asserv.c @@ -455,8 +455,10 @@ asserv_goto_xya (uint32_t x, uint32_t y, int16_t a) void asserv_go_to_the_wall (void) { + /* Put direction as parameters */ + asserv_twi_buffer_param[0] = 1; /* Send the go the wall command to the asserv board */ - asserv_twi_send_command ('f', 0); + asserv_twi_send_command ('f', 1); } /* Move forward to approach a ditributor. */ -- cgit v1.2.3