parse_rc_ibus

Crates.ioparse_rc_ibus
lib.rsparse_rc_ibus
version0.2.0
sourcesrc
created_at2024-08-10 20:21:52.603713
updated_at2024-11-23 23:27:50.25015
descriptionA simple parser for FlySky IBUS
homepage
repositoryhttps://github.com/sergeant-savage/parse_rc_ibus
max_upload_size
id1332675
size8,645
Mariano Francisco Rodriguez (mariano-f-r)

documentation

README

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.

Commit count: 16

cargo fmt