-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
New Listening Mode + some bug fixes and cleanup #2179
Conversation
I do not agree with the things moved out from comment.c/h. In my book it is not an optimization creating new procedures/functions and calling them instead of direct accessing a variable. |
@kisslorand but they are printing information used by Printing menu that doesn't need to know/interface with other additional/extra modules such as comment module. Layer, time could be set by other modules/gcode while Printing menu simply retrieve and display them using Printing API only |
Now that you removed M73 Rxx check, what happens if it is present? |
it was always set to "false" in the code unless there is a case where it is set to "true" that I didn't see |
@guruathwal testing this PR I found a bug on Terminal. It seems that some texts will cause an infinite loop on the "while loop" (at line 787 in Terminal.c). The menuTerminalWindow menu will start an infinite page update (from 1 to 20) with no text displayed on screen. The loop is due to the presence of both "//" and ":". With theese characters, the exit condition on the loop is never met (or probably something inside the loop broke the code (e.g. getCharacterInfo)). When you have some time, could you please have a look to that issue? it seems quite important. Another minor bug I saw scrolling up on the window is that the ack messages (that were dispalyed with white color) are then displayed as a request command (orange color). |
@digant73 Thank you for notifying me. I will look into it now. |
I've been having random communication timeouts when using Repetier server connected via USB. Do you think this issue is related? |
@gordo3di no, I think it's not related to that PR. This PR simply purges (skips) all the gcodes that should be sent to the printer |
IMPROVEMENTS:
This mode is useful on main boards sharing the bus with TFT and USB (e.g. MKS GEN L) allowing Octoprint/Pronterface to properly control the printer (via USB) avoiding command collisions (otherwise present with TFT in normal mode).
The TFT will receive the ACK messages (spontaneous and/or related to gcodes from USB port) displaying on the screen all the status info.
The mode can be activated/deactivated on "Connection" menu. Existing labels (ON/OFF) and icon have been used to avoid to add new ones
NOTE: The mode state is stored on FLASH allowing to restore the mode at startup. This allows to power on/off the printer remotely and to control the printer via USB without the need of any touch (from the user) on the display to engage the mode
BUG FIXES: