summaryrefslogtreecommitdiff
path: root/digital/beacon/src/position.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/beacon/src/position.c')
-rw-r--r--digital/beacon/src/position.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/digital/beacon/src/position.c b/digital/beacon/src/position.c
index 75fbad48..f3320321 100644
--- a/digital/beacon/src/position.c
+++ b/digital/beacon/src/position.c
@@ -153,4 +153,26 @@ int update_position(uint16_t beaconID, uint16_t angleID, float angle)
last_ID[0] = beaconID;
}
return 0;
+}
+
+/* This function returns the requested coord according to the opponent number */
+int16_t position_get_coord(TOpponent_ID id, TCoord_type type)
+{
+ switch(type)
+ {
+ case X:
+ return opponent[id].x;
+ break;
+ case Y:
+ return opponent[id].y;
+ break;
+ default:
+ return 0;
+ }
+}
+
+/* This function returns the trust according to opponent number */
+int8_t position_get_trust(TOpponent_ID id)
+{
+ return opponent[id].trust;
} \ No newline at end of file