From 1799787ca13acc917a9c01da7769abdfa687f506 Mon Sep 17 00:00:00 2001
From: Federico Lolli <federico.lolli@skywarder.eu>
Date: Wed, 13 Mar 2024 20:46:26 +0100
Subject: [PATCH] Commented eprintln and reduced waiting time with no signal
 (100ms -> 10ms)

---
 on-host/src/main.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/on-host/src/main.rs b/on-host/src/main.rs
index a994985..4f99928 100644
--- a/on-host/src/main.rs
+++ b/on-host/src/main.rs
@@ -98,13 +98,13 @@ fn main() {
         loop {
             match port.read(&mut buffer) {
                 Ok(t) => {
-                    eprint!("{}", String::from_utf8_lossy(&buffer[..t]));
+                    // eprint!("{}", String::from_utf8_lossy(&buffer[..t]));
                     // if didn't get the signal then print the buffer and exit with error
                     if buffer[..t].contains(&ACK) {
                         break;
                     } else {
                         warn!("didn't get the signal");
-                        std::thread::sleep(Duration::from_millis(100));
+                        std::thread::sleep(Duration::from_millis(10));
                     }
                 }
                 Err(ref e) if e.kind() == io::ErrorKind::TimedOut => (),
@@ -114,7 +114,7 @@ fn main() {
                 }
             }
         }
-        eprintln!();
+        // eprintln!();
     }
 
     info!("sent {} packets", packets.sent_packets());
-- 
GitLab