9 #define MSG_START_DISP 150
13 #define HW_STATUS_MSG_SIZE 10
14 #define SWITCH_MODE_MSG_SIZE 6
15 #define VOLTAGE_MSG_SIZE 19
16 #define FSM_STATE_MSG_SIZE 22
17 #define POSITION_MSG_SIZE 14
18 #define COLOR_MSG_SIZE 3
19 #define LIFT_MSG_SIZE 6
20 #define PUCKS_MSG_SIZE 3
21 #define CONF_MSG_SIZE 4
23 #define VOLTAGE_MSG 'V'
24 #define FSM_STATE_MSG 'F'
25 #define HW_STATUS_MSG 163
27 #define POSITION_MSG 'P'
28 #define MOVE_FSM_STATE_MSG 'M'
31 #define GAME_CONF_MSG 'g'
33 #define MSG_LIFT_CAL 151
34 #define MSG_PUSHER_IN 152
35 #define MSG_PUSHER_OUT 153
36 #define MSG_LIFT_UP 154
37 #define MSG_LIFT_DOWN 155
38 #define MSG_CMU_INIT 156
39 #define MSG_START_ACT 157
41 #define MSG_RESTART 162
43 #define MSG_STATUS 161
47 #define ROBOT_RESTART 182
48 #define SWITCH_TO_STATUS 183
49 #define SWITCH_TO_CONTROL 184
50 #define SWITCH_TO_STATUS_DONE 185
51 #define SWITCH_TO_CONTROL_DONE 186
55 #define CHANGE_MODE_REP 200
56 #define CHANGE_MODE_REQ 201
57 #define CHANGE_MODE_STATUS 202
58 #define CHANGE_MODE_CONTROL 203
61 #define MODE_CONTROL 2
63 #define HW_STATUS_OK 1
64 #define HW_STATUS_FAILED 0
65 #define HW_STATUS_WARNING 2
67 #define STATUS_MOTION 0
91 int oled_switch_mode(uint8_t *buff, int buff_size, uint8_t mode, uint8_t status);
92 int oled_send_voltage(uint8_t *buff, int buff_size, struct pwr_voltage_type *volt);
93 int oled_set_color(uint8_t *buff, int buff_size, uint8_t color);
94 int oled_send_position(uint8_t *buff, int buff_size, struct robot_pos_type *pos);
95 int oled_send_fsm_state(uint8_t *buff, int buff_size, const char *name, int len, uint8_t type);
96 int oled_send_hw_status(uint8_t *buff, int buff_size, uint8_t *status);
97 int oled_send_pucks_nr(uint8_t *buff, int buff_size, char nr);
98 int oled_send_lift_pos(uint8_t *buff, int buff_size, uint16_t pos);
99 int oled_send_game_conf(uint8_t *buff, int buff_size, uint8_t conf);