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

Fixed limit state reporting

This commit is contained in:
bdring
2021-05-28 13:19:50 -05:00
parent e0c0ccb26e
commit c92ef9d9c1
2 changed files with 32 additions and 8 deletions

View File

@@ -7,15 +7,22 @@ step_type: rmt
dir_delay_microseconds: 1
pulse_microseconds: 2
disable_delay_us: 0
homing_init_lock: false
axes:
number_axis: 3
shared_stepper_disable: gpio.13:low
x:
limit: gpio.32:high
steps_per_mm: 800
max_rate: 2000
acceleration: 25
max_travel: 1000
home_mpos: 10
gang0:
endstops:
dual: gpio.17:low:pu
stepstick:
direction: gpio:14
step: gpio.12
@@ -23,20 +30,38 @@ axes:
null_motor:
y:
limit: gpio.4:low
steps_per_mm: 800
max_rate: 2000
acceleration: 25
max_travel: 1000
home_mpos: 10
gang0:
endstops:
dual: gpio.4:low:pu
stepstick:
direction: gpio:15
step: gpio.26
gang1:
null_motor:
z:
steps_per_mm: 800
max_rate: 2000
acceleration: 25
max_travel: 1000
home_mpos: 10
gang0:
endstops:
dual: gpio.16:low:pu
stepstick:
direction: gpio:33
step: gpio.27
gang1:
null_motor:
laser_mode: true
coolant:
flood: gpio.25:low
mist: gpio.21

View File

@@ -363,14 +363,13 @@ AxisMask limits_get_state() {
auto gangConfig = config->_axes->_axis[axis]->_gangs[gang_index];
if (gangConfig->_endstops != nullptr && gangConfig->_endstops->_dual.defined()) {
Pin& pin = gangConfig->_endstops->_dual;
bitnum_true(pinMask, (pin.read() << axis));
if (pin.read()) {
bitnum_true(pinMask, axis);
}
}
}
}
#ifdef INVERT_LIMIT_PIN_MASK // not normally used..unless you have both normal and inverted switches
pinMask ^= INVERT_LIMIT_PIN_MASK;
#endif
return pinMask;
}