From c7fd6ddee848841984e3022ad16d0657c2e7275a Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Fri, 22 May 2009 04:53:50 +0200 Subject: * digital/io/src, digital/avr/modules/trace: - add trace for the position of the bot, - remove path update trace, - add support for trace with 7 parameters. --- digital/io/src/move_cb.c | 3 ++- digital/io/src/trace.trc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'digital/io/src') diff --git a/digital/io/src/move_cb.c b/digital/io/src/move_cb.c index 51883dad..15af0235 100644 --- a/digital/io/src/move_cb.c +++ b/digital/io/src/move_cb.c @@ -127,7 +127,6 @@ move_get_next_position (move_position_t *dst) /* Give the current position of the bot to the path module */ path_endpoints (current_pos.x, current_pos.y, move_data.final.x, move_data.final.y); - TRACE (TRACE_MOVE__PATH_UPDATE); /* Update the path module */ path_update (); @@ -151,6 +150,8 @@ move_get_next_position (move_position_t *dst) asserv_goto_xya (dst->x, dst->y, move_data.final.a, move_data.backward_movement_allowed); } + TRACE (TRACE_MOVE__GO_TO, (u16) current_pos.x, (u16) current_pos.y, + current_pos.a, dst->y, dst->y, move_data.final.a); /* Reset try counter. */ move_data.try_again_counter = 3; return 1; diff --git a/digital/io/src/trace.trc b/digital/io/src/trace.trc index aa556602..ac788d92 100644 --- a/digital/io/src/trace.trc +++ b/digital/io/src/trace.trc @@ -4,4 +4,4 @@ EVENT asserv__last_status_ack seq 1 status 1 "Asserv[0x%02x]: status: %x." EVENT main_timer__late "MainTimer: we are late." EVENT fsm__handle_event fsm 1 event 1 "FSM[%c]: handle event %i." EVENT fsm__handle_timeout fsm 1 "FSM[%c]: handle timeout." -EVENT move__path_update "Path: update." +EVENT move__go_to xs 2 ys 2 as 2 xd 2 yd 2 ad 2 "Move: (%d, %d, %x) -> (%d, %d, %x)." -- cgit v1.2.3