From 3d2da1ff79576010ede40a87679b75dd421db819 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 16 May 2012 17:13:23 +0200 Subject: digital/beacon: convert int to uint16_t --- digital/beacon/src/position.c | 3 ++- digital/beacon/src/position.h | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'digital/beacon/src') diff --git a/digital/beacon/src/position.c b/digital/beacon/src/position.c index 96bfb5e6..75fbad48 100644 --- a/digital/beacon/src/position.c +++ b/digital/beacon/src/position.c @@ -55,7 +55,8 @@ void init_struct(void) } } -int update_position(int beaconID, int angleID, double angle) +/* This function update the opponent position when a new angle is avalaible */ +int update_position(uint16_t beaconID, uint16_t angleID, float angle) { static int last_ID[2] = {0}; int last_valid_id = 0; diff --git a/digital/beacon/src/position.h b/digital/beacon/src/position.h index c5052fda..215c64ba 100644 --- a/digital/beacon/src/position.h +++ b/digital/beacon/src/position.h @@ -53,16 +53,16 @@ typedef enum{ /* Beacon Structure */ typedef struct { - int angleNumber; + uint16_t angleNumber; float angle[MAX_OBSTACLE+1]; }beacon_s; /* Obstacle structure */ typedef struct { - int x; - int y; - int trust; + int16_t x; + int16_t y; + int8_t trust; }opponent_s; /* Coordinates structure */ -- cgit v1.2.3