1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +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

@ -2009,7 +2009,7 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
const uint8_t newChannel = (newFrequency % 8) + 1;
vtxSettingsConfigMutable()->band = newBand;
vtxSettingsConfigMutable()->channel = newChannel;
vtxSettingsConfigMutable()->freq = vtx58_Bandchan2Freq(newBand, newChannel);
vtxSettingsConfigMutable()->freq = vtxCommonLookupFrequency(vtxDevice, newBand, newChannel);
} else if (newFrequency <= VTX_SETTINGS_MAX_FREQUENCY_MHZ) { // Value is frequency in MHz
vtxSettingsConfigMutable()->band = 0;
vtxSettingsConfigMutable()->channel = 0;