Skip to content

Commit

Permalink
Merge pull request #1011 from bdring/ResetFromArc
Browse files Browse the repository at this point in the history
Fix reset from arc
  • Loading branch information
MitchBradley authored Sep 2, 2023
2 parents 18f7b65 + a79981a commit 4faae26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions FluidNC/src/Error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ std::map<Error, const char*> ErrorNames = {
{ Error::AuthenticationFailed, "Authentication failed!" },
{ Error::Eol, "End of line" },
{ Error::Eof, "End of file" },
{ Error::Reset, "System Reset" },
{ Error::AnotherInterfaceBusy, "Another interface is busy" },
{ Error::BadPinSpecification, "Bad Pin Specification" },
{ Error::JogCancelled, "Jog Cancelled" },
Expand Down
1 change: 1 addition & 0 deletions FluidNC/src/Error.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ enum class Error : uint8_t {
AuthenticationFailed = 110,
Eol = 111,
Eof = 112, // Not necessarily an error
Reset = 113,
AnotherInterfaceBusy = 120,
JogCancelled = 130,
BadPinSpecification = 150,
Expand Down
3 changes: 3 additions & 0 deletions FluidNC/src/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,9 @@ Error gc_execute_line(char* line) {
// As far as the parser is concerned, the position is now == target. In reality the
// motion control system might still be processing the action and the real tool position
// in any intermediate location.
if (sys.abort) {
return Error::Reset;
}
if (gc_update_pos == GCUpdatePos::Target) {
copyAxes(gc_state.position, gc_block.values.xyz);
} else if (gc_update_pos == GCUpdatePos::System) {
Expand Down

0 comments on commit 4faae26

Please sign in to comment.