From 6c24ad4df20a1270dd15aac0314b1d68ca167eef Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Thu, 1 May 2008 01:01:55 +0200 Subject: * digital/io/src - fix a bug to use the real moving direction of the bot (and not the possible one). --- digital/io/src/move_cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'digital/io') diff --git a/digital/io/src/move_cb.c b/digital/io/src/move_cb.c index 74a303a3..5b1c63a6 100644 --- a/digital/io/src/move_cb.c +++ b/digital/io/src/move_cb.c @@ -114,7 +114,7 @@ move_compute_obstacle_position (asserv_position_t cur, /* Convert the angle */ uint32_t angle = cur.a; /* Change angle when going backward */ - if (move_data.backward_movement_allowed) + if (asserv_get_moving_direction () == 2) angle += 0x8000; angle = angle << 8; DPRINTF ("We are at (%d ; %d ; %x)\n", cur.x, cur.y, cur.a); -- cgit v1.2.3