Skip to content
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

configurable start and end gcode #17

Closed
aligator opened this issue Jun 6, 2020 · 6 comments · Fixed by #45
Closed

configurable start and end gcode #17

aligator opened this issue Jun 6, 2020 · 6 comments · Fixed by #45
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@aligator
Copy link
Owner

aligator commented Jun 6, 2020

Currently the start and end gcode is hard coded here.

It would be great to have a configurable start and end gcode.
For now it would be enough to just use two string-options which are just injected into the gcode.

@aligator aligator added enhancement New feature or request good first issue Good for newcomers labels Jun 6, 2020
@kpfaulkner
Copy link
Contributor

Is this in regard to the non instruction messages?
ie.

"Generated with GoSlice"
"______________________"

Just want to be able to customise it?

@aligator
Copy link
Owner Author

I think this should be left hardcoded as a sort of branding.

b.AddComment("Generated with GoSlice")
b.AddComment("______________________")

With this issue I meant this block:

		// starting gcode
		b.AddComment("START_GCODE")
		b.AddCommand("G1 X0 Y20 Z0.2 F3000 ; get ready to prime")
		b.AddCommand("G92 E0 ; reset extrusion distance")
		b.AddCommand("G1 X200 E20 F600 ; prime nozzle")
		b.AddCommand("G1 Z5 F5000 ; lift nozzle")
		b.AddCommand("G92 E0 ; reset extrusion distance")

and for the ending gcode this:

		b.AddComment("END_GCODE")
		b.SetExtrusion(options.Print.LayerThickness, options.Printer.ExtrusionWidth, options.Filament.FilamentDiameter)
		b.AddCommand("M107 ; disable fan")

		// disable heaters
		b.AddCommand("M104 S0 ; Set Hot-end to 0C (off)")
		b.AddCommand("M140 S0 ; Set bed to 0C (off)")

@kpfaulkner
Copy link
Contributor

Should something like setting temperatures be something purely user defined? For safety shouldn't that always be executed? (yes, there is the argument about user knows what they're doing... but it would be easy enough to miss).

@aligator
Copy link
Owner Author

Good point, but I am more a fan of customizability and good defaults.

Another way would be something like an additional flag "ForceSafeDisable" or something like that which is set to true as default and adds the safe gcode after the custom gcode.
It would be a bit more complicated but maybe a good compromis...

What do you think?

@galamdring
Copy link
Contributor

Would you add the flag and custom code to PrinterOptions or GoSliceOptions? I'm thinking printer options makes sense if the future state includes profiles for different printers.

@aligator
Copy link
Owner Author

Hi :-)
I also think that PrinterOptions is better, because in most cases it is printer specific.

Just a note for you:
I am planning to change the license. So if you contribute, make sure you are also ok with the new license (Apache 2). I only need one missing agreement to finally change it: #44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants