diff --git a/Cargo.lock b/Cargo.lock index 029d362..8b74e87 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -427,26 +427,6 @@ version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" -[[package]] -name = "libudev" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0" -dependencies = [ - "libc", - "libudev-sys", -] - -[[package]] -name = "libudev-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" -dependencies = [ - "libc", - "pkg-config", -] - [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -654,12 +634,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - [[package]] name = "portable-atomic" version = "1.9.0" @@ -1105,9 +1079,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -1117,9 +1091,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.9" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -1128,9 +1102,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rustc-demangle" @@ -1214,7 +1188,6 @@ dependencies = [ "cfg-if", "core-foundation-sys", "io-kit-sys", - "libudev", "mach2", "nix", "regex", @@ -1690,9 +1663,7 @@ dependencies = [ "pyo3-log", "regex", "serde", - "serialport", "thiserror", "tokio", - "tokio-serial", "walkdir", ] diff --git a/Cargo.toml b/Cargo.toml index ed6b12a..92eb822 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,16 +19,10 @@ prost-wkt = "0.6" prost-wkt-types = "0.6" pyo3 = { version = "0.22.0", features = ["extension-module", "chrono", "abi3-py311"] } pyo3-log = "0.11.0" -regex = "1.9.6" +regex = "1.11" serde = { version = "1.0.196", features = ["derive"] } -serialport = "4.3.0" thiserror = "1.0.50" tokio = { version = "1.33.0", features = ["full"] } -tokio-serial = "5.4.4" - -[[bin]] -name = "main" -path = "src/main.rs" [lib] name = "yaroc_rs" diff --git a/src/lib.rs b/src/lib.rs index f6bb06e..ecbc8a8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -pub mod async_serial; +//pub mod async_serial; pub mod logs; pub mod message_handler; pub mod punch; diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 9767d79..0000000 --- a/src/main.rs +++ /dev/null @@ -1,15 +0,0 @@ -use yaroc_rs::async_serial::AsyncSerial; - -#[tokio::main] -async fn main() { - let mut serial = AsyncSerial::new("/dev/ttyUSB2").unwrap(); - let b = serial - .call( - "AT+CPSI?", - r"\+CPSI: (?.*),(?.*)", - &["serv", "stat"], - 1.0, - ) - .await; - println!("{:?}", b); -}