refactored hardware components

detach trait from mock and hardware implementation
This commit is contained in:
2025-06-02 14:46:24 +02:00
parent dc8fd22f0f
commit efd096a149
7 changed files with 75 additions and 56 deletions

View File

@@ -4,10 +4,10 @@ use smart_leds::colors::{GREEN, RED};
use std::{error::Error, time::Duration};
use tokio::{join, time::sleep};
use crate::{
buzzer::{Buzzer, GPIOBuzzer},
led::{SpiLed, StatusLed},
};
use crate::hardware::{Buzzer, StatusLed};
#[cfg(not(feature = "mock_pi"))]
use crate::{gpio_buzzer::GPIOBuzzer, spi_led::SpiLed};
#[cfg(feature = "mock_pi")]
use crate::mock::{MockBuzzer, MockLed};