From ab37c7b491ed067f9e41c7f1f85ecf69cfeedfbd Mon Sep 17 00:00:00 2001 From: bdring Date: Thu, 8 Jul 2021 13:19:44 -0500 Subject: [PATCH] Updated some yaml key names for consistency --- Grbl_Esp32/data/barts_3axis_test.yaml | 10 +++++----- Grbl_Esp32/data/config.yaml | 14 +++++++------- Grbl_Esp32/src/CoolantControl.cpp | 4 ++-- Grbl_Esp32/src/CoolantControl.h | 2 +- Grbl_Esp32/src/Limits.cpp | 2 +- Grbl_Esp32/src/Machine/Homing.h | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Grbl_Esp32/data/barts_3axis_test.yaml b/Grbl_Esp32/data/barts_3axis_test.yaml index 4ce854fa..9dba3b4e 100644 --- a/Grbl_Esp32/data/barts_3axis_test.yaml +++ b/Grbl_Esp32/data/barts_3axis_test.yaml @@ -23,10 +23,10 @@ axes: max_travel: 1000 soft_limits: false homing: - cycle: 1 + cycle: 2 positive_direction: false mpos: 10.000 - debounce: 10 + debounce_ms: 250 pulloff: 1.000 square: false seek_rate: 500.000 @@ -57,7 +57,7 @@ axes: cycle: 2 positive_direction: false mpos: 10.000 - debounce: 10 + debounce_ms: 250 pulloff: 1.000 square: false seek_rate: 500.000 @@ -87,7 +87,7 @@ axes: cycle: 2 positive_direction: false mpos: 10.000 - debounce: 10 + debounce_ms: 250 pulloff: 1.000 square: false seek_rate: 500.000 @@ -145,7 +145,7 @@ sdcard: coolant: flood: NO_PIN mist: NO_PIN - delay: 0.000 + delay_ms: 0.000 probe: pin: NO_PIN diff --git a/Grbl_Esp32/data/config.yaml b/Grbl_Esp32/data/config.yaml index c483afee..5326c881 100644 --- a/Grbl_Esp32/data/config.yaml +++ b/Grbl_Esp32/data/config.yaml @@ -9,7 +9,7 @@ stepping: pulse_us: 2 disable_delay_us: 0 -homing_init_lock: false +homing_init_lock: true axes: number_axis: 3 @@ -21,12 +21,12 @@ axes: acceleration: 25 max_travel: 1000 homing: - cycle: 2 + cycle: -1 mpos: 10 positive_direction: false feed_rate: 50.000 seek_rate: 200.000 - debounce: 500 + debounce_ms: 500 pulloff: 1.000 gang0: @@ -45,12 +45,12 @@ axes: acceleration: 25 max_travel: 1000 homing: - cycle: 2 + cycle: 0 mpos: 10 positive_direction: false feed_rate: 50.000 seek_rate: 600.000 - debounce: 500 + debounce_ms: 500 pulloff: 1.500 gang0: @@ -76,13 +76,13 @@ axes: feed_rate: 30.000 seek_scaler: 2.000 feed_scaler: 1.000 - debounce: 500 + debounce_ms: 500 pulloff: 1.000 gang0: endstops: dual: gpio.16:low:pu - hard_limits: true + hard_limits: false stepstick: direction: gpio.33 step: gpio.27 diff --git a/Grbl_Esp32/src/CoolantControl.cpp b/Grbl_Esp32/src/CoolantControl.cpp index bed87a0e..66c2f1a3 100644 --- a/Grbl_Esp32/src/CoolantControl.cpp +++ b/Grbl_Esp32/src/CoolantControl.cpp @@ -95,7 +95,7 @@ void CoolantControl::set_state(CoolantState state) { } write(state); sys.report_ovr_counter = 0; // Set to report change immediately - delay_msec(int32_t(1000.0 * _delay), DwellMode::SysSuspend); + delay_msec(_delay_ms, DwellMode::SysSuspend); } void CoolantControl::off() { @@ -116,5 +116,5 @@ void CoolantControl::sync(CoolantState state) { void CoolantControl::group(Configuration::HandlerBase& handler) { handler.item("flood", _flood); handler.item("mist", _mist); - handler.item("delay", _delay); + handler.item("delay_ms", _delay_ms); } diff --git a/Grbl_Esp32/src/CoolantControl.h b/Grbl_Esp32/src/CoolantControl.h index f767dbb9..012ee04f 100644 --- a/Grbl_Esp32/src/CoolantControl.h +++ b/Grbl_Esp32/src/CoolantControl.h @@ -31,7 +31,7 @@ class CoolantControl : public Configuration::Configurable { Pin _mist; Pin _flood; - float _delay = 0.0; + uint32_t _delay_ms = 0; void write(CoolantState state); diff --git a/Grbl_Esp32/src/Limits.cpp b/Grbl_Esp32/src/Limits.cpp index 70cd2ae3..8f0fef76 100644 --- a/Grbl_Esp32/src/Limits.cpp +++ b/Grbl_Esp32/src/Limits.cpp @@ -186,7 +186,7 @@ static void limits_go_home(uint8_t cycle_mask, uint32_t n_locate_cycles) { auto axisConfig = config->_axes->_axis[axis]; auto homing = axisConfig->_homing; - debounce = std::max(debounce, homing->_debounce); + debounce = std::max(debounce, homing->_debounce_ms); auto axis_homing_rate = seek ? homing->_seekRate : homing->_feedRate; diff --git a/Grbl_Esp32/src/Machine/Homing.h b/Grbl_Esp32/src/Machine/Homing.h index 6742a2bc..632d7c10 100644 --- a/Grbl_Esp32/src/Machine/Homing.h +++ b/Grbl_Esp32/src/Machine/Homing.h @@ -30,13 +30,13 @@ namespace Machine { int _cycle = -1; // what homing cycle does this axis home on? bool _square = false; bool _positiveDirection = true; - float _mpos = 0.0f; + float _mpos = 0.0f; // After homing this will be the mpos of the switch location float _feedRate = 50.0f; // pulloff and second touch speed float _seekRate = 200.0f; // this first approach speed float _pulloff = 1.0f; // mm - int _debounce = 250; // ms settling time for homing switches after motion + int _debounce_ms = 250; // ms settling time for homing switches after motion float _seek_scaler = 1.1f; // multiplied by max travel for max homing distance on first touch - float _feed_scaler = 1.0f; + float _feed_scaler = 1.1f; // multiplier to pulloff for moving to switch after pulloff // Configuration system helpers: void validate() const override { Assert(_cycle >= 0, "Homing cycle must be defined"); } @@ -47,7 +47,7 @@ namespace Machine { handler.item("mpos", _mpos); handler.item("feed_rate", _feedRate); handler.item("seek_rate", _seekRate); - handler.item("debounce", _debounce); + handler.item("debounce_ms", _debounce_ms); handler.item("pulloff", _pulloff); handler.item("square", _square); handler.item("seek_scaler", _seek_scaler);