1
0
Fork 0
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:
Raphael Coeffic 2017-02-07 22:50:07 +01:00 committed by borisbstyle
parent c653a8772a
commit 4646f9df8f

View file

@ -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;