--- a/Marlin.ino Sat Nov 07 13:23:07 2015 +0100 +++ b/Marlin.ino Sat Nov 07 13:24:46 2015 +0100 @@ -625,18 +625,18 @@ plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); \ destination[LETTER##_AXIS] = 1.1 * max_length[LETTER##_AXIS] * LETTER##_HOME_DIR; \ feedrate = fast_home_feedrate[LETTER##_AXIS]; \ - plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \ + plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder, false); \ st_synchronize();\ \ current_position[LETTER##_AXIS] = 0;\ plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);\ destination[LETTER##_AXIS] = -LETTER##_HOME_RETRACT_MM * LETTER##_HOME_DIR;\ - plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \ + plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder, false); \ st_synchronize();\ \ destination[LETTER##_AXIS] = 2*LETTER##_HOME_RETRACT_MM * LETTER##_HOME_DIR;\ feedrate = homing_feedrate[LETTER##_AXIS] ; \ - plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \ + plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder, false); \ st_synchronize();\ \ current_position[LETTER##_AXIS] = LETTER##_HOME_POS;\ @@ -714,10 +714,16 @@ switch((int)code_value()) { case 0: // G0 -> G1 + if(Stopped == false) { + get_coordinates(); // For X Y Z E F + prepare_move(false); + //ClearToSend(); + return; + } case 1: // G1 if(Stopped == false) { get_coordinates(); // For X Y Z E F - prepare_move(); + prepare_move(true); //ClearToSend(); return; } @@ -1562,20 +1568,20 @@ { destination[Z_AXIS] += z_off_d; feedrate = fast_home_feedrate[Z_AXIS]; - prepare_move(); + prepare_move(false); destination[X_AXIS] = temp_position[X_AXIS] + x_off_d; destination[Y_AXIS] = temp_position[Y_AXIS] + y_off_d; feedrate = fast_home_feedrate[X_AXIS]; - prepare_move(); + prepare_move(false); } else { destination[X_AXIS] += x_off_d; destination[Y_AXIS] += y_off_d; feedrate = fast_home_feedrate[X_AXIS]; - prepare_move(); + prepare_move(false); destination[Z_AXIS] = temp_position[Z_AXIS] + z_off_d; feedrate = fast_home_feedrate[Z_AXIS]; - prepare_move(); + prepare_move(false); } for(int8_t i=0; i < NUM_AXIS; i++) @@ -1656,7 +1662,7 @@ } } -void prepare_move() +void prepare_move(bool laser_on) { // transform destination ********************************************* @@ -1675,7 +1681,7 @@ if (modified_destination[Z_AXIS] > max_length[Z_AXIS]) modified_destination[Z_AXIS] = max_length[Z_AXIS]; } previous_millis_cmd = millis(); - plan_buffer_line(modified_destination[X_AXIS], modified_destination[Y_AXIS], modified_destination[Z_AXIS], destination[E_AXIS], feedrate*feedmultiply/60/100.0, active_extruder); + plan_buffer_line(modified_destination[X_AXIS], modified_destination[Y_AXIS], modified_destination[Z_AXIS], destination[E_AXIS], feedrate*feedmultiply/60/100.0, active_extruder, laser_on); for(int8_t i=0; i < NUM_AXIS; i++) { current_position[i] = destination[i]; }