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 caused a GUI lockup * Cosmetics
This commit is contained in:
parent
81e9fe5201
commit
f4b54ea332
4 changed files with 27 additions and 14 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue