platform: esp32: create cyberplague mask map

This commit is contained in:
Torrie Fischer 2024-12-13 00:33:24 +01:00
parent 42fc0b0c62
commit bf4ef46699
2 changed files with 27 additions and 1 deletions

View File

@ -107,6 +107,24 @@ impl<const STRIDE_NUM: usize> StrideMapping<STRIDE_NUM> {
])
}
pub fn new_cyberplague() -> Self {
Self::from_json(&[
(0, 6, 6, false),
(1, 6, 6, true),
(2, 6, 6, false),
(3, 4, 9, true),
(4, 4, 14, false),
(5, 0, 17, true),
(6, 2, 12, false),
(7, 0, 18, true),
(8, 4, 14, false),
(9, 5, 9, true),
(10, 4, 7, false),
(11, 5, 6, true),
(12, 5, 6, false)
])
}
pub fn new_jar() -> Self {
Self::from_json(&[
(0, 0, 17, false),

View File

@ -175,7 +175,15 @@ impl Board for Esp32Board {
std::thread::spawn(move || { FastWs2812Esp32Rmt::new(peripherals.rmt.channel0, pins.gpio5).unwrap() }).join().unwrap(),
MAX_POWER_MW
)
}
},
[0xfc, 0xf5, 0xc4, 0x05, 0xb8, 0x30, 0x0, 0x0] => { // cyberplague
StrideOutput::new(
Pixbuf::new(),
StrideMapping::new_cyberplague(),
std::thread::spawn(move || { FastWs2812Esp32Rmt::new(peripherals.rmt.channel0, pins.gpio13).unwrap() }).join().unwrap(),
MAX_POWER_MW
)
},
_ => {
StrideOutput::new(
Pixbuf::new(),