We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad1cd65 commit 2d6d875Copy full SHA for 2d6d875
src/lib/protocol.rs
@@ -65,12 +65,9 @@ impl Protocol {
65
{
66
let mut reader = mavlink::async_peek_reader::AsyncPeekReader::new(self.as_slice());
67
68
- match cli::mavlink_version() {
69
- 1 => mavlink::read_v1_msg_async::<M, _>(&mut reader).await,
70
- 2 => mavlink::read_v2_msg_async::<M, _>(&mut reader).await,
71
- _ => unreachable!(),
72
- }
73
- .map_err(anyhow::Error::msg)
+ mavlink::read_any_msg_async(&mut reader)
+ .await
+ .map_err(anyhow::Error::msg)
74
}
75
76
pub async fn to_mavlink_json<M>(&self) -> Result<MAVLinkJSON<M>>
0 commit comments