if ( ( axes_to_move >> c ) & 1 ) {
while ( STEPPER[c]->is_moving() ) {
THEKERNEL->call_event(ON_IDLE);
+ if(THEKERNEL->is_halted()) return;
}
}
}
// Wait for all axes to have homed
if(!this->wait_for_homed(axes_to_move)) return;
-
- // Homing is done
- this->status = NOT_HOMING;
}
bool Endstops::wait_for_homed_corexy(int axis)
// wait until done
while ( STEPPER[X_AXIS]->is_moving() || STEPPER[Y_AXIS]->is_moving()) {
THEKERNEL->call_event(ON_IDLE);
+ if(THEKERNEL->is_halted()) return;
}
// Start moving the axes to the origin slowly
bool running= true;
while (running) {
THEKERNEL->call_event(ON_IDLE);
+ if(THEKERNEL->is_halted()) return;
for(int m=X_AXIS;m<=Y_AXIS;m++) {
if(this->pins[m + (this->home_direction[m] ? 0 : 3)].get()) {
// turn off motor
if (axes_to_move & 0x04) { // move Z
do_homing_cartesian(0x04); // just home normally for Z
}
-
- // Homing is done
- this->status = NOT_HOMING;
}
void Endstops::home(char axes_to_move)
for ( int c = X_AXIS; c <= Z_AXIS; c++ ) {
STEPPER[c]->move(0, 0);
}
-
+ this->status = NOT_HOMING;
}
// Start homing sequences by response to GCode commands