From 32a21a69bb7adb44c4fc91d025ad8f0ccdaf45a1 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Tue, 31 May 2011 15:07:25 +0200 Subject: digital/io-hub: remove special case for green elements --- digital/io-hub/src/robospierre/element.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'digital/io-hub/src/robospierre/element.c') diff --git a/digital/io-hub/src/robospierre/element.c b/digital/io-hub/src/robospierre/element.c index bc76a2b0..71f754e0 100644 --- a/digital/io-hub/src/robospierre/element.c +++ b/digital/io-hub/src/robospierre/element.c @@ -706,24 +706,21 @@ element_opposed (uint8_t element_id) return op; } -position_t +vect_t element_get_pos (uint8_t element_id) { element_t e = element_get (element_id); - position_t pos; - pos.v = e.pos; - pos.a = 0xffff; + vect_t pos; + pos = e.pos; if (e.attr == (ELEMENT_GREEN |ELEMENT_RIGHT)) { /* To the right. */ - pos.a = 0x0000; - pos.v.x = PG_WIDTH - BOT_GREEN_ELEMENT_PLACE_DISTANCE_MM; + pos.x = PG_WIDTH - BOT_GREEN_ELEMENT_DISTANCE_MM; } if (e.attr == (ELEMENT_GREEN |ELEMENT_LEFT)) { /* To the left. */ - pos.a = 0x8000; - pos.v.x = BOT_GREEN_ELEMENT_PLACE_DISTANCE_MM; + pos.x = BOT_GREEN_ELEMENT_DISTANCE_MM; } return pos; } -- cgit v1.2.3