Additional cleanup
This commit is contained in:
parent
1b4ccd0dde
commit
877722ed1b
|
@ -8,6 +8,6 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
env_logger = "0.10"
|
env_logger = "0.10"
|
||||||
ftdi = "0.1"
|
ftdi = "0.1.3"
|
||||||
log = "0.4"
|
log = "0.4.8"
|
||||||
thiserror = "1"
|
thiserror = "1.0.15"
|
||||||
|
|
|
@ -37,7 +37,6 @@ impl Obd2BaseDevice for Elm327 {
|
||||||
fn send_cmd(&mut self, data: &[u8]) -> Result<()> {
|
fn send_cmd(&mut self, data: &[u8]) -> Result<()> {
|
||||||
self.device.write_all(data)?;
|
self.device.write_all(data)?;
|
||||||
self.device.write_all(b"\r\n")?;
|
self.device.write_all(b"\r\n")?;
|
||||||
// thread::sleep(time::Duration::from_millis(200));
|
|
||||||
let line = self.get_line()?;
|
let line = self.get_line()?;
|
||||||
if line.as_ref().is_some_and(|v| v == data) {
|
if line.as_ref().is_some_and(|v| v == data) {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#![forbid(unsafe_code)]
|
#![forbid(unsafe_code)]
|
||||||
|
|
||||||
mod accessors;
|
|
||||||
use accessors::Result;
|
|
||||||
pub use accessors::{Error, Obd2Device};
|
|
||||||
|
|
||||||
pub mod device;
|
pub mod device;
|
||||||
|
|
||||||
mod interface;
|
mod interface;
|
||||||
pub use interface::Obd2;
|
pub use interface::Obd2;
|
||||||
|
|
||||||
|
mod obd2_device;
|
||||||
|
use obd2_device::Result;
|
||||||
|
pub use obd2_device::{Error, Obd2Device};
|
||||||
|
|
Loading…
Reference in a new issue