Add feature screenshot

This commit is contained in:
Armel FAUVEAU
2024-05-10 01:35:35 +02:00
parent f2287a83f8
commit 8ca71c1372
4 changed files with 72 additions and 0 deletions

View File

@@ -43,6 +43,10 @@
#include "ui/inputbox.h"
#include "ui/ui.h"
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
#include "screenshot.h"
#endif
#if defined(ENABLE_FMRADIO)
static void ACTION_Scan_FM(bool bRestart);
#endif
@@ -314,6 +318,11 @@ void ACTION_Handle(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{
funcShort = funcLong;
// For screenshot
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
getScreenShot();
#endif
if (!bKeyPressed) //ignore release if held
return;
}

View File

@@ -27,6 +27,10 @@
#include "ui/helper.h"
#include "ui/main.h"
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
#include "screenshot.h"
#endif
struct FrequencyBandInfo {
uint32_t lower;
uint32_t upper;
@@ -572,6 +576,10 @@ static void ToggleBacklight() {
} else {
BACKLIGHT_TurnOff();
}
// For screenshot
#ifdef ENABLE_FEAT_F4HWN_SCREENSHOT
getScreenShot();
#endif
}
static void ToggleStepsCount() {