mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
reversed vtx band lookup order
Ensures that 5880 is translated into R7 instead of F8
This commit is contained in:
parent
c653a8772a
commit
4646f9df8f
1 changed files with 4 additions and 2 deletions
|
@ -53,10 +53,12 @@ const char * const vtx58ChannelNames[] = {
|
|||
|
||||
bool vtx58_Freq2Bandchan(uint16_t freq, uint8_t *pBand, uint8_t *pChan)
|
||||
{
|
||||
uint8_t band;
|
||||
int8_t band;
|
||||
uint8_t chan;
|
||||
|
||||
for (band = 0 ; band < 5 ; band++) {
|
||||
// Use reverse lookup order so that 5880Mhz
|
||||
// get Raceband 7 instead of Fatshark 8.
|
||||
for (band = 4 ; band >= 0 ; band--) {
|
||||
for (chan = 0 ; chan < 8 ; chan++) {
|
||||
if (vtx58FreqTable[band][chan] == freq) {
|
||||
*pBand = band + 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue