aboutsummaryrefslogtreecommitdiff
path: root/robot/modes.h
blob: 8a53560cc7bd61b8607e543cfcf4335a16af4027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

/** @file modes.h */

#include <stdint.h>

#include "../shared/consts.h"
#include "../shared/modes.h"

extern w2_e_mode g_w2_mode_history[W2_MODE_HISTORY_BUFFER_SIZE];
extern uint8_t g_w2_mode_history_index;

/** setup g_w2_modes array */
void w2_modes_init();

/**
 * mode logic
 *
 * executes mode in g_w2_current_mode
 */
void w2_modes_main();

/** switch current mode (allow switching back to previous mode) */
void w2_modes_call(w2_e_mode mode);
/** switch current mode (replace current mode keeping history index) */
void w2_modes_swap(w2_e_mode mode);