From d09c82c3fcfbaae76a5a0f7a5fac988a66767d95 Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Sat, 14 Dec 2024 14:44:53 +0100 Subject: [PATCH] mappings: add a map for albus the tree --- src/mappings.rs | 6 ++++++ src/platform/esp32.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mappings.rs b/src/mappings.rs index a4fd1fc..d8cf009 100644 --- a/src/mappings.rs +++ b/src/mappings.rs @@ -169,6 +169,12 @@ impl StrideMapping { ]) } + pub fn new_albus() -> Self { + Self::from_json(&[ + (0, 0, 50 * 3, false) + ]) + } + pub fn from_json(stride_json: &[(u8, u8, u8, bool)]) -> Self { let mut strides = [Stride::default(); STRIDE_NUM]; let stride_count = stride_json.len(); diff --git a/src/platform/esp32.rs b/src/platform/esp32.rs index c7064d3..d03bb98 100644 --- a/src/platform/esp32.rs +++ b/src/platform/esp32.rs @@ -118,7 +118,7 @@ impl Board for Esp32Board { [0x4a, 0xca, 0x43, 0x59, 0x85, 0x58, 0x0, 0x0] => { // Albus the tree StrideOutput::new( Pixbuf::new(), - StrideMapping::new_jar(), + StrideMapping::new_albus(), std::thread::spawn(move || { FastWs2812Esp32Rmt::new(rmt.channel0, pins.gpio5).unwrap() }).join().unwrap(), MAX_POWER_MW )