diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-06-08 14:56:00 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-06-08 14:56:00 +0200 |
commit | 867a54109c1bf25617fa46fd4c776db10d56fa8d (patch) | |
tree | 69e487f68821bf9e64b421e5369c450394bd04a6 /robot/movement.c | |
parent | 92a43e07b10903d5f1a572ebdf9a40571b75e73d (diff) |
`make format`0.6.0
Diffstat (limited to 'robot/movement.c')
-rw-r--r-- | robot/movement.c | 67 |
1 files changed, 33 insertions, 34 deletions
diff --git a/robot/movement.c b/robot/movement.c index 82829c1..61a944b 100644 --- a/robot/movement.c +++ b/robot/movement.c @@ -1,60 +1,59 @@ -#include "orangutan_shim.h" #include "movement.h" +#include "orangutan_shim.h" -unsigned int g_w2_sensors[5] = {0}; -unsigned int g_w2_position = 0; +unsigned int g_w2_sensors[5] = {0}; +unsigned int g_w2_position = 0; -void w2_maze_rotation_full(){ - set_motors(0,0); +void w2_maze_rotation_full() { + set_motors(0, 0); delay_ms(500); - set_motors(60,-60); + set_motors(60, -60); delay_ms(540); - set_motors(0,0); - g_w2_position = read_line(g_w2_sensors,IR_EMITTERS_ON); + set_motors(0, 0); + g_w2_position = read_line(g_w2_sensors, IR_EMITTERS_ON); delay_ms(500); } -void w2_maze_rotation_half_left(){ - set_motors(0,0); - set_motors(50,50); +void w2_maze_rotation_half_left() { + set_motors(0, 0); + set_motors(50, 50); delay_ms(150); - set_motors(-30,30); + set_motors(-30, 30); delay_ms(600); - set_motors(0,0); - g_w2_position = read_line(g_w2_sensors,IR_EMITTERS_ON); + set_motors(0, 0); + g_w2_position = read_line(g_w2_sensors, IR_EMITTERS_ON); delay_ms(500); - } -void w2_maze_rotation_half_right(){ - set_motors(0,0); - set_motors(50,50); +void w2_maze_rotation_half_right() { + set_motors(0, 0); + set_motors(50, 50); delay_ms(150); - set_motors(30,-30); + set_motors(30, -30); delay_ms(600); - set_motors(0,0); - set_motors(50,50); + set_motors(0, 0); + set_motors(50, 50); delay_ms(150); - g_w2_position = read_line(g_w2_sensors,IR_EMITTERS_ON); + g_w2_position = read_line(g_w2_sensors, IR_EMITTERS_ON); delay_ms(500); } -void w2_grid_rotation_full(){ - set_motors(60,-60); +void w2_grid_rotation_full() { + set_motors(60, -60); delay_ms(540); - set_motors(10,10); - g_w2_position = read_line(g_w2_sensors,IR_EMITTERS_ON); + set_motors(10, 10); + g_w2_position = read_line(g_w2_sensors, IR_EMITTERS_ON); } -void w2_grid_rotation_half_left(){ - set_motors(-30,30); +void w2_grid_rotation_half_left() { + set_motors(-30, 30); delay_ms(600); - set_motors(10,10); - g_w2_position = read_line(g_w2_sensors,IR_EMITTERS_ON); + set_motors(10, 10); + g_w2_position = read_line(g_w2_sensors, IR_EMITTERS_ON); } -void w2_grid_rotation_half_right(){ - set_motors(30,-30); +void w2_grid_rotation_half_right() { + set_motors(30, -30); delay_ms(600); - set_motors(10,10); - g_w2_position = read_line(g_w2_sensors,IR_EMITTERS_ON); + set_motors(10, 10); + g_w2_position = read_line(g_w2_sensors, IR_EMITTERS_ON); } |