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:
parent
e0fc9300ed
commit
80c1cfa6db
6 changed files with 19 additions and 3 deletions
|
@ -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)];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue