1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Consistency and friendly in operation

This commit is contained in:
jflyper 2017-02-08 00:58:13 +09:00 committed by borisbstyle
parent 73da590acb
commit 34780e50e5

View file

@ -1202,7 +1202,6 @@ static long saCmsCommence(displayPort_t *pDisp, const void *self)
// Setup band, freq and power. // Setup band, freq and power.
saSetBandChan(saCmsBand - 1, saCmsChan - 1); saSetBandChan(saCmsBand - 1, saCmsChan - 1);
saSetPowerByIndex(saCmsPower - 1);
// If in pit mode, cancel it. // If in pit mode, cancel it.
@ -1219,6 +1218,8 @@ static long saCmsCommence(displayPort_t *pDisp, const void *self)
saSetFreq(saCmsUserFreq); saSetFreq(saCmsUserFreq);
} }
saSetPowerByIndex(saCmsPower - 1);
return MENU_CHAIN_BACK; return MENU_CHAIN_BACK;
} }
@ -1264,15 +1265,15 @@ static long saCmsSetUserFreqOnEnter(void)
return 0; return 0;
} }
static long saCmsSetUserFreq(displayPort_t *pDisp, const void *self) static long saCmsConfigUserFreq(displayPort_t *pDisp, const void *self)
{ {
UNUSED(pDisp); UNUSED(pDisp);
UNUSED(self); UNUSED(self);
saCmsUserFreq = saCmsUserFreqNew; saCmsUserFreq = saCmsUserFreqNew;
saSetFreq(saCmsUserFreq); //saSetFreq(saCmsUserFreq);
return 0; return MENU_CHAIN_BACK;
} }
static OSD_Entry saCmsMenuPORFreqEntries[] = { static OSD_Entry saCmsMenuPORFreqEntries[] = {
@ -1301,7 +1302,7 @@ static OSD_Entry saCmsMenuUserFreqEntries[] = {
{ "CUR FREQ", OME_UINT16, NULL, &(OSD_UINT16_t){ &saCmsUserFreq, 5000, 5900, 0 }, DYNAMIC }, { "CUR FREQ", OME_UINT16, NULL, &(OSD_UINT16_t){ &saCmsUserFreq, 5000, 5900, 0 }, DYNAMIC },
{ "NEW FREQ", OME_UINT16, NULL, &(OSD_UINT16_t){ &saCmsUserFreqNew, 5000, 5900, 1 }, 0 }, { "NEW FREQ", OME_UINT16, NULL, &(OSD_UINT16_t){ &saCmsUserFreqNew, 5000, 5900, 1 }, 0 },
{ "SET", OME_Funcall, saCmsSetUserFreq, NULL, 0 }, { "SET", OME_Funcall, saCmsConfigUserFreq, NULL, 0 },
{ "BACK", OME_Back, NULL, NULL, 0 }, { "BACK", OME_Back, NULL, NULL, 0 },
{ NULL, OME_END, NULL, NULL, 0 } { NULL, OME_END, NULL, NULL, 0 }