From d8ffdab92b80f19f4df6c33468f771544477c831 Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Wed, 24 Dec 2025 09:17:33 +0100 Subject: [PATCH] tasks: render: add some extra pixels for buffer space for now --- src/tasks/render.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tasks/render.rs b/src/tasks/render.rs index 776fa8b..f09d5fa 100644 --- a/src/tasks/render.rs +++ b/src/tasks/render.rs @@ -16,8 +16,10 @@ pub async fn render(rmt: esp_hal::peripherals::RMT<'static>, gpio: AnyPin<'stati .expect("Failed to initialize RMT").into_async(); let rmt_channel = rmt.channel0; - let mut rmt_buffer = esp_hal_smartled::smart_led_buffer!(NUM_PIXELS); + // FIXME: I don't know why we need to add an extra bunch of pixels, but otherwise the buffer is too small? + let mut rmt_buffer = esp_hal_smartled::smart_led_buffer!(NUM_PIXELS + 25); + // FIXME: The strip is GRB, we need to fix the pixel swizzling deep within the traits let target = SmartLedsAdapterAsync::new_with_color(rmt_channel, gpio, &mut rmt_buffer); // Change this to adjust the power available; the USB spec says 500ma is the standard limit, but sometimes you can draw more from a power brick