aboutsummaryrefslogtreecommitdiff
path: root/robot/mode_scal.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-06 15:31:36 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-06 15:31:36 +0200
commitd69b8110517114d884c185c4dc8053858670c81f (patch)
tree8912cc5cb1b7ead5ce7469cd60356af189e926ce /robot/mode_scal.c
parent9cbd1ed3bd8e59e24bd4db92b749213ac2c0c8f9 (diff)
scal and spin done, removed lcal
Diffstat (limited to 'robot/mode_scal.c')
-rw-r--r--robot/mode_scal.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/robot/mode_scal.c b/robot/mode_scal.c
index f3178d7..53cbf67 100644
--- a/robot/mode_scal.c
+++ b/robot/mode_scal.c
@@ -1,19 +1,20 @@
#include "mode_scal.h"
+#include "modes.h"
+#include "orangutan_shim.h"
void w2_mode_scal() {
- // TODO ???
- /* pololu_3pi_init(2000);
+ pololu_3pi_init(2000);
for (int counter = 0; counter < 80; counter++) {
if (counter < 20 || counter >= 60) {
- g_w2_io.motor_left.speed = 40;
- g_w2_io.motor_right.speed = -40;
+ set_motors(40, -40);
} else {
- g_w2_io.motor_left.speed = -40;
- g_w2_io.motor_right.speed = 40;
+ set_motors(-40, 40);
}
calibrate_line_sensors(IR_EMITTERS_ON);
- delay_ms(20); // TODO foei
- } */
+ delay_ms(20);
+ }
+
+ w2_modes_call(W2_M_PREV);
}