properties: rewrite properties (whoops)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
use smart_leds_trait::SmartLedsWrite;
|
||||
|
||||
use crate::buffers::Pixbuf;
|
||||
use crate::events::Variant;
|
||||
use crate::render::{HardwarePixel, Output, PixelView, Sample};
|
||||
use crate::properties::Variant;
|
||||
use crate::render::{HardwarePixel, Output, PixelView, Sample, props::Output as OutputNS};
|
||||
use crate::power::brightness_for_mw;
|
||||
use crate::geometry::*;
|
||||
use crate::{geometry::*, prop_id};
|
||||
use crate::mappings::*;
|
||||
use paste::paste;
|
||||
|
||||
use core::fmt::Debug;
|
||||
|
||||
@@ -57,7 +58,7 @@ impl<P: Pixbuf<Pixel=T::Color>, T: FastWrite> Output for StrideOutput<P, T> {
|
||||
|
||||
fn on_event(&mut self, event: &crate::events::Event) {
|
||||
match event {
|
||||
crate::events::Event::PropertyChange("output.brightness", Variant::Byte(new_brightness)) => self.brightness = *new_brightness,
|
||||
crate::events::Event::PropertyChange(prop_id!(OutputNS::Brightness), Variant::Byte(new_brightness)) => self.brightness = *new_brightness,
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user