fixup warning in periph button

This commit is contained in:
irriden
2023-08-01 18:47:16 +00:00
parent 201dbb26cb
commit 4ecd69c3d2

View File

@@ -18,10 +18,7 @@ pub fn button_loop(gpio9: gpio::Gpio9, tx: mpsc::Sender<Status>) {
let mut pressed = false;
let mut up_times = 0;
let mut low_times = 0;
let mut machine = Machine {
tx,
state: Status::Starting,
};
let mut machine = Machine::new(tx, Status::Starting);
loop {
// we are using thread::sleep here to make sure the watchdog isn't triggered
thread::sleep(Duration::from_millis(PAUSE.into()));