4 releases
new 0.2.0 | Nov 23, 2024 |
---|---|
0.1.2 | Aug 13, 2024 |
0.1.1 | Aug 13, 2024 |
0.1.0 | Aug 10, 2024 |
#1304 in Parser implementations
256 downloads per month
8KB
90 lines
IBUS Parser
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.
Features
- Simple API: Straightforward functions for parsing IBUS packets.
- Error Handling: Basic checksum verification to detect corrupted data.
- Lightweight: Minimal dependencies and a small footprint.
Installation
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;
Usage
Parsing an IBUS Packet
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);
Note
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.
Contributing
Any and all contributions are welcome.
Branching
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.
Commits
In regards to commits, conventional commits should be used for merge/squash commits. Otherwise, keep your commits concise and understandable. No emojis.
Issues
When writing an issue, follow these guidelines:
- Bug Reports: Prefix your issue with "BUG:". Please describe steps to reproduce, and include which features failed.
- Feature Requests: Prefix your issue with "FEATURE:". Please describe in detail how you want your proposed feature to work. Also include code snippets of how you want it to work if possible. If you are requesting that a feature be changed, include how you want the new version of the feature to work.
License
MIT License. See LICENSE for more details.
Dependencies
~155KB