提交 41405673 authored 作者: Serhij S's avatar Serhij S

rmodbus 0.9.3

上级 8efeaf72
...@@ -26,7 +26,7 @@ object-id = "0.1.3" ...@@ -26,7 +26,7 @@ object-id = "0.1.3"
oneshot = { version = "0.1.6", default-features = false, features = ["std"] } oneshot = { version = "0.1.6", default-features = false, features = ["std"] }
parking_lot = "0.12.1" parking_lot = "0.12.1"
pin-project = "1.1.5" pin-project = "1.1.5"
rmodbus = { version = "0.9.2" } rmodbus = { version = "0.9.3" }
roboplc-derive = { version = "0.1.2" } roboplc-derive = { version = "0.1.2" }
serde = { version = "1.0.197", features = ["derive", "rc"] } serde = { version = "1.0.197", features = ["derive", "rc"] }
serial = "0.4.0" serial = "0.4.0"
......
...@@ -164,7 +164,7 @@ impl IoMapping for ModbusMapping { ...@@ -164,7 +164,7 @@ impl IoMapping for ModbusMapping {
if data.is_empty() { if data.is_empty() {
return Err(Error::invalid_data("invalid modbus response")); return Err(Error::invalid_data("invalid modbus response"));
} }
let mut reader = Cursor::new(&data[1..]); let mut reader = Cursor::new(data);
T::read_be(&mut reader).map_err(Into::into) T::read_be(&mut reader).map_err(Into::into)
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论