mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
Clean Endstops::event_handler
This commit is contained in:
parent
be498d6280
commit
c5713b5e98
@ -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…
Reference in New Issue
Block a user