kopia lustrzana https://github.com/OpenRTX/OpenRTX
Small reorganization and cleanup of splash screen code, fixed bug causing audio path for voice prompts never being released at vp end
rodzic
d5d49fbbb2
commit
f26afc42e5
|
@ -68,7 +68,6 @@ void openrtx_init()
|
||||||
// Display splash screen, turn on backlight after a suitable time to
|
// Display splash screen, turn on backlight after a suitable time to
|
||||||
// hide random pixels during render process
|
// hide random pixels during render process
|
||||||
ui_drawSplashScreen(true);
|
ui_drawSplashScreen(true);
|
||||||
vp_announceSplashScreen();
|
|
||||||
gfx_render();
|
gfx_render();
|
||||||
sleepFor(0u, 30u);
|
sleepFor(0u, 30u);
|
||||||
platform_setBacklightLevel(state.settings.brightness);
|
platform_setBacklightLevel(state.settings.brightness);
|
||||||
|
@ -78,9 +77,6 @@ void openrtx_init()
|
||||||
state.gpsDetected = gps_detect(1000);
|
state.gpsDetected = gps_detect(1000);
|
||||||
if(state.gpsDetected) gps_init(9600);
|
if(state.gpsDetected) gps_init(9600);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Keep the splash screen for 1 second
|
|
||||||
sleepFor(1u, 0u);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void *openrtx_run()
|
void *openrtx_run()
|
||||||
|
|
|
@ -56,9 +56,12 @@ void *ui_threadFunc(void *arg)
|
||||||
bool sync_rtx = true;
|
bool sync_rtx = true;
|
||||||
long long time = 0;
|
long long time = 0;
|
||||||
|
|
||||||
// Load initial state and perform a GUI draw
|
// Load initial state and update the UI
|
||||||
ui_saveState();
|
ui_saveState();
|
||||||
ui_updateGUI();
|
ui_updateGUI();
|
||||||
|
|
||||||
|
// Keep the splash screen for one second before rendering the new UI screen
|
||||||
|
sleepFor(1u, 0u);
|
||||||
gfx_render();
|
gfx_render();
|
||||||
|
|
||||||
while(state.devStatus != SHUTDOWN)
|
while(state.devStatus != SHUTDOWN)
|
||||||
|
|
|
@ -627,11 +627,11 @@ void vp_tick()
|
||||||
// see if we've finished.
|
// see if we've finished.
|
||||||
if(vpCurrentSequence.pos == vpCurrentSequence.length)
|
if(vpCurrentSequence.pos == vpCurrentSequence.length)
|
||||||
{
|
{
|
||||||
disableSpkOutput();
|
|
||||||
voicePromptActive = false;
|
voicePromptActive = false;
|
||||||
vpCurrentSequence.pos = 0;
|
vpCurrentSequence.pos = 0;
|
||||||
vpCurrentSequence.c2DataIndex = 0;
|
vpCurrentSequence.c2DataIndex = 0;
|
||||||
vpCurrentSequence.c2DataLength = 0;
|
vpCurrentSequence.c2DataLength = 0;
|
||||||
|
disableSpkOutput();
|
||||||
codec_stop();
|
codec_stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1116,21 +1116,15 @@ void ui_drawSplashScreen(bool centered)
|
||||||
{
|
{
|
||||||
gfx_clearScreen();
|
gfx_clearScreen();
|
||||||
point_t splash_origin = {0,0};
|
point_t splash_origin = {0,0};
|
||||||
#ifdef OLD_SPLASH
|
|
||||||
if(centered)
|
|
||||||
splash_origin.y = SCREEN_HEIGHT / 2 + 6;
|
|
||||||
else
|
|
||||||
splash_origin.y = SCREEN_HEIGHT / 4;
|
|
||||||
gfx_print(splash_origin, FONT_SIZE_12PT, TEXT_ALIGN_CENTER, yellow_fab413,
|
|
||||||
currentLanguage->openRTX);
|
|
||||||
#else
|
|
||||||
if(centered)
|
if(centered)
|
||||||
splash_origin.y = SCREEN_HEIGHT / 2 - 6;
|
splash_origin.y = SCREEN_HEIGHT / 2 - 6;
|
||||||
else
|
else
|
||||||
splash_origin.y = SCREEN_HEIGHT / 5;
|
splash_origin.y = SCREEN_HEIGHT / 5;
|
||||||
gfx_print(splash_origin, FONT_SIZE_12PT, TEXT_ALIGN_CENTER, yellow_fab413,
|
gfx_print(splash_origin, FONT_SIZE_12PT, TEXT_ALIGN_CENTER, yellow_fab413,
|
||||||
"O P N\nR T X");
|
"O P N\nR T X");
|
||||||
#endif
|
|
||||||
|
vp_announceSplashScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ui_saveState()
|
void ui_saveState()
|
||||||
|
|
Ładowanie…
Reference in New Issue