From f20506d726950537585732096049951cc78d35db Mon Sep 17 00:00:00 2001 From: bdring Date: Sat, 24 Jul 2021 20:33:35 -0500 Subject: [PATCH] Wip - Homing --- Grbl_Esp32/data/config.yaml | 6 +++--- Grbl_Esp32/src/Limits.cpp | 4 +++- platformio.ini | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Grbl_Esp32/data/config.yaml b/Grbl_Esp32/data/config.yaml index a140214e..2be0d925 100644 --- a/Grbl_Esp32/data/config.yaml +++ b/Grbl_Esp32/data/config.yaml @@ -52,9 +52,9 @@ axes: mpos: 10 positive_direction: false feed_rate: 50.000 - seek_rate: 600.000 + seek_rate: 200.000 debounce_ms: 500 - pulloff: 1.500 + pulloff: 1.00 gang0: endstops: @@ -65,7 +65,7 @@ axes: step: gpio.26 gang1: endstops: - limit_neg: gpio.16:low:pu + limit_all: gpio.16:low:pu hard_limits: true stepstick: direction: gpio.33 diff --git a/Grbl_Esp32/src/Limits.cpp b/Grbl_Esp32/src/Limits.cpp index c95be810..27f28633 100644 --- a/Grbl_Esp32/src/Limits.cpp +++ b/Grbl_Esp32/src/Limits.cpp @@ -252,7 +252,8 @@ static void limits_go_home(uint8_t cycle_mask, uint32_t n_locate_cycles) { if (approach) { // Check limit state. Lock out cycle axes when they change. // XXX do we check only the switch in the direction of motion? - uint32_t limitedAxes = limits_check(-1); + //uint32_t limitedAxes = limits_check(-1); + uint32_t limitedAxes = Machine::Axes::posLimitMask | Machine::Axes::negLimitMask; if (old != remainingMotors) { //log_info("remainingMotors: " << remainingMotors); @@ -452,6 +453,7 @@ void limits_init() { // Return a mask of the switches that are engaged. AxisMask limits_check(AxisMask check_mask) { // Expand the bitmask to include both gangs + bit_true(check_mask, check_mask << 16); return (Machine::Axes::posLimitMask & check_mask) | (Machine::Axes::negLimitMask & check_mask); } diff --git a/platformio.ini b/platformio.ini index 56a29385..fcf5c212 100644 --- a/platformio.ini +++ b/platformio.ini @@ -14,7 +14,7 @@ include_dir = Grbl_Esp32 lib_dir = libraries test_dir = Grbl_Esp32/test data_dir = Grbl_Esp32/data -default_envs = wifibt +default_envs = wifi ;extra_configs=debug.ini [common_env_data]