chiark / gitweb /
refresh
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 9 Aug 2012 17:26:38 +0000 (18:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 9 Aug 2012 17:26:38 +0000 (18:26 +0100)
meta
patches/motion-control-max-min
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index bad103bd67ad153ca6ee1e0a2718a4af6cc58b29..daf578a84133317abd56a9cb1e3d297c9444bf2c 100644 (file)
--- a/meta
+++ b/meta
@@ -1,12 +1,11 @@
 Version: 1
-Previous: c869d73947758c139a40de8d705a4030e7dc1761
-Head: 1fe4e61fb9f752aefa3c894530e50825e577ccfb
+Previous: 4317c489e9bafb8d1d4fbd8078dbfc718b7ac313
+Head: 44befa5f783994f92f7c6fd39b7f581cf174d9d4
 Applied:
   marlin-pde-include-comment-for: 121f976406e6921f5b511f6dc4882985cf4b4133
   add-to-marlin-gitignore: 83dcad520f19d2ea6f1164b9c04e1430b679b3e2
   makefile-support-v-1: 3f7781d27a680fa4faeb5d7f38250e4877632ce3
-  motion-control-max-min: 858be0694a9217288dc360e4dd238295d2a748b7
-  refresh-temp: 1fe4e61fb9f752aefa3c894530e50825e577ccfb
+  motion-control-max-min: 44befa5f783994f92f7c6fd39b7f581cf174d9d4
 Unapplied:
   m206-always-use-homing-homeing: 05e455315f5429046a76632f17009c350e2ad732
   eeprom-provide-smaller-code-fo: 908bebda77f754b762a36f96bc7d938aca4935ba
index d0c15168cc35ff3f1d186895dad0daded2b9576b..0428969582c57616f9763a9981ce4e2726b5c96e 100644 (file)
@@ -1,41 +1,80 @@
 Bottom: eb35f0d7db096a862ee737a5537019f96d6e6f16
-Top:    f59c4f0f543cd186ce17875c743486d2e74e4c3f
+Top:    8e78a1676c97946f40c2ebb968bada04f6bac87a
 Author: Ian Jackson <ijackson@chiark.greenend.org.uk>
 Date:   2012-08-09 18:15:32 +0100
 
-software endstops: use *_MIN_POS and *_MAX_POS for arcs
+software_endstops: use *_MIN_POS and *_MAX_POS for arcs
 
 If [XYZ]_HOME_POS and [XYZ]_MIN_POS aren't 0, these corrections are
 wrong.  Use the same logic as in Marlin.pde:prepare_move: ie, clamp to
 [XYZ]_{MIN,MAX}_POS.
 
+While we're here, put this cut-and-paste code in a function
+clamp_to_software_endstops.
+
 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
 
 
 ---
 
+diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h
+index 4123634..75b57d0 100644
+--- a/Marlin/Marlin.h
++++ b/Marlin/Marlin.h
+@@ -169,6 +169,7 @@ bool IsStopped();
+ void enquecommand(const char *cmd); //put an ascii command at the end of the current buffer.
+ void prepare_arc_move(char isclockwise);
++void clamp_to_software_endstops(float target[3]);
+ #ifdef FAST_PWM_FAN
+ void setPwmFrequency(uint8_t pin, int val);
+diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
+index f38920b..d471d49 100644
+--- a/Marlin/Marlin.pde
++++ b/Marlin/Marlin.pde
+@@ -1541,7 +1541,7 @@ void get_arc_coordinates()
+    }
+ }
+-void prepare_move()
++void clamp_to_software_endstops(float target[3])
+ {
+   if (min_software_endstops) {
+     if (destination[X_AXIS] < X_MIN_POS) destination[X_AXIS] = X_MIN_POS;
+@@ -1554,6 +1554,12 @@ void prepare_move()
+     if (destination[Y_AXIS] > Y_MAX_POS) destination[Y_AXIS] = Y_MAX_POS;
+     if (destination[Z_AXIS] > Z_MAX_POS) destination[Z_AXIS] = Z_MAX_POS;
+   }
++}
++
++void prepare_move()
++{
++  clamp_to_software_endstops(destination);
++
+   previous_millis_cmd = millis();  
+   plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate*feedmultiply/60/100.0, active_extruder);
+   for(int8_t i=0; i < NUM_AXIS; i++) {
 diff --git a/Marlin/motion_control.cpp b/Marlin/motion_control.cpp
-index f11d8c8..a10d73f 100644
+index f11d8c8..7660905 100644
 --- a/Marlin/motion_control.cpp
 +++ b/Marlin/motion_control.cpp
-@@ -126,15 +126,15 @@ void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8
+@@ -125,17 +125,7 @@ void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8
+     arc_target[axis_linear] += linear_per_segment;
      arc_target[E_AXIS] += extruder_per_segment;
  
-     if (min_software_endstops) {
+-    if (min_software_endstops) {
 -      if (arc_target[X_AXIS] < X_HOME_POS) arc_target[X_AXIS] = X_HOME_POS;
 -      if (arc_target[Y_AXIS] < Y_HOME_POS) arc_target[Y_AXIS] = Y_HOME_POS;
 -      if (arc_target[Z_AXIS] < Z_HOME_POS) arc_target[Z_AXIS] = Z_HOME_POS;
-+      if (arc_target[X_AXIS] < X_MIN_POS) arc_target[X_AXIS] = X_MIN_POS;
-+      if (arc_target[Y_AXIS] < Y_MIN_POS) arc_target[Y_AXIS] = Y_MIN_POS;
-+      if (arc_target[Z_AXIS] < Z_MIN_POS) arc_target[Z_AXIS] = Z_MIN_POS;
-     }
-     if (max_software_endstops) {
+-    }
+-
+-    if (max_software_endstops) {
 -      if (arc_target[X_AXIS] > X_MAX_LENGTH) arc_target[X_AXIS] = X_MAX_LENGTH;
 -      if (arc_target[Y_AXIS] > Y_MAX_LENGTH) arc_target[Y_AXIS] = Y_MAX_LENGTH;
 -      if (arc_target[Z_AXIS] > Z_MAX_LENGTH) arc_target[Z_AXIS] = Z_MAX_LENGTH;
-+      if (arc_target[X_AXIS] > X_MAX_POS) arc_target[X_AXIS] = X_MAX_POS;
-+      if (arc_target[Y_AXIS] > Y_MAX_POS) arc_target[Y_AXIS] = Y_MAX_POS;
-+      if (arc_target[Z_AXIS] > Z_MAX_POS) arc_target[Z_AXIS] = Z_MAX_POS;
-     }
+-    }
++    clamp_to_software_endstops(arc_target);
      plan_buffer_line(arc_target[X_AXIS], arc_target[Y_AXIS], arc_target[Z_AXIS], arc_target[E_AXIS], feed_rate, extruder);
+     
+   }
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index 47e9eba..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-Bottom: f59c4f0f543cd186ce17875c743486d2e74e4c3f
-Top:    8e78a1676c97946f40c2ebb968bada04f6bac87a
-Author: Ian Jackson <ijackson@chiark.greenend.org.uk>
-Date:   2012-08-09 18:25:16 +0100
-
-Refresh of motion-control-max-min
-
----
-
-diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h
-index 4123634..75b57d0 100644
---- a/Marlin/Marlin.h
-+++ b/Marlin/Marlin.h
-@@ -169,6 +169,7 @@ bool IsStopped();
- void enquecommand(const char *cmd); //put an ascii command at the end of the current buffer.
- void prepare_arc_move(char isclockwise);
-+void clamp_to_software_endstops(float target[3]);
- #ifdef FAST_PWM_FAN
- void setPwmFrequency(uint8_t pin, int val);
-diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde
-index f38920b..d471d49 100644
---- a/Marlin/Marlin.pde
-+++ b/Marlin/Marlin.pde
-@@ -1541,7 +1541,7 @@ void get_arc_coordinates()
-    }
- }
--void prepare_move()
-+void clamp_to_software_endstops(float target[3])
- {
-   if (min_software_endstops) {
-     if (destination[X_AXIS] < X_MIN_POS) destination[X_AXIS] = X_MIN_POS;
-@@ -1554,6 +1554,12 @@ void prepare_move()
-     if (destination[Y_AXIS] > Y_MAX_POS) destination[Y_AXIS] = Y_MAX_POS;
-     if (destination[Z_AXIS] > Z_MAX_POS) destination[Z_AXIS] = Z_MAX_POS;
-   }
-+}
-+
-+void prepare_move()
-+{
-+  clamp_to_software_endstops(destination);
-+
-   previous_millis_cmd = millis();  
-   plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate*feedmultiply/60/100.0, active_extruder);
-   for(int8_t i=0; i < NUM_AXIS; i++) {
-diff --git a/Marlin/motion_control.cpp b/Marlin/motion_control.cpp
-index a10d73f..7660905 100644
---- a/Marlin/motion_control.cpp
-+++ b/Marlin/motion_control.cpp
-@@ -125,17 +125,7 @@ void mc_arc(float *position, float *target, float *offset, uint8_t axis_0, uint8
-     arc_target[axis_linear] += linear_per_segment;
-     arc_target[E_AXIS] += extruder_per_segment;
--    if (min_software_endstops) {
--      if (arc_target[X_AXIS] < X_MIN_POS) arc_target[X_AXIS] = X_MIN_POS;
--      if (arc_target[Y_AXIS] < Y_MIN_POS) arc_target[Y_AXIS] = Y_MIN_POS;
--      if (arc_target[Z_AXIS] < Z_MIN_POS) arc_target[Z_AXIS] = Z_MIN_POS;
--    }
--
--    if (max_software_endstops) {
--      if (arc_target[X_AXIS] > X_MAX_POS) arc_target[X_AXIS] = X_MAX_POS;
--      if (arc_target[Y_AXIS] > Y_MAX_POS) arc_target[Y_AXIS] = Y_MAX_POS;
--      if (arc_target[Z_AXIS] > Z_MAX_POS) arc_target[Z_AXIS] = Z_MAX_POS;
--    }
-+    clamp_to_software_endstops(arc_target);
-     plan_buffer_line(arc_target[X_AXIS], arc_target[Y_AXIS], arc_target[Z_AXIS], arc_target[E_AXIS], feed_rate, extruder);
-     
-   }