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

WIP - Homing

Homing is good now. Need to figure out some edge cases and test.
This commit is contained in:
bdring
2021-07-25 10:50:10 -05:00
parent d82456d63e
commit 871158d59e
2 changed files with 1 additions and 10 deletions

View File

@@ -30,7 +30,7 @@ axes:
seek_rate: 200.000
debounce_ms: 500
pulloff: 1.000
square: true
square: false
gang0:
endstops:

View File

@@ -245,21 +245,12 @@ static void limits_go_home(uint8_t cycle_mask, uint32_t n_locate_cycles) {
// The following might fail if only one gang has limit switches. Anaylze me.
uint32_t remainingMotors = (cycle_mask | (cycle_mask << 16)) & Machine::Axes::motorMask;
uint32_t old = 0;
do {
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 = Machine::Axes::posLimitMask | Machine::Axes::negLimitMask;
if (old != remainingMotors) {
//log_info("remainingMotors: " << remainingMotors);
log_info("remainingMotors: 0x" << String(remainingMotors, 16));
log_info("limitedAxes: 0x" << String(limitedAxes, 16));
old = remainingMotors;
}
config->_axes->stop_motors(limitedAxes);
bit_false(remainingMotors, limitedAxes);
}