Making screenshot command device dimensions aware
This commit is contained in:
+3
-1
@@ -339,8 +339,10 @@ void loop() {
|
||||
String cmd = line.substring(4);
|
||||
cmd.trim();
|
||||
if (cmd == "SCREENSHOT") {
|
||||
const uint16_t width = display.getDisplayWidth();
|
||||
const uint16_t height = display.getDisplayHeight();
|
||||
const uint32_t bufferSize = display.getBufferSize();
|
||||
logSerial.printf("SCREENSHOT_START:%d\n", bufferSize);
|
||||
logSerial.printf("SCREENSHOT_START:%d:%d:%d\n", width, height, bufferSize);
|
||||
uint8_t* buf = display.getFrameBuffer();
|
||||
logSerial.write(buf, bufferSize);
|
||||
logSerial.printf("SCREENSHOT_END\n");
|
||||
|
||||
Reference in New Issue
Block a user