♻️ Refactor, comment endstop/probe enums

This commit is contained in:
Scott Lahteine
2021-05-23 01:09:46 -05:00
parent e1921f808c
commit 92dea8e6cc
4 changed files with 31 additions and 8 deletions

View File

@@ -403,12 +403,21 @@ void Endstops::event_handler() {
}
}
#if GCC_VERSION <= 50000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
static void print_es_state(const bool is_hit, PGM_P const label=nullptr) {
if (label) SERIAL_ECHOPGM_P(label);
SERIAL_ECHOPGM(": ");
SERIAL_ECHOLNPGM_P(is_hit ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN));
}
#if GCC_VERSION <= 50000
#pragma GCC diagnostic pop
#endif
void _O2 Endstops::report_states() {
TERN_(BLTOUCH, bltouch._set_SW_mode());
SERIAL_ECHOLNPGM(STR_M119_REPORT);