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.
* On boot SPI or SDIO is initialised.
* Filesystem is initialised (including creation of blackbox freespace
file)
* Empty config file is created if it doesn't exist, or read if it does.
* If config is invalid/empty then config file is written to, then read
back and verified.
Enable as follows.
target.h:
target.c:
uint8_t eepromData[EEPROM_SIZE];
Changes:
- Replace boolean init flags with single initFlags variables.
- Avoid unused variable warnings.
If the MCU also supports PERSISTENT ram (not erased on a warm boot) it
allows testing of config changes without wearing out your flash.
e.g.
linker script
-------------
comment out __config_start/__config_end
target.c
--------
PERSISTENT uint8_t eepromData[EEPROM_SIZE]; // persistent, so it
survives warm boots.
target.h
--------
extern uint8_t eepromData[EEPROM_SIZE];
SITL actually keeps the EEPROM in a FILE, loaded into RAM using
alternate FLASH_* implementation.
Prevents possibility of changing paramaters after initializing affecting runtime operation of RC smoothing. Parameter values are loaded during initialization instead of relying on the current PG values.
Removes the custom CLI commands to update or display the PID and Rate profile names. Moves the storage into the pidProfile and controlRateProfile PG's.
Names can now be set with:
set profile_name = NAME
set rate_profile_name = NAME
Also added profile name display to the profile and rate CMS menus.
Emptry MODE_STRING paramaters would produce CLI output that would then generate errors if reapplied using a `diff` or `dump`. Fixed the output for blank values to be compatible with setting an empty string (clearing a previous value).
Also improve the length validation to report the allowed character range.
These parameters can now be configured directly with the set/get commands.
The "name" command will still function but presents a warning that it will be removed and to use "set name = " instead.