You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by hw999 December 4, 2023
I would like to translate CRSF-channel information into a SBUS-data stream. The SBUS protocol has flags for lost frames and failsafe. I wonder : are there any such flags in the CRSF-protocol and if yes - are they implemented in the library? At first glance I did not discover anything that would show how FS and LF is handled.
Could you please spend a few sentences on how CRSF handles LF and FS ?
How this could be implemented
LF in this instance translates to "lost frame", which happens when a received RC frame fails the CRC check. In the context of SBUS, this is done in hardware, rather than in software. In the context of CRSF, this would need to be done in software.
A simple boolean flag could be retrieved from the serialReciever::CRSF::receiveFrames() function when the CRC on the received frame fails, and I could pass that flag up through to the Sketch Layer.
FS is the failsafe flag, which is a representation of the received frame that has this flag set.
This is where shit could get complicated, because there really is no way to determine a "proper" failsafe.
What most implementations do (or at least the ones I have seen, such as Betaflight, INAV, and RotorFlight) is they'll have a combination of a timeout, the number of consecutive CRC sum fails, and they'll likely be watching the link statistics for things such as RSSI and Link Quality.
There was another project (not listed here on my GitHub) that I worked on, and I wrote and tested my own logic for failsafe implementation.
This provides me with a solid frame of reference for what I could implement here in CRSF for Arduino. In that project, I wrote logic that watched the Link Quality and RSSI fields from the Link Statistics packet in the CRSF data stream from the receiver.
The text was updated successfully, but these errors were encountered:
Discussed in #51
Originally posted by hw999 December 4, 2023
I would like to translate CRSF-channel information into a SBUS-data stream. The SBUS protocol has flags for lost frames and failsafe. I wonder : are there any such flags in the CRSF-protocol and if yes - are they implemented in the library? At first glance I did not discover anything that would show how FS and LF is handled.
Could you please spend a few sentences on how CRSF handles LF and FS ?
How this could be implemented
LF
in this instance translates to "lost frame", which happens when a received RC frame fails the CRC check. In the context of SBUS, this is done in hardware, rather than in software. In the context of CRSF, this would need to be done in software.A simple boolean flag could be retrieved from the
serialReciever::CRSF::receiveFrames()
function when the CRC on the received frame fails, and I could pass that flag up through to the Sketch Layer.FS
is the failsafe flag, which is a representation of the received frame that has this flag set.This is where shit could get complicated, because there really is no way to determine a "proper" failsafe.
What most implementations do (or at least the ones I have seen, such as Betaflight, INAV, and RotorFlight) is they'll have a combination of a timeout, the number of consecutive CRC sum fails, and they'll likely be watching the link statistics for things such as RSSI and Link Quality.
There was another project (not listed here on my GitHub) that I worked on, and I wrote and tested my own logic for failsafe implementation.
This provides me with a solid frame of reference for what I could implement here in CRSF for Arduino. In that project, I wrote logic that watched the Link Quality and RSSI fields from the Link Statistics packet in the CRSF data stream from the receiver.
The text was updated successfully, but these errors were encountered: