Support for conditional G Code in start & end GCode #7056
Labels
Status: Deferred
We don't have time to work on this for now but intend to in the future.
Status: Stale ⌛
This issue is over a year old. It might be obsolete or just needs a fresh set of eyes
Type: New Feature
Adding some entirely new functionality.
Is your feature request related to a problem? Please describe.
Yes.
Reprap firmware now supports conditional G Code. The syntax for the conditional statements requires indenting of the code to be executed.
At present, Cura strips leading spaces and tab indents from the start and finish G Code when the program closes. This causes the conditional code to execute regardless of how the statement resolves.
eg
if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed
G28
// rest of start code
becomes
if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed
G28
// rest of start code
causing the G28 too execute even if the system is already homed.
Describe the solution you'd like
Ability to define hard indents which are not stripped.
This could be done with the ascii code #9 or some other method.
Describe alternatives you've considered
It is possible to put the start and end GCode into a macro which can be called, however this will be problematic in that if Cura does not see certain values (temperature etc) in teh start code, it will automaticall add them which may circumvent the contents of the macro.
Affected users and/or printers
Affects anyone using reprap firmware >V3
Additional context
(Add any other context or screenshots about the feature request here.)
The text was updated successfully, but these errors were encountered: