Make december pattern a little fancier

This commit is contained in:
Tangent Wantwight 2019-12-03 18:08:19 -05:00
parent 14330b83f9
commit b9689fddb9

View file

@ -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<Pixel = HardwareRgb>) -> ! {
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<Pixel = HardwareRgb>) -> ! {
};
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);
}
}