-
Notifications
You must be signed in to change notification settings - Fork 122
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
Added a button and code to clear gcode. #590
Conversation
This does what it says on the box. It leaves the gcode file selection in groundcontrol.ini alone so that on next launch the previously selected gcode file is back and the location is preserved. |
Fantastic! Excellent mastery of GitHub! For anyone following along here's what the button looks like: How do we feel about moving the button over into one of the other less crowded columns? Maybe replacing that "zero z" button that has been moved into the z-axis popup? To make changes, just make a new commit to the same branch as you did before (ClearGCode) and it will show up here automatically 👍 👍 |
I thought of that, but I kinda like how each column is dedicated to something "View" (everything dealing with code) (maybe should be "Code" instead), Run (if you hit these buttons something happens). OTOH, I suppose you could put a button on the file picker to "clear". I was also trying to pass in python main.py -c:data:GCodeFilename:"" to see if it would blank at startup (just in case you have g-code that explodes GroundControl), but evidently I don't understand command line parameters much... |
I've had success with a command line argument to groundcontrol in the past, but can't find the code right now. |
@@ -156,8 +156,7 @@ def reloadGcode(self, *args): | |||
else: | |||
self.data.zMoves.append(index) | |||
except: | |||
if filename is not "": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we added this to fix issue #520 . Sorry to nitpick!
That patch for issue #520 isn't needed with the code brought by this PR. This handles the missing file by clearing the gcode list. |
Great catch! |
Sorry for missing that |
In that case it looks great to me! 👍 👍 |
I wanted to be able to clear the g-code buffer to clean up the screen.
Plus, this is a way for me to see how to use GitHub...