use serde::{Deserialize, Serialize}; #[derive(Clone, Copy, Serialize, Deserialize, Debug)] pub struct LedStripConfig { pub index: usize, pub global_start_position: usize, pub global_end_position: usize, } #[derive(Clone, Copy, Serialize, Deserialize, Debug)] pub struct DisplayConfig { pub index_of_display: usize, pub display_width: usize, pub display_height: usize, pub top_led_strip: Option, pub bottom_led_strip: Option, pub left_led_strip: Option, pub right_led_strip: Option, } impl DisplayConfig { pub fn default(index_of_display: usize, display_width: usize, display_height: usize) -> Self { Self { index_of_display, display_width, display_height, top_led_strip: None, bottom_led_strip: None, left_led_strip: None, right_led_strip: None, } } }