Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding refresh() function #2

Merged
merged 3 commits into from
Feb 20, 2024
Merged

adding refresh() function #2

merged 3 commits into from
Feb 20, 2024

Conversation

BlitzCityDIY
Copy link
Contributor

@BlitzCityDIY BlitzCityDIY commented Feb 15, 2024

Adding the kitty printer progress here along with notes:

added a refresh() function to pycamera that only calls esp_camera_fb_return(frame) so that the gameboy filter can refresh on the display.
the gameboy filter is pulled from the CircuitPython module: https://github.com/adafruit/circuitpython/blob/main/shared-module/bitmaptools/__init__.c#L774C1-L862C2
i tried two different methods for printing to the cat printer: drawBitmap and drawPixel. drawBitmap is commented out, but wanted to leave for prosperity

the behavior i was experiencing was that 9/10 times the printer would connect properly, it would receive the buffer to print, would start printing but would stop before completing the task. the memento would think it was still printing and essentially be frozen, requiring a reset. the percentage that printed was different every time. 1/10 times the print would finish properly and the memento would go back to previewing with the filter. if a 2nd print was attempted though, the partial print behavior would occur.

my theory is that the pictures are overwhelming the printer buffer or that a command is missing to clear memory on the printer. i say this because if you don't call cat.fillScreen(1) to fill the buffer with white, you will get a ghost image of what you previously sent to the buffer. also if i send an empty white buffer it "prints" without the partial print issues.

i tried experimenting with the initial buffer size for the printer but that did not change things. based on what i've read about the printer it expects the [48 * 400] sized buffer so i've left that here.

i did try the Thermal Printer library but it has errors with IDF5. compiled with release BSP and it sees the printer but does not connect.

@BlitzCityDIY BlitzCityDIY marked this pull request as ready for review February 20, 2024 19:45
@BlitzCityDIY
Copy link
Contributor Author

cat printer code will be added to learn guide repo. adding simple refresh function that only calls esp_camera_fb_return(frame) so that the gameboy filter can refresh on the display.

@BlitzCityDIY BlitzCityDIY changed the title adding kitty printer progress adding refresh() function Feb 20, 2024
@BlitzCityDIY BlitzCityDIY merged commit 2cc8d20 into main Feb 20, 2024
2 checks passed
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.

1 participant