aboutsummaryrefslogtreecommitdiff
path: root/robot/modes.c
diff options
context:
space:
mode:
Diffstat (limited to 'robot/modes.c')
-rw-r--r--robot/modes.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/robot/modes.c b/robot/modes.c
index 7decf47..4995d6f 100644
--- a/robot/modes.c
+++ b/robot/modes.c
@@ -8,7 +8,6 @@
#include "mode_dirc.h"
#include "mode_grid.h"
#include "mode_halt.h"
-#include "mode_lcal.h"
#include "mode_maze.h"
#include "mode_scal.h"
#include "mode_spin.h"
@@ -22,7 +21,6 @@ void w2_modes_init() {
g_w2_modes[W2_M_DIRC] = &w2_mode_dirc;
g_w2_modes[W2_M_GRID] = &w2_mode_grid;
g_w2_modes[W2_M_HALT] = &w2_mode_halt;
- g_w2_modes[W2_M_LCAL] = &w2_mode_lcal;
g_w2_modes[W2_M_MAZE] = &w2_mode_maze;
g_w2_modes[W2_M_SCAL] = &w2_mode_scal;
g_w2_modes[W2_M_SPIN] = &w2_mode_spin;
@@ -48,7 +46,7 @@ void w2_modes_switch(w2_e_mode new_mode, bool replace) {
// forward mode change to sercomm
W2_CREATE_MSG_BIN(w2_s_cmd_mode_tx, msg, msg_bin);
msg->opcode = W2_CMD_MODE | W2_CMDDIR_TX;
- msg->mode = new_mode;
+ msg->mode = g_w2_mode_history[g_w2_mode_history_index];
w2_sercomm_append_msg(msg_bin);
free(msg_bin);