When a VTX was configured, the reported type via MSP was always
zero.
Also, update comment regarding the MSP message format in Betaflight
Thanks to @mikeller for the heads up.
Add a new type for settings to be able to handle strings. This makes
it easier to add more settings of this type and removes the need to
handle them with dedicated CLI commands.
Replace the `name` CLI command with a setting called `name`.
Saves 8 bytes of FLASH on OMNIBUS
Since sending the whole layouts over MSP was making the layouts
response too big (bigger than the default 512 bytes MSP TX buffer),
each OSD layout is now sent separately via by making
MSP2_INAV_OSD_LAYOUTS an in/out message.
Also, all 5 in/out messages have now been moved to a function which
handles all of them (mspFCProcessInOutCommand()).
Fixes crash when retriving the OSD layouts via MSP.
- VTX with support for FC control are now totally managed from the
FC. The FC will store the VTX configuration and override any changes
made manually (e.g. with a button). Users can disable VTX control
to manage channels manually.
- OSD VTX item now shows the power level too.
- Added new parameters for VTX configuration: vtx_band, vtx_channel,
vtx_freq, vtx_halfduplex, vtx_low_power_disarm, vtx_pit_mode_freq
and vtx_power.
- Added support for automatically switching the VTX power when
arming (fixes#3112).
Note that there are a several changes from the BF code. We do support
an additional setting for the low power during disarm option and
the MSP messages contain more data to allow users to configure the
VTX channel/power from the configurator. Our MSP messages also work
when the VTX is offline (the settings are stored in the FC and applied
later once the VTX is powered up).
Thanks to Matek (http://www.mateksys.com) for providing an FCHUB-VTX
to test the Tramp protocol.
Thanks to AKK (https://www.akktek.com) for providing an X2-ultimate
to test SmartAudio.
- Add 3 new boxes that can be controlled by a switch to toggle
between the default and 3 alternate layouts.
- Add new MSP cmds to retrieve/set the whole layouts, the OSD alarms
and the preferences.
- For now, CMS and settings just see the default layout. This
will be addressed on future commits.
Since it will be used while the machine is armed and over telemetry,
we need to make sure a malformed request doesn't crash the FC.
Also, rename setRSSIMsp() to setRSSIFromMSP()
FPort code is mostly imported from Betaflight. To make future RX
updates easier, a few more changes have been done to make the
RX/Telemetry code in BF and INAV a bit closer.
- Imported RSSI handling code from BF with some changes
- frsky_vfas_cell_voltage setting renamed to report_cell_voltage
- Added telemetry_halfduplex setting
- sbus_inversion renamed to serialrx_inverted, should apply to all
protocols eventually
- New MSP cmds MSP_TX_INFO/MSP_SET_TX_INFO now allow setting the RSSI
via MSP, thus RX_MSP doesn't need to use an extra channel anymore.
Implement functions for accessing battery/current state rather
than accessing global variables directly. This will let us reuse
the RX/telemetry code from BF minimizing the required changes.
Thanks to LTO, this only adds a small ~20 byte overhead in flash.