1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use serde::{Deserialize, Serialize};

pub const LCD_HEIGHT: u32 = 8;
pub const LCD_WIDTH: u32 = 50;
pub type LcdLines = [String; LCD_HEIGHT as usize];

#[derive(Debug, Serialize, Deserialize)]
pub enum SimulatorEvent {
    Warning(String),

    RobotCodeLoading,
    RobotCodeStarting,
    RobotCodeFinished,
    RobotCodeError { message: String, backtrace: String },

    LcdInitialized,
    LcdUpdated(LcdLines),
    LcdColorsUpdated(u32, u32),
    LcdShutdown,
}