1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-31 10:01:48 +02:00

Homing cycle 0 means not homed with home-all, but $HA would work

This commit is contained in:
Mitch Bradley
2021-07-01 22:37:58 -10:00
parent 96b0f93872
commit c090f96a2e
2 changed files with 4 additions and 2 deletions

View File

@@ -392,7 +392,7 @@ void limits_run_homing_cycles(AxisMask axis_mask) {
// Run all homing cycles
bool someAxisHomed = false;
for (int cycle = 0; cycle < MAX_N_AXIS; cycle++) {
for (int cycle = 1; cycle <= MAX_N_AXIS; cycle++) {
// Set axis_mask to the axes that home on this cycle
axis_mask = 0;
auto n_axis = config->_axes->_numberAxis;

View File

@@ -25,6 +25,8 @@ namespace Machine {
public:
Homing() = default;
// The homing cycles are 1,2,3 etc. 0 means not homed as part of home-all,
// but you can still home it manually with e.g. $HA
int _cycle = -1; // what homing cycle does this axis home on?
bool _square = false;
bool _positiveDirection = true;
@@ -37,7 +39,7 @@ namespace Machine {
float _locate_scaler = 1.0f;
// Configuration system helpers:
void validate() const override { Assert(_cycle >= 1, "Cycle has to be defined as >= 1 for homing sequence."); }
void validate() const override { Assert(_cycle >= 0, "Homing cycle must be defined"); }
void group(Configuration::HandlerBase& handler) override {
handler.item("cycle", _cycle);