bolderflight / sbus

Arduino and CMake library for communicating with SBUS receivers and servos.
MIT License
397 stars 141 forks source link

Sbus RC_LOST implementation incomplete #17

Closed OpenUAS closed 3 years ago

OpenUAS commented 5 years ago

The current implementation is incomplete and might lead to unwanted behaviour in RC control, read; possible crash. Anyhow, this might be of help to improve the library.

SBUS_BIT_PER_CHANNEL 11 SBUS_BIT_PER_BYTE 8 SBUS_FLAGS_BYTE 22 SBUS_FRAME_LOST_BIT 2 SBUS_RC_FAILSAFE_BIT 4 SBUS_RC_LOST_BIT 5

Take a peek at the PPRZ sbus implementation for a more complete overview https://github.com/paparazzi/paparazzi/tree/master/sw/airborne/subsystems/radio_control

flybrianfly commented 3 years ago

We are implementing bits 4 and 5, failsafe and frame lost, respectively. I don't see how bit 2 frame lost is different from bit 5. Further, I tested on an FrSky receiver and unable to get bit 2 to flip. Please re-open with additional documentation and / or results from testing that show how bit 2 is used.