diff --git a/src/drivers/null.rs b/src/drivers/null.rs index 1e8e2c2..c44b1a3 100644 --- a/src/drivers/null.rs +++ b/src/drivers/null.rs @@ -1,13 +1,11 @@ use crate::drivers::RelayDriver; use crate::errors::EmgauwaControllerError; -pub struct NullDriver { - pub pin: u8, -} +pub struct NullDriver {} impl NullDriver { - pub fn new(pin: u8) -> Self { - Self { pin } + pub fn new() -> Self { + Self {} } } diff --git a/src/settings.rs b/src/settings.rs index b812ab0..fdf3c54 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -96,7 +96,7 @@ impl Relay { state: bool, ) -> Result, EmgauwaError> { let mut driver: Box = match self.driver { - drivers::Driver::Null => Box::new(drivers::NullDriver::new(self.pin)), + drivers::Driver::Null => Box::new(drivers::NullDriver::new()), drivers::Driver::Gpio => Box::new(drivers::GpioDriver::new(self.pin, self.inverted)?), drivers::Driver::PiFace => { if pfd.is_none() {