Some VTX don't respond to every request so it's necessary to retransmit. A previous PR fixed a bug that caused more retries than expected and made the actual retries only be 2 as configured. Unfortunately this exposed the problem with the non-responding VTX with cases of it not responding to both retries. The problem was accidentally masked by a previous bug with the retry counter causing many retries to actually occur.
This then exposed a secondary problem in `vtx_common` that lead to a "lockup" condition if the actual VTX channel didn't match our expectation of what the channel should be based on the settings. We were getting into this state because of the (now working) retry limit and cases where the VTX didn't respond and change channels as expected.
Increased the retry count to 20.
Fixed the logic that would prevent subsequent channel changes if the actual VTX channel didn't match the expected value based on the settings. Also fixed a problem where the channel change would not work if the VTX was on a frequency that was not defined in `vtxtable`.
Previously there were cases where the input was not compared to the currently defined vtxtable limits and this could lead to a wedge as code referenced the uninitialize string arrays.
Moved vtxtable frequency mode implementation into `vtx_common.c`.
This makes the implementation available for all vtx types and allows
for some code deduplication (see point below)
Removed band and channel tracking from tramp and rtc6705.
The hardware underlying both only support frequency mode and
the tracking is now done in `vtx_common.c` using the new factory flag.
Deleted vtxStringXXX. to continue supporting builds without
`USE_VTX_TABLE`, new infrastructure was created in
`drivers/vtx_table.c`, which loads fixed tables into vtxTableXXX
when built witout `USE_VTX_TABLE`. Individual vtx implementations no
longer need to load any band/channel tables. They only need to load
their individual power tables when built without `USE_VTX_TABLE`.
Additionally this allows for the next point:
Fully integrated vtxTableXXX and removed the old and no longer needed
indirection of frequency and power tables in `vtxDevice_t`.
Removed VTX_SETTINGS_* constants from `vtx_common.h` and replaced them
with the vtxtable equivalent.
rtc6705 implementation now uses power values from vtxtable instead of
using indices directly. It also stops using index 0. This makes it
consistent with other vtx implementations and is more user configurable.
It also cleans up `telemetry\srxl.c` which had to have a special case for rtc6705.
Finally, frequency entries in the vtxtable can now be marked as empty
by setting their frequency to 0. Betaflight will never allow a blocked
channel to be selected. This is useful for vtxtable index mode
(FACTORY flag set) where manufacturer-defined bands can be truncated
to ensure compliance with local laws and regulations.
Updated MSP_VTX_CONFIG
Updated MSP_SET_VTX_CONFIG
Updated MSP_VTX_CONFIG (again)
Implemented VTX update schedule
Removed unneeded initialization blocks from io/vtx implementations
Prevent VTX settings from being applied in CLI. Sync Band/Chan/Freq on init
Correct issues in SA CMS
Moved vtxCommonInit and vtxCommonProcess to io/vtx
Implemented 'vtx_' settings for SmartAudio and Tramp
Added 'vtx_freq' setting for SmartAudio and Tramp
SmartAudio-CMS fixes and improvements
Added SetFreqByMHzMsp support for SmartAudio and Tramp
CF/BF - Fix typo in max7456DmaInProgress. Always define an
implementation even when there is no TX-DMA.
CF/BF - Ensure that max7456 communication does not disrupt RTC6705
communication when using the same SPI port for both.
CF/BF - Port RTC6705 to use the VTX API.
* Support VTX channel/band/power on OSD for ALL vtx APIs - previously it only supported RTC6705.
* Remove all FEATURE_VTX usage.
* Remove all `#define VTX` usage.
Note that due to the async nature of tramp/smartaudio it's not possible
to know the current band/channel after requesting a change (as the
request hasn't been processed) so it makes no sense to try and save the
config - and on the tramp/smartaudio vtx the vtx maintains it's state.
So on an RTX6705 equipped FC the user should now MANUALLY save the
config using the save config stick position.
CF/BF - Move CMS for RTC6705 into vtx_rtc6705.c for consistency with
other VTX CMS menus.
CF/BF - Update RTC6705 via SOFT SPI to use VTX API.
* Achieved by simply aligning the API at the driver level and removing
all legacy conditional compilation checks.
CF/BF - Use new IO for RTC6705 CLK Hack
CF/BF - Port VTX button from CF v1.x.
Features:
* Channel Cycle
* Band Cycle
* Power Cycle
* Save Settings
* Works with any VTX using VTX API.
CF/BF - Allow support for Internal and External VTX - External takes
precedence when configured.
CF/BF - Fix display of VTX power in CMS.
* Issue occured when CMS was transitioned from integer to list of
strings.
CF/BF - Disable SMARTAUDIO and TRAMP on the SPRacingF3NEO due to flash
size.
CF/BF - Cleanup const usage of bass-by-value parameters. Cleanup
naming.
CF/BF - Cleanup naming. Removing noise-words. Improving consistency.
CF/BF - Improve readability by further naming cleanups.
CF/BF - Remove some magic numbers in the RTC6705 VTX code.
CF/BF - Use braces on some procedural macros.
CF/BF - Improve code readability by renaming rtc6705SetChannel to
rtc6705SetBandAndChannel.
CF/BF - Remove editor mishap.
CF/BF - Make the rtc6705Dev variable static.
CF/BF - remove duplicate state variablertc6705Dev_t - vtxDevice_t had
all we needed. Use brackets on some procedural style macros. Make all
the vtx vtable static const.
CF/BF - making some declarations const.
CF/BF - Fix vtx_power maximum value (out by one).