feat: current progress - connect panel layout, manual checkbox, serial enum

This commit is contained in:
lennlouisgeek
2026-05-19 23:44:09 +08:00
parent 83faa0be1e
commit a7b617419d
11 changed files with 788 additions and 46 deletions

11
src/utils.rs Normal file
View File

@@ -0,0 +1,11 @@
use anyhow;
use serialport::available_ports;
pub fn serial_enum() -> anyhow::Result<Vec<String>> {
let ports = available_ports()
.map_err(|e| anyhow::anyhow!("available_ports failed: {}", e))?
.into_iter()
.map(|info| info.port_name)
.collect();
Ok(ports)
}