From 3c39fcfa75ee61b2c823f96d57ecb0891062d5d0 Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Thu, 1 May 2008 02:35:40 +0200 Subject: * digital/io/src - add flag for homologation to stop the bot when it finds an obstacle rather than trying to avoid it. --- digital/io/src/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'digital/io/src/main.c') diff --git a/digital/io/src/main.c b/digital/io/src/main.c index b40eefd5..7d323ea6 100644 --- a/digital/io/src/main.c +++ b/digital/io/src/main.c @@ -75,6 +75,12 @@ uint8_t main_post_event_for_top_fsm = 0xFF; */ uint16_t main_sharp_ignore_event; +/** + * Flag for homologation, to disable the path finding and always stop in front + * of an obstacle and wait. + */ +uint8_t main_always_stop_for_obstacle; + /** * Post an event for the main loop to wake up the move FSM in a certain count * of cycles. @@ -571,6 +577,15 @@ proto_callback (uint8_t cmd, uint8_t size, uint8_t *args) } } break; + case c ('o', 1): + { + /* Omo-logo-ation flag, to prevent avoiding obstacle and stop + * instead. + * - 1b: state of the flag (0 to disable, 1 to enable). + */ + main_always_stop_for_obstacle = args[0]; + } + break; default: /* Unknown commands */ proto_send0 ('?'); -- cgit v1.2.3