diff --git a/src/o9xstrings.h b/src/o9xstrings.h index b94457b77..abab11cad 100644 --- a/src/o9xstrings.h +++ b/src/o9xstrings.h @@ -345,7 +345,6 @@ extern const pm_char STR_MENUSTAT[]; extern const pm_char STR_MENUDEBUG[]; extern const pm_char STR_RXNUM[]; extern const pm_char STR_SYNCMENU[]; -#endif #if defined(ROTARY_ENCODERS) extern const pm_char STR_BACK[]; @@ -403,3 +402,5 @@ extern const pm_char STR_EEPROMWARN[]; extern const pm_char STR_THROTTLEWARN[]; extern const pm_char STR_ALARMSWARN[]; extern const pm_char STR_SWITCHWARN[]; + +#endif diff --git a/src/simpgmspace.cpp b/src/simpgmspace.cpp index c9a66274e..0fc1af73f 100644 --- a/src/simpgmspace.cpp +++ b/src/simpgmspace.cpp @@ -178,6 +178,8 @@ void *main_thread(void *) checkAlarm(); } + s_current_protocol = 0; + while (main_thread_running) { perMain(); sleep(1/*ms*/); diff --git a/src/simu.cpp b/src/simu.cpp index 6120e8078..3ab6db36e 100644 --- a/src/simu.cpp +++ b/src/simu.cpp @@ -237,44 +237,6 @@ long Open9xSim::onTimeout(FXObject*,FXSelector,void*) } } - per10ms(); - refreshDiplay(); - getApp()->addTimeout(this,2,5); - return 0; -} - -void Open9xSim::refreshDiplay() -{ - if (lcd_refresh) { - lcd_refresh = false; -#if defined(PCBV4) - if(portc & 1<setOffColor(FXRGB(150,200,152)); - else bmf->setOffColor(FXRGB(200,200,200)); -#else - if(portb & 1<setOffColor(FXRGB(150,200,152)); - else bmf->setOffColor(FXRGB(200,200,200)); -#endif - - for(int x=0;xsetData (buf2,0); - bmp->render(); - bmf->setBitmap( bmp ); - } if(hasFocus()) { #ifdef REVB @@ -314,23 +276,31 @@ void Open9xSim::refreshDiplay() // PIOA->PIO_PDSR = 0xFFFFFFFF; Temperature = 1000; maxTemperature = 1500; + #elif defined(PCBV4) - pinl &= ~ 0x3f; + uint8_t pin = (pinl & ~0x3f); #else - pinb &= ~ 0x7e; + uint8_t pin = (pinb & ~0x7e); #endif + for(unsigned i=0; igetKeyState(keys1[i])) { #if defined(PCBARM) ((Pio*)keys1[i+3])->PIO_PDSR &= ~(keys1[i+4]); #elif defined(PCBV4) - pinl |= (1<addTimeout(this,2,5); + return 0; +} + +void Open9xSim::refreshDiplay() +{ + if (lcd_refresh) { + lcd_refresh = false; +#if defined(PCBV4) + if(portc & 1<setOffColor(FXRGB(150,200,152)); + else bmf->setOffColor(FXRGB(200,200,200)); +#else + if(portb & 1<setOffColor(FXRGB(150,200,152)); + else bmf->setOffColor(FXRGB(200,200,200)); +#endif + + for(int x=0;xsetData (buf2,0); + bmp->render(); + bmf->setBitmap( bmp ); + } + } Open9xSim *th9xSim;