From b9689fddb952a1f455d1009cb008cc1b787518bb Mon Sep 17 00:00:00 2001 From: Tangent Wantwight Date: Tue, 3 Dec 2019 18:08:19 -0500 Subject: [PATCH] Make december pattern a little fancier --- harrogate/src/december_2019.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/harrogate/src/december_2019.rs b/harrogate/src/december_2019.rs index 8b7c55a..287c352 100644 --- a/harrogate/src/december_2019.rs +++ b/harrogate/src/december_2019.rs @@ -4,13 +4,13 @@ use lights::rgb::{blend, blend_steps, linear_gradient, Rgb}; use lights::{HardwareRgb, Lights}; const OFF: Rgb = Rgb(0, 0, 0); -const CYAN: Rgb = Rgb(0, 128, 200); +const GREEN: Rgb = Rgb(0, 200, 0); const BLUE: Rgb = Rgb(0, 0, 200); -const PURPLE: Rgb = Rgb(128, 0, 128); +const PURPLE: Rgb = Rgb(160, 0, 128); const WHITE: Rgb = Rgb(255, 255, 255); -const PULSE_LEN: usize = 150; -const SEGMENT_LEN: usize = 60; +const PULSE_LEN: usize = 200; +const SEGMENT_LEN: usize = 35; const ZOOM: usize = 10; const ZOOM_SEGMENT_LEN: usize = SEGMENT_LEN * ZOOM + ZOOM; @@ -20,9 +20,9 @@ const FULL_PORCH: usize = 150; #[allow(dead_code)] #[inline(always)] pub fn run(lights: &mut impl Lights) -> ! { - let mut color_pulse = linear_gradient(CYAN, BLUE, PULSE_LEN) + let mut color_pulse = linear_gradient(GREEN, BLUE, PULSE_LEN) .chain(linear_gradient(BLUE, PURPLE, PULSE_LEN)) - .chain(linear_gradient(PURPLE, CYAN, PULSE_LEN)) + .chain(linear_gradient(PURPLE, GREEN, PULSE_LEN)) .cycle(); let mut t = 0; @@ -51,13 +51,13 @@ pub fn run(lights: &mut impl Lights) -> ! { }; Harrogate { - porch_back: (0..FULL_PORCH).map(pattern_func), + porch_back: (0..FULL_PORCH).map(|_| color), porch_front: (0..FULL_PORCH) .map(pattern_func) .map(|b| blend(color, WHITE, b)), } .render_to(lights); - delay(500_000); + delay(300_000); } }