28 lines
675 B
Rust
28 lines
675 B
Rust
use super::delay;
|
|
use core::iter::repeat;
|
|
use house::Harrogate;
|
|
use lights::rgb::Rgb;
|
|
use lights::{HardwareRgb, Lights};
|
|
|
|
const YELLOW: Rgb = Rgb(255, 195, 31);
|
|
const ORANGE: Rgb = Rgb(220, 117, 0);
|
|
const PUMPKIN: Rgb = Rgb(172, 67, 12);
|
|
const BROWN: Rgb = Rgb(118, 41, 0);
|
|
const RED: Rgb = Rgb(130, 18, 16);
|
|
const OFF: Rgb = Rgb(0, 0, 0);
|
|
|
|
#[allow(dead_code)]
|
|
#[inline(always)]
|
|
pub fn run(lights: &mut impl Lights<Pixel = HardwareRgb>) -> ! {
|
|
let pattern = Harrogate {
|
|
porch_back: [OFF, OFF].iter().cloned().chain(repeat(BROWN)),
|
|
porch_front: repeat(OFF),
|
|
};
|
|
|
|
loop {
|
|
pattern.clone().render_to(lights);
|
|
|
|
delay(48_000_000);
|
|
}
|
|
}
|