From b7750acef473ef1db2332a5f362eb074b5172d8c Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Wed, 7 Jul 2021 18:57:19 -1000 Subject: [PATCH 1/2] Dynamixel: count_max was modifying _countMin --- Grbl_Esp32/src/Motors/Dynamixel2.h | 2 +- Grbl_Esp32/src/Motors/Solenoid.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Grbl_Esp32/src/Motors/Dynamixel2.h b/Grbl_Esp32/src/Motors/Dynamixel2.h index 42b423b2..580d1a90 100644 --- a/Grbl_Esp32/src/Motors/Dynamixel2.h +++ b/Grbl_Esp32/src/Motors/Dynamixel2.h @@ -127,7 +127,7 @@ namespace Motors { handler.item("invert_direction", _invert_direction); handler.item("count_min", _countMin); - handler.item("count_max", _countMin); + handler.item("count_max", _countMax); handler.item("full_time_move", _dynamixelFullTimeMove); handler.section("uart", _uart); diff --git a/Grbl_Esp32/src/Motors/Solenoid.h b/Grbl_Esp32/src/Motors/Solenoid.h index 60b62077..e00164a3 100644 --- a/Grbl_Esp32/src/Motors/Solenoid.h +++ b/Grbl_Esp32/src/Motors/Solenoid.h @@ -12,8 +12,9 @@ namespace Motors { void init() override; void set_disable(bool disable) override; - float _transition_poiont; - protected: + float _transition_point; + + protected: void config_message() override; }; } From 0191e8ca0cb27a49e431a6e3741bdd54792aabd9 Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Wed, 7 Jul 2021 19:03:28 -1000 Subject: [PATCH 2/2] Fixed homing_init_lock; limits_init() needed to be called first. --- Grbl_Esp32/src/Grbl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Grbl_Esp32/src/Grbl.cpp b/Grbl_Esp32/src/Grbl.cpp index 9cd14d9c..5b817c1e 100644 --- a/Grbl_Esp32/src/Grbl.cpp +++ b/Grbl_Esp32/src/Grbl.cpp @@ -111,6 +111,8 @@ void grbl_init() { sys.state = State::Idle; } + limits_init(); + // Check for power-up and set system alarm if homing is enabled to force homing cycle // by setting Grbl's alarm state. Alarm locks out all g-code commands, including the // startup scripts, but allows access to settings and internal commands. Only a homing @@ -128,7 +130,6 @@ void grbl_init() { Spindles::Spindle::switchSpindle(0, config->_spindles, spindle); config->_coolant->init(); - limits_init(); config->_probe->init(); }