2 releases

0.1.1 Dec 17, 2023
0.1.0 Dec 17, 2023

#1242 in Parser implementations

MIT license

8KB
105 lines

parse_sbus

A small Rust library meant to help parse SBUS from any source.


lib.rs:

A small crate made to help parse SBUS packages from any source.

SBUS is a common standard used with radio transmitters and receivers in the RC hobby. SBUS is transmitted via UART at a baud rate of 100000 with 8 bits of data, an even parity bit, and 2 stop bits. Each UART frame contains 1 byte of SBUS data. 25 frames comprise a packet, which has the following bytes:

  • 1 header byte with a value of 0x0F
  • 22 bytes that store 16 channels of 11 bit information
  • 1 special flag byte that contains the values of the digital channels, whether the frame has been lost, and whether the failsafe has been engaged
  • 1 footer byte with a value of 0x00

The special flag byte has the following arrangement: [0 0 0 0 failsafe frame_lost channel17 channel18]

All of this data is transmitted with the least significant bit (LSB) first, hence the need to write this library.

No runtime deps