Skip to content

feat: Allow screenshot retrieval from device#820

Merged
osteotek merged 5 commits intocrosspoint-reader:masterfrom
jpirnay:feat-command
Feb 12, 2026
Merged

feat: Allow screenshot retrieval from device#820
osteotek merged 5 commits intocrosspoint-reader:masterfrom
jpirnay:feat-command

Conversation

@jpirnay
Copy link
Contributor

@jpirnay jpirnay commented Feb 10, 2026

Summary

  • Add a small loop in main to be able to receive external commands, currently being sent via the debugging_monitor
  • Implemented command: cmd:SCREENSHOT sends the currently displayed screen to the monitor, which will then store it to screenshot.bmp

Additional Context

I was getting annoyed with taking tilted/unsharp photos of the device screen, so I added the ability to press Enter during the monitor execution and type SCREENSHOT to send a command. Could be extended in the future
screenshot.bmp


AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? No

@ngxson
Copy link
Contributor

ngxson commented Feb 10, 2026

May worth mentioning that I'm working on mostly the same feature on #715 , except that it allows much more than only screenshot (for example, also allow using a host directory as fake SD card)

In the long term, I also want to allow controlling buttons from host PC, so may you reconsider if this PR is still necessary?

@jpirnay
Copy link
Contributor Author

jpirnay commented Feb 10, 2026

May worth mentioning that I'm working on mostly the same feature on #715 , except that it allows much more than only screenshot (for example, also allow using a host directory as fake SD card)

In the long term, I also want to allow controlling buttons from host PC, so may you reconsider if this PR is still necessary?

I wasn't aware of your work - looking great - definitely way more advanced than anything in this simple monitor 🥇
I do believe both solutions have their merit - I am used to taking my (work) laptop with me all the time (which I may use according to company directives for smaller non-work-related tasks outside office hours) - and here a full Docker setup would not be possible.

@ngxson
Copy link
Contributor

ngxson commented Feb 10, 2026

Sounds ok then, I think the debugging system is quite still in early stage and some duplicated functionalities can be acceptable.

Just a small clarification though: my PR doesn't need docker to work, has minimal python dependency because the GUI is just a web page. The docker version is only required on the QEMU branch, which is currently discontinued.

Comment on lines +379 to +383
Serial.printf("SCREENSHOT_START:%d\n", HalDisplay::BUFFER_SIZE);
uint8_t* buf = display.getFrameBuffer();
Serial.write(buf, HalDisplay::BUFFER_SIZE);
Serial.printf("SCREENSHOT_END\n");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small note that the scheduler can always interrupt any this task between 2 Serial operations, this can lead to something like:

SCREENSHOT_START:123
(some other tasks printing stuff)
(then, screen data)
SCREENSHOT_END

This is a real problem I mentioned in my other PR, and I resolved it by simply give the current task highest priority. But probably it's not very necessary here, as the screenshot is always be taken on command, not automatically.

In the future, I think it will be cleaner to delegate any host-device communication to a dedicated class. At least on my PR, I added EmulationUtils.cpp for this purpose.

@osteotek osteotek merged commit 7a385d7 into crosspoint-reader:master Feb 12, 2026
6 checks passed
jdk2pq added a commit to jdk2pq/crosspoint-reader that referenced this pull request Feb 13, 2026
* master:
  feat: Allow screenshot retrieval from device (crosspoint-reader#820)
  feat: more power saving on idle (crosspoint-reader#801)
@jpirnay jpirnay deleted the feat-command branch February 14, 2026 14:54
Unintendedsideeffects pushed a commit to Unintendedsideeffects/crosspoint-reader that referenced this pull request Feb 17, 2026
## Summary

* Add a small loop in main to be able to receive external commands,
currently being sent via the debugging_monitor
* Implemented command: cmd:SCREENSHOT sends the currently displayed
screen to the monitor, which will then store it to screenshot.bmp

## Additional Context

I was getting annoyed with taking tilted/unsharp photos of the device
screen, so I added the ability to press Enter during the monitor
execution and type SCREENSHOT to send a command. Could be extended in
the future

[screenshot.bmp](https://github.com/user-attachments/files/25213230/screenshot.bmp)

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? No
saslv pushed a commit to saslv/crosspoint-reader that referenced this pull request Feb 19, 2026
## Summary

* Add a small loop in main to be able to receive external commands,
currently being sent via the debugging_monitor
* Implemented command: cmd:SCREENSHOT sends the currently displayed
screen to the monitor, which will then store it to screenshot.bmp

## Additional Context

I was getting annoyed with taking tilted/unsharp photos of the device
screen, so I added the ability to press Enter during the monitor
execution and type SCREENSHOT to send a command. Could be extended in
the future

[screenshot.bmp](https://github.com/user-attachments/files/25213230/screenshot.bmp)

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants