Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavelSindler <sindlerpa@gmail.com>2017-07-06 14:19:11 +0300
committerPavelSindler <sindlerpa@gmail.com>2017-07-06 14:19:11 +0300
commit54ef2936c76d0846413b49c614d0cdb0f5910f1e (patch)
treeb2a120939af49996abf10c0d73e42d8b046bcc33 /Firmware/stepper.cpp
parent16fffed52d850b89282ed1f7800165446128c2bb (diff)
selftest
Diffstat (limited to 'Firmware/stepper.cpp')
-rw-r--r--Firmware/stepper.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp
index d0aa34fda..8798470f6 100644
--- a/Firmware/stepper.cpp
+++ b/Firmware/stepper.cpp
@@ -41,8 +41,10 @@
//=============================public variables ============================
//===========================================================================
block_t *current_block; // A pointer to the block currently being traced
-
-
+bool x_min_endstop = false;
+bool x_max_endstop = false;
+bool y_min_endstop = false;
+bool y_max_endstop = false;
//===========================================================================
//=============================private variables ============================
//===========================================================================
@@ -407,9 +409,9 @@ ISR(TIMER1_COMPA_vect)
{
#if defined(X_MIN_PIN) && X_MIN_PIN > -1
#ifndef TMC2130_SG_HOMING_SW
- bool x_min_endstop = (READ(X_MIN_PIN) != X_MIN_ENDSTOP_INVERTING);
+ x_min_endstop = (READ(X_MIN_PIN) != X_MIN_ENDSTOP_INVERTING);
#else //TMC2130_SG_HOMING_SW
- bool x_min_endstop = tmc2130_axis_stalled[X_AXIS];
+ x_min_endstop = tmc2130_axis_stalled[X_AXIS];
#endif //TMC2130_SG_HOMING_SW
if(x_min_endstop && old_x_min_endstop && (current_block->steps_x > 0)) {
endstops_trigsteps[X_AXIS] = count_position[X_AXIS];
@@ -427,9 +429,9 @@ ISR(TIMER1_COMPA_vect)
{
#if defined(X_MAX_PIN) && X_MAX_PIN > -1
#ifndef TMC2130_SG_HOMING_SW
- bool x_max_endstop = (READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTING);
+ x_max_endstop = (READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTING);
#else //TMC2130_SG_HOMING_SW
- bool x_max_endstop = tmc2130_axis_stalled[X_AXIS];
+ x_max_endstop = tmc2130_axis_stalled[X_AXIS];
#endif //TMC2130_SG_HOMING_SW
if(x_max_endstop && old_x_max_endstop && (current_block->steps_x > 0)){
endstops_trigsteps[X_AXIS] = count_position[X_AXIS];
@@ -451,9 +453,9 @@ ISR(TIMER1_COMPA_vect)
{
#if defined(Y_MIN_PIN) && Y_MIN_PIN > -1
#ifndef TMC2130_SG_HOMING_SW
- bool y_min_endstop=(READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTING);
+ y_min_endstop=(READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTING);
#else //TMC2130_SG_HOMING_SW
- bool y_min_endstop = tmc2130_axis_stalled[Y_AXIS];
+ y_min_endstop = tmc2130_axis_stalled[Y_AXIS];
#endif //TMC2130_SG_HOMING_SW
if(y_min_endstop && old_y_min_endstop && (current_block->steps_y > 0)) {
endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS];
@@ -469,9 +471,9 @@ ISR(TIMER1_COMPA_vect)
{
#if defined(Y_MAX_PIN) && Y_MAX_PIN > -1
#ifndef TMC2130_SG_HOMING_SW
- bool y_max_endstop=(READ(Y_MAX_PIN) != Y_MAX_ENDSTOP_INVERTING);
+ y_max_endstop=(READ(Y_MAX_PIN) != Y_MAX_ENDSTOP_INVERTING);
#else //TMC2130_SG_HOMING_SW
- bool y_max_endstop = tmc2130_axis_stalled[Y_AXIS];
+ y_max_endstop = tmc2130_axis_stalled[Y_AXIS];
#endif //TMC2130_SG_HOMING_SW
if(y_max_endstop && old_y_max_endstop && (current_block->steps_y > 0)){
endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS];