1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00

Fixes #3937: When executed from Special Functions, Flight Reset cause… (#3942)

* Fixes #3937: When executed from Special Functions, Flight Reset caused a GUI lockup

* Cosmetics
This commit is contained in:
Damjan Adamic 2016-10-21 12:16:33 +02:00 committed by Andre Bernet
parent 81e9fe5201
commit f4b54ea332
4 changed files with 27 additions and 14 deletions

View file

@ -22,7 +22,7 @@
uint8_t currentSpeakerVolume = 255;
uint8_t requiredSpeakerVolume = 255;
uint8_t requestScreenshot = false;
uint8_t mainRequestFlags = 0;
void handleUsbConnection()
{
@ -399,6 +399,12 @@ void perMain()
periodicTick();
DEBUG_TIMER_STOP(debugTimerPerMain1);
if (mainRequestFlags & (1 << REQUEST_FLIGHT_RESET)) {
TRACE("Executing requested Flight Reset");
flightReset();
mainRequestFlags &= ~(1 << REQUEST_FLIGHT_RESET);
}
event_t evt = getEvent(false);
if (evt && (g_eeGeneral.backlightMode & e_backlight_mode_keys)) {
// on keypress turn the light on
@ -455,9 +461,9 @@ void perMain()
#endif
#if defined(PCBTARANIS)
if (requestScreenshot) {
requestScreenshot = false;
if (mainRequestFlags & (1 << REQUEST_SCREENSHOT)) {
writeScreenshot();
mainRequestFlags &= ~(1 << REQUEST_SCREENSHOT);
}
#endif