diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-06-29 09:34:54 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-06-29 09:34:54 +0200 |
commit | 4d446fb2c1d14142304971095ee60668ba9c6bc5 (patch) | |
tree | d5e5670f17a2d8a89748645b0739ef95dd6bf4f4 /robot/mode_maze.c | |
parent | 0b50dfe730d87ff052ef08f0dd6df6071d50aef9 (diff) |
[WIP] last touches for second assessment
Diffstat (limited to 'robot/mode_maze.c')
-rw-r--r-- | robot/mode_maze.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/robot/mode_maze.c b/robot/mode_maze.c index 72478e8..a7f76ec 100644 --- a/robot/mode_maze.c +++ b/robot/mode_maze.c @@ -2,6 +2,7 @@ #include "mode_grid.h" #include "movement.h" #include "orangutan_shim.h" +#include "io.h" unsigned int g_w2_last_proportional = 0; long g_w2_integral = 0; @@ -32,9 +33,9 @@ void w2_mode_maze() { } else { // normal line following if (power_difference < 0 && (g_w2_sensors[2] > 100 || g_w2_sensors[3] > 100 || g_w2_sensors[1] > 100)) - set_motors(max + power_difference, max); + w2_set_motors(max + power_difference, max); else if (power_difference > 0 && (g_w2_sensors[2] > 100 || g_w2_sensors[3] > 100 || g_w2_sensors[1] > 100)) - set_motors(max, max - power_difference); + w2_set_motors(max, max - power_difference); } } |