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

Support for conditional G Code in start & end GCode #7056

Closed
owendare opened this issue Feb 3, 2020 · 4 comments
Closed

Support for conditional G Code in start & end GCode #7056

owendare opened this issue Feb 3, 2020 · 4 comments
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.

Comments

@owendare
Copy link

owendare commented Feb 3, 2020

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.)

@owendare owendare added the Type: New Feature Adding some entirely new functionality. label Feb 3, 2020
@mahtDFR
Copy link
Contributor

mahtDFR commented Feb 4, 2020

Sounds like a syntax checker. Not a huge benefit to us but shouldn't be too hard to implement. I will put it up for discussion and see what comes back.

@mahtDFR
Copy link
Contributor

mahtDFR commented Feb 5, 2020

After a quick discussion we think this is a good suggestion but just not something we have time for now, so I have had to defer it. We are open to pull requests that fix this issue.

@mahtDFR mahtDFR added Status: Deferred We don't have time to work on this for now but intend to in the future. Category: Cura and removed Category: Cura labels Feb 5, 2020
@github-actions
Copy link
Contributor

Hi 👋,
We are cleaning our list of issues to improve our focus.
This feature request seems to be older than a year, which is at least three major Cura releases ago.
It also received the label Deferred indicating that we did not have time to work on it back then and haven't found time to work on it since.

If this is still something that you think can improve how you and others use Cura, can you please leave a comment?
We will have a fresh set of eyes to look at it.

If it has been resolved or don't need it to be improved anymore, you don't have to do anything, and this issue will be automatically closed in 14 days.

@github-actions github-actions bot added the Status: Stale ⌛ This issue is over a year old. It might be obsolete or just needs a fresh set of eyes label Jun 29, 2023
@github-actions
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.
If you encounter this issue and still have a need for this, you are welcome to make a fresh new issue with an updated description.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

4 participants