From ce8ba084d5796983e83e806460f824f0db8b3616 Mon Sep 17 00:00:00 2001 From: Gregor Reitzenstein Date: Fri, 18 Sep 2020 13:20:04 +0200 Subject: [PATCH] Remove in-promptu test code --- src/main.rs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/main.rs b/src/main.rs index facdb4c..1572ae2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -238,29 +238,6 @@ fn main() -> Result<(), Error> { } } - use uuid::Uuid; - use machine::{Status, Machine}; - let mut machine = Machine::new(Uuid::new_v4(), "Testmachine".to_string(), 0); - println!("{}", toml::to_string(&machine).unwrap()); - let f = regs.actuators.subscribe("shelly".to_string(), machine.signal()); - exec.run_until(f); - - let postlog = log.clone(); - use std::thread; - use std::time::Duration; - thread::spawn(move || { - info!(postlog, "Zzz"); - thread::sleep(Duration::from_millis(1000)); - machine.set_state(Status::Occupied); - info!(postlog, "Beep"); - thread::sleep(Duration::from_millis(2000)); - machine.set_state(Status::Blocked); - info!(postlog, "Bap"); - thread::sleep(Duration::from_millis(3000)); - machine.set_state(Status::Free); - info!(postlog, "Boop"); - }); - // Closure inefficiencies. Lucky cloning an Arc is pretty cheap. let inner_log = log.clone(); let loop_log = log.clone();