[Taranis] A lot of new features, >100 hours work in one commit...
This commit is contained in:
+4
-20
@@ -297,14 +297,16 @@ void *main_thread(void *)
|
||||
g_menuStack[0] = menuMainView;
|
||||
g_menuStack[1] = menuModelSelect;
|
||||
|
||||
eeReadAll(); // load general setup and selected model
|
||||
|
||||
#if defined(CPUARM) && defined(SDCARD)
|
||||
refreshSystemAudioFiles();
|
||||
#endif
|
||||
|
||||
eeReadAll(); // load general setup and selected model
|
||||
|
||||
if (g_eeGeneral.backlightMode != e_backlight_mode_off) backlightOn(); // on Tx start turn the light on
|
||||
|
||||
LUA_INIT();
|
||||
|
||||
if (main_thread_running == 1) {
|
||||
opentxStart();
|
||||
}
|
||||
@@ -335,16 +337,6 @@ void *main_thread(void *)
|
||||
#define getcwd _getcwd
|
||||
#endif
|
||||
|
||||
#if defined(LUA)
|
||||
extern void luaTask(void * pdata);
|
||||
void *lua_thread(void *)
|
||||
{
|
||||
luaTask(NULL);
|
||||
return NULL;
|
||||
}
|
||||
pthread_t lua_thread_pid;
|
||||
#endif
|
||||
|
||||
pthread_t main_thread_pid;
|
||||
void StartMainThread(bool tests)
|
||||
{
|
||||
@@ -355,20 +347,12 @@ void StartMainThread(bool tests)
|
||||
|
||||
main_thread_running = (tests ? 1 : 2);
|
||||
pthread_create(&main_thread_pid, NULL, &main_thread, NULL);
|
||||
|
||||
#if defined(LUA)
|
||||
pthread_create(&lua_thread_pid, NULL, &lua_thread, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
void StopMainThread()
|
||||
{
|
||||
main_thread_running = 0;
|
||||
pthread_join(main_thread_pid, NULL);
|
||||
|
||||
#if defined(LUA)
|
||||
pthread_join(lua_thread_pid, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
pthread_t eeprom_thread_pid;
|
||||
|
||||
Reference in New Issue
Block a user