summaryrefslogtreecommitdiff
path: root/robot/modes.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-24 12:22:49 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-24 12:22:49 +0200
commitc47518a99d8c8a49a8a97100bdff5b06cfa125ae (patch)
treee59f79b106f31a21ae54991af682ba2cf80ebd47 /robot/modes.c
parent40f6164ba6187a0160af9fe200bbd1d729e8c03b (diff)
mode_chrg & mode_maze respect g_w2_target_area
Diffstat (limited to 'robot/modes.c')
-rw-r--r--robot/modes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/robot/modes.c b/robot/modes.c
index 559d81c..a54bc43 100644
--- a/robot/modes.c
+++ b/robot/modes.c
@@ -44,6 +44,8 @@ void w2_modes_switch(w2_e_mode new_mode, bool replace) {
g_w2_mode_history[g_w2_mode_history_index] = new_mode;
}
+ if (new_mode == W2_M_CHRG) w2_mode_chrg_onswitch();
+
// 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;