[Taranis] Asynchronous screenshots (to ensure the LCD will be fully
refreshed before doing the screenshot)
This commit is contained in:
@@ -552,7 +552,7 @@ void evalFunctions()
|
|||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
case FUNC_SCREENSHOT:
|
case FUNC_SCREENSHOT:
|
||||||
if (!(functionsContext.activeSwitches & switch_mask)) {
|
if (!(functionsContext.activeSwitches & switch_mask)) {
|
||||||
writeScreenshot();
|
requestScreenshot = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -36,8 +36,9 @@
|
|||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
|
|
||||||
static uint8_t currentSpeakerVolume = 255;
|
uint8_t currentSpeakerVolume = 255;
|
||||||
uint8_t requiredSpeakerVolume = 255;
|
uint8_t requiredSpeakerVolume = 255;
|
||||||
|
uint8_t requestScreenshot = false;
|
||||||
|
|
||||||
void handleUsbConnection()
|
void handleUsbConnection()
|
||||||
{
|
{
|
||||||
@@ -207,4 +208,11 @@ void perMain()
|
|||||||
bt_wakeup();
|
bt_wakeup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (requestScreenshot) {
|
||||||
|
requestScreenshot = false;
|
||||||
|
writeScreenshot();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1474,6 +1474,10 @@ enum AUDIO_SOUNDS {
|
|||||||
extern uint8_t requiredSpeakerVolume;
|
extern uint8_t requiredSpeakerVolume;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
extern uint8_t requestScreenshot;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void checkBattery();
|
extern void checkBattery();
|
||||||
extern void opentxClose();
|
extern void opentxClose();
|
||||||
extern void opentxInit();
|
extern void opentxInit();
|
||||||
|
|||||||
Reference in New Issue
Block a user