Support for message display from g-code comments #615
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 implements support for displaying messages embedded in g-code comments, along the lines of #316
For any lines beginning with '(MSG' (case-insensitive) the remainder of the line sans the last character is extracted as the message, trimmed of whitespace. If the first character of that is a comma, it is also removed, as it appears both (msg whatever) and (msg,whatever) forms are in use.
The message is placed in the Sender state variable which is already sent to the app and it is then used as an update source for the UI.
Implemented in both 3D and 2D views with a toggle in the 3D settings.
Message can be cleared by the program at any time by sending a blank (msg), (msg,), or something of that nature. Final message remains displayed, but is automatically cleared on restart, or file load/unload.
I'm certainly open to any suggestions on things that could be different and I hope I didn't do anything too out of line with the existing code style.