Browse Source

Clean Endstops::event_handler

pull/1/head
Scott Lahteine 5 years ago
parent
commit
c5713b5e98
  1. 5
      Marlin/src/module/endstops.cpp

5
Marlin/src/module/endstops.cpp

@ -340,7 +340,9 @@ void Endstops::resync() {
void Endstops::event_handler() {
static uint8_t prev_hit_state; // = 0
if (hit_state && hit_state != prev_hit_state) {
if (hit_state == prev_hit_state) return;
prev_hit_state = hit_state;
if (hit_state) {
#if HAS_SPI_LCD
char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
#define _SET_STOP_CHAR(A,C) (chr## A = C)
@ -385,7 +387,6 @@ void Endstops::event_handler() {
}
#endif
}
prev_hit_state = hit_state;
}
static void print_es_state(const bool is_hit, PGM_P const label=nullptr) {

Loading…
Cancel
Save