#define gamma_limit_enable_checksum CHECKSUM("gamma_limit_enable")
#define homing_order_checksum CHECKSUM("homing_order")
-#define move_to_zero_checksum CHECKSUM("move_to_zero_after_home")
+#define move_to_origin_checksum CHECKSUM("move_to_origin_after_home")
#define STEPPER THEKERNEL->robot->actuators
#define STEPS_PER_MM(a) (STEPPER[a]->get_steps_per_mm())
// Homing States
enum{
- MOVING_TO_ORIGIN_FAST,
- MOVING_BACK,
- MOVING_TO_ORIGIN_SLOW,
+ MOVING_TO_ENDSTOP_FAST, // homing move
+ MOVING_BACK, // homing move
+ MOVING_TO_ENDSTOP_SLOW, // homing move
NOT_HOMING,
BACK_OFF_HOME,
- MOVE_TO_ZERO,
+ MOVE_TO_ORIGIN,
LIMIT_TRIGGERED
};
this->limit_enable[Y_AXIS]= THEKERNEL->config->value(beta_limit_enable_checksum)->by_default(false)->as_bool();
this->limit_enable[Z_AXIS]= THEKERNEL->config->value(gamma_limit_enable_checksum)->by_default(false)->as_bool();
- this->move_to_zero_after_home= THEKERNEL->config->value(move_to_zero_checksum)->by_default(false)->as_bool();
+ this->move_to_origin_after_home= THEKERNEL->config->value(move_to_origin_checksum)->by_default(false)->as_bool();
if(this->limit_enable[X_AXIS] || this->limit_enable[Y_AXIS] || this->limit_enable[Z_AXIS]){
register_for_event(ON_IDLE);
}
// If enabled will move the head to 0,0 after homing, but only if X and Y were set to home
-void Endstops::move_to_zero(char axes_to_move)
+void Endstops::move_to_origin(char axes_to_move)
{
if( (axes_to_move&0x03) != 3 ) return; // ignore if X and Y not homing
// Do we need to check if we are already at 0,0? probably not as the G0 will not do anything if we are
// float pos[3]; THEKERNEL->robot->get_axis_position(pos); if(pos[0] == 0 && pos[1] == 0) return;
- this->status = MOVE_TO_ZERO;
+ this->status = MOVE_TO_ORIGIN;
// Move to center using a regular move, use slower of X and Y fast rate
float rate= min(this->fast_rates[0], this->fast_rates[1])*60.0F;
char buf[32];
{
// this homing works for cartesian and delta printers
// Start moving the axes to the origin
- this->status = MOVING_TO_ORIGIN_FAST;
+ this->status = MOVING_TO_ENDSTOP_FAST;
for ( int c = X_AXIS; c <= Z_AXIS; c++ ) {
if ( ( axes_to_move >> c) & 1 ) {
this->feed_rate[c]= this->fast_rates[c];
}
// Start moving the axes to the origin slowly
- this->status = MOVING_TO_ORIGIN_SLOW;
+ this->status = MOVING_TO_ENDSTOP_SLOW;
for ( int c = X_AXIS; c <= Z_AXIS; c++ ) {
if ( ( axes_to_move >> c ) & 1 ) {
this->feed_rate[c]= this->slow_rates[c];
void Endstops::corexy_home(int home_axis, bool dirx, bool diry, float fast_rate, float slow_rate, unsigned int retract_steps)
{
- this->status = MOVING_TO_ORIGIN_FAST;
+ this->status = MOVING_TO_ENDSTOP_FAST;
this->feed_rate[X_AXIS]= fast_rate;
STEPPER[X_AXIS]->set_speed(0);
STEPPER[X_AXIS]->move(dirx, 10000000);
}
// Start moving the axes to the origin slowly
- this->status = MOVING_TO_ORIGIN_SLOW;
+ this->status = MOVING_TO_ENDSTOP_SLOW;
this->feed_rate[X_AXIS]= slow_rate;
STEPPER[X_AXIS]->set_speed(0);
STEPPER[X_AXIS]->move(dirx, 10000000);
}
// then move both X and Y until one hits the endstop
- this->status = MOVING_TO_ORIGIN_FAST;
+ this->status = MOVING_TO_ENDSTOP_FAST;
this->feed_rate[motor]= this->fast_rates[motor]*1.4142;
STEPPER[motor]->set_speed(0); // need to allow for more ground covered when moving diagonally
STEPPER[motor]->move(dir, 10000000);
// on some systems where 0,0 is bed center it is noce to have home goto 0,0 after homing
// default is off
- if(this->move_to_zero_after_home)
- move_to_zero(axes_to_move);
+ if(this->move_to_origin_after_home)
+ move_to_origin(axes_to_move);
// if limit switches are enabled we must back off endstop after setting home
back_off_home(axes_to_move);