True diversity rssi update on both radio (#2143)
* TD RSSI update first working draft
* use correct dio states
* check dio state only if it's a dual radio rx
* Send telemetry with stronger antenna & more debug stats
* add arduino header for github test
* check IrqState instead of digitalRead dios (+FLRC hw crc check)
* add cstdint for git testing
* Removing common.h from SX1280 lib
* Second packet sanity check in a proper way
* Check the second radio only in the first IRQ, SNR averaging
* includ type match for the byte checking
* comment cleanup
* More analytics logs
* Moving isFirstIrq to SX12xxDriverCommon
* Added separate SNR stats
* Fixed a bug, and hide stats behind DEBUG_LOG flag
* Changed DEBUG_LOG to DEBUG_RCVR_DUAL_RSSI flag
* Some formatting improvements
* more stats, refactored as a proper struct
* Enable single radio report mode
* formatting improvements
* sx127x impelementation
* Prevent div/0 situation
* fix the frequency correction error by 1
* SNR report based on Fuzzy Logic
When the difference between those two SNRs are larger than threshold, we'd return the averaged value between two. When the difference between the two values are small, return the lower SNR value. On the borderline differences, the transition between two logics are smoothend by a fuzzy logic.
The thershold of the fuzzy logic is determined by dynamic power up/down SNR thresholds
* more correct rounding, fuzzy logic also on 900M
* fix threshold set error (dn > up!) & comment correction
* Fix some glitches after the master merge
* Update one or both telem_count depending on parameter
* Add -flto flag for Siyi - untested
* refactoring + small casting bugfix
* fixing rssi_sum overflow
* fuzzy snr calculation moved to SX12xxDriverCommon
---------
Co-authored-by: Paul Kendall <pkendall64@gmail.com>