Make december pattern a little fancier
This commit is contained in:
parent
14330b83f9
commit
b9689fddb9
1 changed files with 8 additions and 8 deletions
|
@ -4,13 +4,13 @@ use lights::rgb::{blend, blend_steps, linear_gradient, Rgb};
|
||||||
use lights::{HardwareRgb, Lights};
|
use lights::{HardwareRgb, Lights};
|
||||||
|
|
||||||
const OFF: Rgb = Rgb(0, 0, 0);
|
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 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 WHITE: Rgb = Rgb(255, 255, 255);
|
||||||
|
|
||||||
const PULSE_LEN: usize = 150;
|
const PULSE_LEN: usize = 200;
|
||||||
const SEGMENT_LEN: usize = 60;
|
const SEGMENT_LEN: usize = 35;
|
||||||
const ZOOM: usize = 10;
|
const ZOOM: usize = 10;
|
||||||
const ZOOM_SEGMENT_LEN: usize = SEGMENT_LEN * ZOOM + ZOOM;
|
const ZOOM_SEGMENT_LEN: usize = SEGMENT_LEN * ZOOM + ZOOM;
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@ const FULL_PORCH: usize = 150;
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn run(lights: &mut impl Lights<Pixel = HardwareRgb>) -> ! {
|
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(BLUE, PURPLE, PULSE_LEN))
|
||||||
.chain(linear_gradient(PURPLE, CYAN, PULSE_LEN))
|
.chain(linear_gradient(PURPLE, GREEN, PULSE_LEN))
|
||||||
.cycle();
|
.cycle();
|
||||||
|
|
||||||
let mut t = 0;
|
let mut t = 0;
|
||||||
|
@ -51,13 +51,13 @@ pub fn run(lights: &mut impl Lights<Pixel = HardwareRgb>) -> ! {
|
||||||
};
|
};
|
||||||
|
|
||||||
Harrogate {
|
Harrogate {
|
||||||
porch_back: (0..FULL_PORCH).map(pattern_func),
|
porch_back: (0..FULL_PORCH).map(|_| color),
|
||||||
porch_front: (0..FULL_PORCH)
|
porch_front: (0..FULL_PORCH)
|
||||||
.map(pattern_func)
|
.map(pattern_func)
|
||||||
.map(|b| blend(color, WHITE, b)),
|
.map(|b| blend(color, WHITE, b)),
|
||||||
}
|
}
|
||||||
.render_to(lights);
|
.render_to(lights);
|
||||||
|
|
||||||
delay(500_000);
|
delay(300_000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue