Screenshot tool and a build flag for conditional screenshot functionality:

- Adds the possibility to capture the device screen and save it as a PNG
  image
- Wrap the code behind ENABLE_SCREENSHOT build flag, as per instructions
  in README
This commit is contained in:
vanous
2026-05-27 22:08:28 +02:00
parent 5b40e91df3
commit 7fc8b4b5a5
11 changed files with 612 additions and 0 deletions
+10
View File
@@ -3,6 +3,10 @@
#include <Arduino.h>
#include <Mesh.h>
#include "AbstractUITask.h"
#include <helpers/ui/DisplayDriver.h>
// Forward declaration for UITask
class UITask;
/*------------ Frame Protocol --------------*/
#define FIRMWARE_VER_CODE 11
@@ -223,6 +227,12 @@ private:
void checkCLIRescueCmd();
void checkSerialInterface();
bool isValidClientRepeatFreq(uint32_t f) const;
#ifdef ENABLE_SCREENSHOT
void handleScreenshotRequest();
void sendScreenshotResponse(DisplayDriver* display, uint8_t* buffer, int bufferSize);
#endif
UITask* getUITask() { return (UITask*)_ui; }
// helpers, short-cuts
void saveChannels() { _store->saveChannels(this); }