Erik van der Zalm пре 13 година
родитељ
комит
27664c6da6
1 измењених фајлова са 13 додато и 1 уклоњено
  1. 13
    1
      Marlin/Marlin.pde

+ 13
- 1
Marlin/Marlin.pde Прегледај датотеку

33
 #include "Marlin.h"
33
 #include "Marlin.h"
34
 #include "speed_lookuptable.h"
34
 #include "speed_lookuptable.h"
35
 
35
 
36
-char version_string[] = "0.9.8";
36
+char version_string[] = "0.9.9";
37
 
37
 
38
 #ifdef SDSUPPORT
38
 #ifdef SDSUPPORT
39
 #include "SdFat.h"
39
 #include "SdFat.h"
947
 
947
 
948
 void prepare_move()
948
 void prepare_move()
949
 {
949
 {
950
+  if (min_software_endstops) {
951
+    if (destination[X_AXIS] < 0) destination[X_AXIS] = 0.0;
952
+    if (destination[Y_AXIS] < 0) destination[Y_AXIS] = 0.0;
953
+    if (destination[Z_AXIS] < 0) destination[Z_AXIS] = 0.0;
954
+  }
955
+
956
+  if (max_software_endstops) {
957
+    if (destination[X_AXIS] > X_MAX_LENGTH) destination[X_AXIS] = X_MAX_LENGTH;
958
+    if (destination[Y_AXIS] > Y_MAX_LENGTH) destination[Y_AXIS] = Y_MAX_LENGTH;
959
+    if (destination[Z_AXIS] > Z_MAX_LENGTH) destination[Z_AXIS] = Z_MAX_LENGTH;
960
+  }
961
+
950
   plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60.0);
962
   plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60.0);
951
   for(int i=0; i < NUM_AXIS; i++) {
963
   for(int i=0; i < NUM_AXIS; i++) {
952
     current_position[i] = destination[i];
964
     current_position[i] = destination[i];

Loading…
Откажи
Сачувај