summaryrefslogtreecommitdiff
path: root/digital/io/src/move.h
diff options
context:
space:
mode:
authorNélio Laranjeiro2008-04-27 11:35:03 +0200
committerNélio Laranjeiro2008-04-27 11:35:03 +0200
commita48c26a13614dab1af11d3a6b46a6dc0921e2756 (patch)
tree82deaa4498eff0dc588a304359ac9ddfb9e0f986 /digital/io/src/move.h
parentb666b54a8f8b6300c54d2776641897065f4470ac (diff)
move.fsm: Update the fsm to use the path finder.
* update the events in the main.c file. * update the move_cb.c * added some constants.
Diffstat (limited to 'digital/io/src/move.h')
-rw-r--r--digital/io/src/move.h37
1 files changed, 12 insertions, 25 deletions
diff --git a/digital/io/src/move.h b/digital/io/src/move.h
index 69a2975e..b5d2a483 100644
--- a/digital/io/src/move.h
+++ b/digital/io/src/move.h
@@ -27,17 +27,24 @@
#include "asserv.h"
-/* if the left border is under 500 mm of the actual position do not go there. */
-#define MOVE_BORDER_LEVEL 200
-
+#define MOVE_OBSTACLE_RADIUS 100
+#define MOVE_OBSTACLE_VALIDITY 650
/** move FSM associated data. */
struct move_data_t
{
/* Desired x position to reached. */
- uint32_t position_x;
+ uint16_t position_x;
/* Desired y position to reached. */
- uint32_t position_y;
+ uint16_t position_y;
+ /* number of obstacles seen. */
+ uint8_t nb_obstacle;
+ /* Path finder position x. */
+ uint16_t path_pos_x;
+ /* Path finder position y. */
+ uint16_t path_pos_y;
+ /* Position blocked. */
+ asserv_position_t pos_blocked_or_failed;
};
@@ -48,24 +55,4 @@ extern struct move_data_t move_data;
void
move_start (uint32_t position_x, uint32_t position_y);
-/** Verify if the position desired is in the table use when the robot tries to
- * reach a point and a obstacle is in front of it.
- * \param pos the robot's current position on the table.
- * \param new_pos the position computed to go to.
- * \return true if the it can reach the position.
- */
-uint8_t
-move_can_go_on_left_or_right (asserv_position_t current_pos,
- asserv_position_t new_pos);
-
-/** Go to the right.
- */
-void
-move_go_to_right (void);
-
-/** Go to the left.
- */
-void
-move_go_to_left (void);
-
#endif /* move_h */