* If RSSI Channel is set to Disabled when using S.Bus then generate RSSI signal using frame drop flags from the rx
* Set RSSI max level for S.Bus to 1024 so OSD defaults can be used
* Failsfafe must be detected rather than just reporting dropped frames
* Failsafe implies dropped frames
* Remove failsafe debug
* Use RSSI_SOURCE_RX_PROTOCOL
* Add rssi_from_rx_protocol to enable siqnal quality from rx to be processed as RSSI
* Use RSSI_MAX_VALUE definition
* Use rssi_from_rx_protocol flag for fport rx
* Update serialpassthrough help text
* Revert erroneous commit
* Use rssi_src_frame_errors boolean
* rssi_src_frame_errors = ON | OFF
* Moved rssi_src_frame_errors to end of rxConfig_t struct
* Add documentation of rssi_src_frame_errors
* Synthesise RX_FRAME_FAILSAFE flag to protect from bad implementation in receivers
* Match rx failsafe behaviour exactly
* Only set RX_FRAME_COMPLETE if valid frame is received
* RSSI_SOURCE_FRAME_ERRORS moved to end of rssiSource_e enum
* Removed superfluous else if clause
* Restore debug code
* Restore stateFlags
* Set RX_FRAME_DROPPED flag when failsafe is triggered
The primary reason is to support the D4R-II with it's much faster PWM
frequency. The PWM RSSI code could not keep up, and since there are no
timers free for using capture compare of PWM signals in hardware one
solution is to use the ADC at a slow sample rate.
RC2 is used as before and it expects a signal between 0 and 3.3v. An
inline smoothing capacitor may help.
This commit also removes the cli command adc_power_channel since the
reading was never actually exposed anywhere.
Also support FrSky 1khz RSSI. See documentation also added in this
commit.
This commit also cleans up the PWM mapping code. 'mask' didn't need to
be a mask and it wasn't possible to add another 'type' since there were
only 4 possible values when it was a mask and they were already defined.
Combined with switching to using 16 bits instead of 8 for the mapping
configurations, it's now possible to have 256 types instead of 4 at the
expense of a few bytes of flash.
Moved the RSSI calculation into rx_common.c, previously it was in the
main loop.