New Years Eve 2020
This commit is contained in:
parent
090e276bc8
commit
a78d6faba9
3 changed files with 28 additions and 0 deletions
|
@ -22,6 +22,7 @@ valentines-2020 = ["replace-default"]
|
||||||
st-patricks-day = ["replace-default"]
|
st-patricks-day = ["replace-default"]
|
||||||
july-4 = ["replace-default"]
|
july-4 = ["replace-default"]
|
||||||
halloween-2020 = ["replace-default"]
|
halloween-2020 = ["replace-default"]
|
||||||
|
new-years-eve-2020 = ["replace-default"]
|
||||||
november-2020 = ["replace-default"]
|
november-2020 = ["replace-default"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
@ -14,6 +14,7 @@ mod st_patricks_day;
|
||||||
mod july_4;
|
mod july_4;
|
||||||
mod halloween_2020;
|
mod halloween_2020;
|
||||||
mod november_2020;
|
mod november_2020;
|
||||||
|
mod new_years_eve_2020;
|
||||||
mod door_light;
|
mod door_light;
|
||||||
|
|
||||||
#[entry]
|
#[entry]
|
||||||
|
@ -44,6 +45,9 @@ fn main() -> ! {
|
||||||
#[cfg(feature = "halloween-2020")]
|
#[cfg(feature = "halloween-2020")]
|
||||||
halloween_2020::run(&mut lights);
|
halloween_2020::run(&mut lights);
|
||||||
|
|
||||||
|
#[cfg(feature = "new-years-eve-2020")]
|
||||||
|
new_years_eve_2020::run(&mut lights);
|
||||||
|
|
||||||
#[cfg(feature = "november-2020")]
|
#[cfg(feature = "november-2020")]
|
||||||
november_2020::run(&mut lights);
|
november_2020::run(&mut lights);
|
||||||
|
|
||||||
|
|
23
harrogate/src/new_years_eve_2020.rs
Normal file
23
harrogate/src/new_years_eve_2020.rs
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
use super::delay;
|
||||||
|
use core::iter::repeat;
|
||||||
|
use house::Harrogate;
|
||||||
|
use lights::rgb::Rgb;
|
||||||
|
use lights::{HardwareRgb, Lights};
|
||||||
|
|
||||||
|
const WHITE: Rgb = Rgb(255, 255, 255);
|
||||||
|
const YELLOW: Rgb = Rgb(255, 255, 0);
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn run(lights: &mut impl Lights<Pixel = HardwareRgb>) -> ! {
|
||||||
|
let pattern = Harrogate {
|
||||||
|
porch_back: repeat(YELLOW),
|
||||||
|
porch_front: repeat(WHITE),
|
||||||
|
};
|
||||||
|
|
||||||
|
loop {
|
||||||
|
pattern.clone().render_to(lights);
|
||||||
|
|
||||||
|
delay(48_000_000);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue