aboutsummaryrefslogtreecommitdiff
path: root/robot/mode_grid.c
diff options
context:
space:
mode:
Diffstat (limited to 'robot/mode_grid.c')
-rw-r--r--robot/mode_grid.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/robot/mode_grid.c b/robot/mode_grid.c
index 7e6db49..cfecae5 100644
--- a/robot/mode_grid.c
+++ b/robot/mode_grid.c
@@ -1,8 +1,13 @@
#include "mode_grid.h"
+#include "hypervisor.h"
#include "modes.h"
#include "movement.h"
#include "orangutan_shim.h"
+/**
+ * TODO: mode_grid g_w2_target_area laten volgen
+ */
+
int g_w2_order_number;
int g_w2_maze_status = 0;
@@ -30,7 +35,8 @@ void w2_crosswalk_stroll() {
set_motors(15, 15);
delay(290);
g_w2_position = read_line(g_w2_sensors, IR_EMITTERS_ON);
- if (g_w2_sensors[2] > 100 || g_w2_sensors[3] > 100 || g_w2_sensors[1] > 100) {
+ if ((g_w2_sensors[2] > 100 || g_w2_sensors[3] > 100 || g_w2_sensors[1] > 100) &&
+ (g_w2_target_area != W2_AREA_MAZE)) {
set_motors(0, 0);
g_w2_transition++;
if (g_w2_transition == 3) {