G-code console for LVGL UI#20755
Merged
thinkyhead merged 105 commits intoMarlinFirmware:bugfix-2.0.xfrom Feb 1, 2021
Merged
Conversation
Bugfix 2.0.x
Bugfix 2.0.x
Contributor
Author
|
Should be ready now for inclusion... |
Jyers
pushed a commit
to Jyers/Marlin
that referenced
this pull request
Feb 3, 2021
susisstrolch
pushed a commit
to susisstrolch/Marlin
that referenced
this pull request
Feb 16, 2021
… into bugfix-2.0.x * 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin: (121 commits) [cron] Bump distribution date (2021-02-04) [cron] Bump distribution date (2021-02-03) Add "more" menu in LVGL interface (MarlinFirmware#20940) Evaluate ANY_SERIAL_IS in place Note (MarlinUI) limit on PREHEAT settings (MarlinFirmware#20966) Update a UBL comment (MarlinFirmware#20931) STM32 Shared Media - USB Mass Storage Device (MarlinFirmware#20956) Multi-language pertains to Color UI (MarlinFirmware#20972) Touch Calibration Screen auto-save option (MarlinFirmware#20971) Include ui_common for MARLIN_LOGO_FULL_SIZE (MarlinFirmware#20963) Fix host_response_handler compile (MarlinFirmware#20962) [cron] Bump distribution date (2021-02-02) LVGL UI G-code console (MarlinFirmware#20755) [cron] Bump distribution date (2021-02-01) Refresh screen on M22 (detach) (MarlinFirmware#20958) Fix AutoReporter implementation (MarlinFirmware#20959) Serial refactor followup (MarlinFirmware#20932) Init serial ports first (MarlinFirmware#20944) Remove extra G29 V newlines (MarlinFirmware#20955) [cron] Bump distribution date (2021-01-31) ...
kpishere
pushed a commit
to kpishere/Marlin
that referenced
this pull request
Feb 19, 2021
zillarob
pushed a commit
to zillarob/Marlin
that referenced
this pull request
Feb 25, 2021
zillarob
pushed a commit
to zillarob/Marlin
that referenced
this pull request
Feb 25, 2021
zillarob
pushed a commit
to zillarob/Marlin
that referenced
this pull request
Feb 26, 2021
zillarob
pushed a commit
to zillarob/Marlin
that referenced
this pull request
Mar 11, 2021
W4tel-BiDi
pushed a commit
to W4tel-BiDi/Marlin
that referenced
this pull request
Apr 5, 2021
thinkyhead
pushed a commit
that referenced
this pull request
Apr 30, 2021
|
I like the idea but I always get a blackscreen after pressing the check mark. I guess that's what you meant with the end detection issue. Even ok didn't help in my case. However I have some more feedback to this: It's a bit of a pain to enter g-code with this Keyboard layout. Would be a lot better if the standard screen was a num-block, a dot and the most important letters (G, M, X, Y, Z, E and what else are common letters for G-code Parameters) |
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.
Description
This is an additional menu for LVGL based UI to allow inputing G-Code directly in the interface and getting answer
It's located in the "More" menu from the "Tool" menu. The flow is like this:
I don't expect this code to land as-is, but instead request for comments about how to improve it or to better integrate with it.
Requirements
This requires LVGL, and I've based this code above the pending PR #20191.
I hope the former will be merged soon and I think it's better not to append more UI change on this other PR.
Benefits
This opens a lot of possibilities to use your printer without a computer connected to it (in standalone mode). All the features of Marlin are now accessible via the LCD screen (albeit via technical & textual representation) even if a graphical menu is missing to deal with it (for example, getting the current position of all axis is not present by default in LVGL, and this is useful to calibrate a BLTouch sensor).
Configurations
No configuration required. It's enabled by default when LVGL is enabled.
Issues
Currently, as you'll discover, I had to add a hook to the serial's
writefunction to capture the output of a G-Code command.Looking at the code, there's already some kind of hooking function for ethernet but it's completely non-expandable for third party.
I think Marlin would benefit from a better hooking system (something more generic to capture anything that goes to serial output whatever the serial output selected). Looking at the code, this means either rewriting the
SERIAL_CHARet al. macros so that they can be switched at compile time and/or runtime.I need to discuss with actual developers what would be the best solution. The solution in this PR is working for MarlinSerial's based on Hardware Serial, but not on USB serial, so it's far from perfect. It's using a pointer to a callback function that can be swapped to a null value to disable/enable hooking at runtime.
Another issue I have is to detect the end of a GCode command's answer. Some command ends with "ok" and I'm currently using this as a sentinel to unhook the serial capture, but I wonder if a signal could be added in the G-code processor to tells any hook that a command has completed processing.
Please let me know what you think, thanks!