1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00

Call vtxInit after device parameters are initialized

This commit is contained in:
jflyper 2019-01-17 02:40:14 +09:00
parent e0fc9300ed
commit 80c1cfa6db
6 changed files with 19 additions and 3 deletions

View file

@ -168,7 +168,7 @@ bool vtxCommonLookupBandChan(const vtxDevice_t *vtxDevice, uint16_t freq, uint8_
// Returns frequency value (in MHz), or 0 if band/channel out of range.
uint16_t vtxCommonLookupFrequency(const vtxDevice_t *vtxDevice, int band, int channel)
{
if (band > 0 && band <= vtxDevice->capability.bandCount &&
if (vtxDevice && band > 0 && band <= vtxDevice->capability.bandCount &&
channel > 0 && channel <= vtxDevice->capability.channelCount) {
return vtxDevice->frequencyTable[(band - 1) * vtxDevice->capability.channelCount + (channel - 1)];