A basic parser for the IBUS RC protocol, written in Rust. Ideal for decoding channel data in radio-controlled systems and other applications using the IBUS protocol. MSRV is 1.81.
Add parse_rc_ibus
to your Cargo.toml
:
[dependencies]
parse_rc_ibus = "0.1.0"
Then, in your Rust code:
use parse_rc_ibus::IbusPacket;
To parse an IBUS packet, pass the byte array to IbusPacket::try_from_bytes()
. This will return the parsed packet or an error if the data is invalid.
let buffer [u8; 32] = [...];
let packet = IbusPacket::try_from_bytes(&buffer);
You will have to sync the UART manually. This can be done by iterating byte by byte until you see the IBUS header, then skipping the next packet.
Any and all contributions are welcome.
If you choose to contribute, when forking the repository and naming your branch, follow the below table. | Type | Branch Prefix |
---|---|---|
Bugfix | fix/ | |
Feature | feat/ | |
Chore | chore/ |
One final note on branches: the main branch should always compile, so changes will not be merged unless they also compile.
In regards to commits, conventional commits should be used for merge/squash commits. Otherwise, keep your commits concise and understandable. No emojis.
When writing an issue, follow these guidelines:
MIT License. See LICENSE for more details.