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

Cycle 0 and Macro Fixes #1059

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FluidNC/src/Machine/Axis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace Machine {
m->init();
}
}
if (_homing->_cycle) {
if (_homing && _homing->_cycle != Machine::Homing::set_mpos_only) {
_homing->init();
set_bitnum(Axes::homingMask, _axis);
}
Expand Down
12 changes: 6 additions & 6 deletions FluidNC/src/Machine/Macros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ Cmd findOverride(std::string name) {
return it == overrideCodes.end() ? Cmd::None : it->second;
}

bool Macro::run() {
if (sys.state != State::Idle) {
log_error("Macro can only be used in idle state");
bool Macro::run() { // return true if the macro was run
const std::string& s = _gcode;
if (_gcode == "") {
return false;
}

const std::string& s = _gcode;
if (_gcode == "") {
return true;
if (sys.state != State::Idle) {
log_error("Macro can only be used in idle state");
return false;
}

log_info("Running macro " << _name << ": " << _gcode);
Expand Down