uf-sbus
A no_std compatible Rust library for parsing and encoding SBUS (Serial Bus) packets
commonly used in RC systems. SBUS is a protocol developed by Futaba for RC
receivers to communicate with flight controllers and other devices.
SBUS Protoc0l
The protocol runs on top of UART communication. Typical parameters are 100kbps (or 200kbps in fast mode), 8e2 frame format, inverted (high voltage level is logic low).
Byte[0]: SBUS header, 0x0F
Byte[1 -22]: 16 servo channels, 11 bits each
Byte[23]
Bit 0: channel 17 (0x01)
Bit 1: channel 18 (0x02)
Bit 2: frame lost (0x04)
Bit 3: failsafe activated (0x08)
Byte[24]: SBUS footer
Installation
or
[]
= { ="0.1.0", = ["defmt"] }
Simple example
use SbusParser;
Embassy
See esp32c6 example for complete code:
let mut uart = uart0.into_async;
let mut buf: = ;
let mut sbus = new;
let timeout = 500; // Default from betaflight
loop
}
References
- Protocol decoder from
sigrokhttps://sigrok.org/wiki/Protocol_decoder:Sbus_futaba - Arduino library https://github.com/bolderflight/SBUS
License
Licensed under the Apache License, Version 2.0
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.