1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-22 07:45:14 +03:00

No more quick select function

This commit is contained in:
bsongis 2011-10-03 06:53:09 +00:00
parent ec2f6064f4
commit b91b63615c
3 changed files with 3 additions and 36 deletions

View file

@ -615,37 +615,6 @@ void checkSwitches()
} }
} }
void checkQuickSelect()
{
uint8_t i = keyDown(); //check for keystate
uint8_t j;
for(j=1; j<8; j++)
if(i & (1<<j)) break;
j--;
if(j<6) {
if(!eeModelExists(j)) return;
eeLoadModel(g_eeGeneral.currModel = j);
eeDirty(EE_GENERAL);
lcd_clear();
lcd_putsAtt(64-7*FW,0*FH,PSTR("LOADING"),DBLSIZE);
putsModelName(2*FW, 3*FH, g_model.name, j, DBLSIZE);
refreshDiplay();
lcdSetRefVolt(g_eeGeneral.contrast);
if(g_eeGeneral.lightSw || g_eeGeneral.lightAutoOff) // if lightswitch is defined or auto off
BACKLIGHT_ON;
else
BACKLIGHT_OFF;
clearKeyEvents(); // wait for user to release key
}
}
uint8_t g_beepCnt; uint8_t g_beepCnt;
uint8_t g_beepVal[5]; uint8_t g_beepVal[5];
@ -2228,8 +2197,6 @@ int main(void)
uint8_t cModel = g_eeGeneral.currModel; uint8_t cModel = g_eeGeneral.currModel;
if (~MCUCSR & (1 << WDRF)) { if (~MCUCSR & (1 << WDRF)) {
checkQuickSelect();
doSplash(); doSplash();
checkLowEEPROM(); checkLowEEPROM();

View file

@ -524,7 +524,7 @@ const prog_char *get_switches_string() ;
uint16_t getTmr16KHz(); uint16_t getTmr16KHz();
unsigned int stack_free(); unsigned int stack_free();
void checkMem(); void checkLowEEPROM();
void checkTHR(); void checkTHR();
void checkSwitches(); void checkSwitches();
@ -663,7 +663,7 @@ extern uint16_t pulses2MHz[120];
extern int16_t g_ppmIns[8]; extern int16_t g_ppmIns[8];
extern int16_t g_chans512[NUM_CHNOUT]; extern int16_t g_chans512[NUM_CHNOUT];
extern volatile uint8_t tick10ms; extern volatile uint8_t tick10ms;
extern uint16_t BandGap; extern uint16_t BandGap;
extern uint16_t expou(uint16_t x, uint16_t k); extern uint16_t expou(uint16_t x, uint16_t k);
extern int16_t expo(int16_t x, int16_t k); extern int16_t expo(int16_t x, int16_t k);

View file

@ -356,7 +356,7 @@ void *init_function(void *) {
g_menuStack[0] = menuMainView; g_menuStack[0] = menuMainView;
g_menuStack[1] = menuProcModelSelect; g_menuStack[1] = menuProcModelSelect;
eeReadAll(); //load general setup and selected model eeReadAll(); //load general setup and selected model
checkMem(); //enough eeprom free? checkLowEEPROM(); //enough eeprom free?
checkTHR(); checkTHR();
checkSwitches(); //must be last checkSwitches(); //must be last
state = 2; state = 2;