Update Endstops class for 1.1.x parity
This commit is contained in:
parent
d6df0322c2
commit
f10c87b442
2 changed files with 17 additions and 23 deletions
|
@ -42,26 +42,22 @@ Endstops endstops;
|
||||||
bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load()
|
bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load()
|
||||||
volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
|
volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
|
||||||
|
|
||||||
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
|
Endstops::esbits_t Endstops::current_endstop_bits = 0,
|
||||||
uint16_t
|
|
||||||
#else
|
|
||||||
byte
|
|
||||||
#endif
|
|
||||||
Endstops::current_endstop_bits = 0,
|
|
||||||
Endstops::old_endstop_bits = 0;
|
Endstops::old_endstop_bits = 0;
|
||||||
|
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
volatile bool Endstops::z_probe_enabled = false;
|
volatile bool Endstops::z_probe_enabled = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Initialized by settings.load()
|
||||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||||
float Endstops::x_endstop_adj; // Initialized by settings.load()
|
float Endstops::x_endstop_adj;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||||
float Endstops::y_endstop_adj; // Initialized by settings.load()
|
float Endstops::y_endstop_adj;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||||
float Endstops::z_endstop_adj; // Initialized by settings.load()
|
float Endstops::z_endstop_adj;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -452,7 +448,6 @@ void Endstops::update() {
|
||||||
/**
|
/**
|
||||||
* Check and update endstops according to conditions
|
* Check and update endstops according to conditions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (X_MOVE_TEST) {
|
if (X_MOVE_TEST) {
|
||||||
if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
|
if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
|
||||||
#if HAS_X_MIN
|
#if HAS_X_MIN
|
||||||
|
|
|
@ -53,6 +53,8 @@ class Endstops {
|
||||||
static bool enabled, enabled_globally;
|
static bool enabled, enabled_globally;
|
||||||
static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
|
static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
|
||||||
|
|
||||||
|
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
|
||||||
|
typedef uint16_t esbits_t;
|
||||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||||
static float x_endstop_adj;
|
static float x_endstop_adj;
|
||||||
#endif
|
#endif
|
||||||
|
@ -62,8 +64,6 @@ class Endstops {
|
||||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||||
static float z_endstop_adj;
|
static float z_endstop_adj;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
|
|
||||||
typedef uint16_t esbits_t;
|
|
||||||
#else
|
#else
|
||||||
typedef byte esbits_t;
|
typedef byte esbits_t;
|
||||||
#endif
|
#endif
|
||||||
|
@ -152,5 +152,4 @@ extern Endstops endstops;
|
||||||
#define ENDSTOPS_ENABLED endstops.enabled
|
#define ENDSTOPS_ENABLED endstops.enabled
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif // __ENDSTOPS_H__
|
#endif // __ENDSTOPS_H__
|
||||||
|
|
Reference in a new issue