Przeglądaj źródła

{X,Y,Z}_{MIN,MAX}_POS are actually in Gcode coordinates.

Johann Rocholl 12 lat temu
rodzic
commit
9e7b5056a0
2 zmienionych plików z 12 dodań i 14 usunięć
  1. 8
    10
      Marlin/Configuration.h
  2. 4
    4
      Marlin/Marlin_main.cpp

+ 8
- 10
Marlin/Configuration.h Wyświetl plik

275
 #define Y_HOME_DIR 1
275
 #define Y_HOME_DIR 1
276
 #define Z_HOME_DIR 1
276
 #define Z_HOME_DIR 1
277
 
277
 
278
-#define min_software_endstops false //If true, axis won't move to coordinates less than HOME_POS.
279
-#define max_software_endstops false //If true, axis won't move to coordinates greater than the defined lengths below.
280
-
281
-// Travel limits after homing
282
-// For deltabots, the MAX_POS doesn't have to be exact, it will be recalculated from MANUAL_Z_HOME_POS below.
283
-#define X_MAX_POS 620
284
-#define X_MIN_POS 0
285
-#define Y_MAX_POS 620
286
-#define Y_MIN_POS 0
287
-#define Z_MAX_POS 620
278
+#define min_software_endstops true //If true, axis won't move to coordinates less than *_MIN_POS.
279
+#define max_software_endstops true //If true, axis won't move to coordinates greater than *_MAX_POS.
280
+
281
+#define X_MAX_POS 90
282
+#define X_MIN_POS -90
283
+#define Y_MAX_POS 90
284
+#define Y_MIN_POS -90
285
+#define Z_MAX_POS MANUAL_Z_HOME_POS
288
 #define Z_MIN_POS 0
286
 #define Z_MIN_POS 0
289
 
287
 
290
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
288
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)

+ 4
- 4
Marlin/Marlin_main.cpp Wyświetl plik

618
       0) {
618
       0) {
619
     current_position[axis] = 0;
619
     current_position[axis] = 0;
620
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
620
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
621
-    destination[axis] = 1.5 * max_length(axis) * home_dir(axis);
621
+    destination[axis] = 3 * Z_MAX_LENGTH;
622
     feedrate = homing_feedrate[axis];
622
     feedrate = homing_feedrate[axis];
623
     plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
623
     plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
624
     st_synchronize();
624
     st_synchronize();
740
         current_position[Z_AXIS] = 0;
740
         current_position[Z_AXIS] = 0;
741
         plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); 
741
         plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); 
742
 
742
 
743
-        destination[X_AXIS] = 1.5 * X_MAX_LENGTH * X_HOME_DIR;
744
-        destination[Y_AXIS] = 1.5 * Y_MAX_LENGTH * Y_HOME_DIR;
745
-        destination[Z_AXIS] = 1.5 * Z_MAX_LENGTH * Z_HOME_DIR;
743
+        destination[X_AXIS] = 3 * Z_MAX_LENGTH;
744
+        destination[Y_AXIS] = 3 * Z_MAX_LENGTH;
745
+        destination[Z_AXIS] = 3 * Z_MAX_LENGTH;
746
         feedrate = 1.732 * homing_feedrate[X_AXIS];
746
         feedrate = 1.732 * homing_feedrate[X_AXIS];
747
         plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
747
         plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
748
         st_synchronize();
748
         st_synchronize();

Ładowanie…
Anuluj
Zapisz