Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces #3954, my previous attempt at solving this issue.
This PR aims to implement a more efficient means of reading a plain text gcode file for the PNG image data. The current approach will iterate through
MAX_SEARCH_LINES(which is set to2048) of lines at the start of the gcode file. Since thepngimage is placed at the end of the image section by Prusaslicer with the default profiles, sometimes the start of a valid image is after that max search length. This results in nothing getting returned when queried by Prusalink (and maybe Prusaconnect, still haven't tried it 😅) even though it does exist in the gcode file.With this PR, the following happens:
*The difference with this approach is it isn't necessary to cap the search at a max number of lines, it can be capped at a max number of lines since the beginning line of an image has been found.
I know the team is probably very busy and this is a low priority. I just periodically return to this issue whenever I'm printing something and the thumbnail shows me that question mark. This time I had an idea I thought was an improvement of the more simple approach in the original PR so I figured I'd try it out. In some way this may even be slightly more efficient than the current approach!
Whether this is approved or not, or even reviewed or not, still love my Prusa printer and thanks for all the hard work!