Skip to content

Commit

Permalink
speeds 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
tenmajkl committed Mar 18, 2023
1 parent 94b5fcf commit 261acc6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Binary file added public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ fn scan() -> Option<Box<dyn SerialPort>> {
println!("[LOG] Ports: {:?}", ports);
for p in ports {
println!("[LOG] Scanning port {}", p.port_name);
match p.port_type {
serialport::SerialPortType::UsbPort(_) => {},
_ => {
println!("[LOG] Not a USB port");
continue;
}
}
let raw_port = serialport::new(p.port_name.as_str(), 9600)
.timeout(Duration::from_millis(20000))
.timeout(Duration::from_millis(50))
.open()
;

Expand All @@ -32,7 +39,7 @@ fn scan() -> Option<Box<dyn SerialPort>> {
.write("csmenor".as_bytes()).expect("[LOG] Unable to write to port")
;

thread::sleep(Duration::from_millis(1000));
thread::sleep(Duration::from_millis(10));

let mut result = vec![0; 9];

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Loading.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="flex justify-center items-center h-screen flex-col">
tady bude nejaky nacitani asi
<div class="animate-bounce">
penis
<img src="logo.png" alt="penis">
</div>
</div>

0 comments on commit 261acc6

Please sign in to comment.