summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkliment <kliment.yanev@gmail.com>2012-03-19 11:45:30 -0700
committerkliment <kliment.yanev@gmail.com>2012-03-19 11:45:30 -0700
commit4df80c0d6b29d2e7487cef657860c1384560ce81 (patch)
treea19c535361f63dd222b42f27f2cac69a20d1507e
parent3534d9bde3c444cc3bd8ce8eebb340d6e4844e8b (diff)
parent8147df6ae0763df962dfda3505d44765916168e3 (diff)
Merge pull request #155 from midopple/experimental
Try to merge fixes from Master into Experimental
-rw-r--r--Sprinter/Sprinter.pde30
-rw-r--r--Sprinter/pins.h9
2 files changed, 22 insertions, 17 deletions
diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde
index 706910f..9de3d48 100644
--- a/Sprinter/Sprinter.pde
+++ b/Sprinter/Sprinter.pde
@@ -252,6 +252,8 @@ bool relative_mode = false; //Determines Absolute or Relative Coordinates
//bool relative_mode_e = false; //Determines Absolute or Relative E Codes while in Absolute Coordinates mode. E is always relative in Relative Coordinates mode.
//long timediff = 0;
+bool is_homing = false;
+
//experimental feedrate calc
//float d = 0;
//float axis_diff[NUM_AXIS] = {0, 0, 0, 0};
@@ -1059,6 +1061,7 @@ FORCE_INLINE void process_commands()
destination[i] = current_position[i];
}
feedrate = 0;
+ is_homing = true;
home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2])));
@@ -1164,6 +1167,7 @@ FORCE_INLINE void process_commands()
enable_endstops(false);
#endif
+ is_homing = false;
feedrate = saved_feedrate;
feedmultiply = saved_feedmultiply;
@@ -1764,20 +1768,22 @@ void prepare_move()
{
long help_feedrate = 0;
- if (min_software_endstops)
- {
- if (destination[X_AXIS] < 0) destination[X_AXIS] = 0.0;
- if (destination[Y_AXIS] < 0) destination[Y_AXIS] = 0.0;
- if (destination[Z_AXIS] < 0) destination[Z_AXIS] = 0.0;
- }
+ if(!is_homing){
+ if (min_software_endstops)
+ {
+ if (destination[X_AXIS] < 0) destination[X_AXIS] = 0.0;
+ if (destination[Y_AXIS] < 0) destination[Y_AXIS] = 0.0;
+ if (destination[Z_AXIS] < 0) destination[Z_AXIS] = 0.0;
+ }
- if (max_software_endstops)
- {
- if (destination[X_AXIS] > X_MAX_LENGTH) destination[X_AXIS] = X_MAX_LENGTH;
- if (destination[Y_AXIS] > Y_MAX_LENGTH) destination[Y_AXIS] = Y_MAX_LENGTH;
- if (destination[Z_AXIS] > Z_MAX_LENGTH) destination[Z_AXIS] = Z_MAX_LENGTH;
+ if (max_software_endstops)
+ {
+ if (destination[X_AXIS] > X_MAX_LENGTH) destination[X_AXIS] = X_MAX_LENGTH;
+ if (destination[Y_AXIS] > Y_MAX_LENGTH) destination[Y_AXIS] = Y_MAX_LENGTH;
+ if (destination[Z_AXIS] > Z_MAX_LENGTH) destination[Z_AXIS] = Z_MAX_LENGTH;
+ }
}
-
+
help_feedrate = ((long)feedrate*(long)feedmultiply);
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], help_feedrate/6000.0);
diff --git a/Sprinter/pins.h b/Sprinter/pins.h
index e35e6a8..63ea464 100644
--- a/Sprinter/pins.h
+++ b/Sprinter/pins.h
@@ -143,6 +143,7 @@
#endif
+
/****************************************************************************************
* RepRap Motherboard ****---NOOOOOO RS485/EXTRUDER CONTROLLER!!!!!!!!!!!!!!!!!---*******
*
@@ -662,17 +663,20 @@
#define HEATER_0_PIN 13 // (extruder)
#ifdef SANGUINOLOLU_V_1_2
+
#define HEATER_1_PIN 12 // (bed)
#define X_ENABLE_PIN 14
#define Y_ENABLE_PIN 14
#define Z_ENABLE_PIN 26
#define E_ENABLE_PIN 14
#else
+
#define HEATER_1_PIN 14 // (bed)
#define X_ENABLE_PIN -1
#define Y_ENABLE_PIN -1
#define Z_ENABLE_PIN -1
#define E_ENABLE_PIN -1
+
#endif
#define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
@@ -682,7 +686,6 @@
#endif
-
/****************************************************************************************
* Gen7 pin assignment
*
@@ -773,8 +776,6 @@
#define E_DIR_PIN 35
#define E_ENABLE_PIN 13
-
-
#define HEATER_0_PIN 15 // Extruder
#define HEATER_1_PIN 14 // Bed
#define FAN_PIN 16 // Fan
@@ -830,8 +831,6 @@
#define E_DIR_PIN 35
#define E_ENABLE_PIN 13
-
-
#define HEATER_0_PIN 15 // Extruder
#define HEATER_1_PIN 14 // Bed
#define FAN_PIN 16 // Fan