1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Merge pull request #7285 from jflyper/bfdev-vtx-table-refactor

[VTX] Convert direct reference to string and freq table to vtxCommon services
This commit is contained in:
Michael Keller 2019-01-16 07:16:11 +13:00 committed by GitHub
commit 305f2c213a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 229 additions and 119 deletions

View file

@ -825,10 +825,10 @@ static bool osdDrawSingleElement(uint8_t item)
#if defined(USE_VTX_COMMON)
case OSD_VTX_CHANNEL:
{
const char vtxBandLetter = vtx58BandLetter[vtxSettingsConfig()->band];
const char *vtxChannelName = vtx58ChannelNames[vtxSettingsConfig()->channel];
uint8_t vtxPower = vtxSettingsConfig()->power;
const vtxDevice_t *vtxDevice = vtxCommonDevice();
const char vtxBandLetter = vtxCommonLookupBandLetter(vtxDevice, vtxSettingsConfig()->band);
const char *vtxChannelName = vtxCommonLookupChannelName(vtxDevice, vtxSettingsConfig()->channel);
uint8_t vtxPower = vtxSettingsConfig()->power;
if (vtxDevice && vtxSettingsConfig()->lowPowerDisarm) {
vtxCommonGetPowerIndex(vtxDevice, &vtxPower);
}