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

Minor changes to be able to wrap everything into a simulation tool inside companion9x

This commit is contained in:
bsongis 2011-12-07 20:36:13 +00:00
parent 87dddbb773
commit 53d9ddfacd
10 changed files with 72 additions and 39 deletions

View file

@ -143,7 +143,6 @@ Gruvin9xSim::Gruvin9xSim(FXApp* a)
bmf = new FXBitmapFrame(this,bmp,0,0,0,0,0,0,0,0,0);
bmf->setOnColor(FXRGB(0,0,0));
//getApp()->addChore(this,1);
getApp()->addTimeout(this,2,100);
}
@ -187,7 +186,6 @@ void Gruvin9xSim::makeSnapshot(const FXDrawable* drawable)
}
void Gruvin9xSim::doEvents()
{
//getApp()->addChore(this,1);
getApp()->runOneEvent(false);
}
@ -355,25 +353,6 @@ void Gruvin9xSim::refreshDiplay()
}
}
void *main_thread(void *)
{
g_menuStack[0] = menuMainView;
g_menuStack[1] = menuProcModelSelect;
eeReadAll(); //load general setup and selected model
doSplash();
checkLowEEPROM();
checkTHR();
checkSwitches();
checkAlarm();
while(1) {
perMain();
usleep(1000);
}
return 0;
}
Gruvin9xSim *th9xSim;
void doFxEvents()
{
@ -387,7 +366,6 @@ int main(int argc,char **argv)
if(argc>=2){
eepromFile = argv[1];
}
printf("eeprom = %s\n", eepromFile);
// Each FOX GUI program needs one, and only one, application object.
// The application objects coordinates some common stuff shared between
@ -421,10 +399,8 @@ int main(int argc,char **argv)
th9xSim->show(); // Otherwise the main window gets centred across my two monitors, split down the middle.
#endif
InitEepromThread();
pthread_t pid;
pthread_create(&pid, NULL, &main_thread, NULL);
StartEepromThread();
StartMainThread();
return application.run();
}