From bbd0d642484b2865b8290e70e5b7c4ba45a41856 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 8 Apr 2013 22:14:52 +0200 Subject: digital/io-hub/src/apbirthday: change Asserv::get_position syntax --- digital/io-hub/src/apbirthday/top.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'digital/io-hub/src/apbirthday/top.cc') diff --git a/digital/io-hub/src/apbirthday/top.cc b/digital/io-hub/src/apbirthday/top.cc index 46c55a29..0f3f60f5 100644 --- a/digital/io-hub/src/apbirthday/top.cc +++ b/digital/io-hub/src/apbirthday/top.cc @@ -64,8 +64,7 @@ top_cake_angle (const vect_t &pos) static uint16_t top_cake_angle_robot () { - Position pos; - robot->asserv.get_position (pos); + Position pos = robot->asserv.get_position (); return top_cake_angle (pos.v); } @@ -142,8 +141,7 @@ top_follow_or_leave () bool top_follow_blocking (int dir_sign) { - Position robot_pos; - robot->asserv.get_position (robot_pos); + Position robot_pos = robot->asserv.get_position (); uint16_t robot_angle = top_cake_angle (robot_pos.v); // Check for an obstacle on a small segment. vect_t dst; -- cgit v1.2.3