Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#4021 from gudnimg/cleanup_crashdet_…
Browse files Browse the repository at this point in the history
…detected

cleanup: remove unnecessary LCD update in `crashdet_detected()`
  • Loading branch information
3d-gussner authored Apr 4, 2023
2 parents 91ad87b + 5643d16 commit eb3421f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Firmware/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,24 +594,17 @@ void crashdet_detected(uint8_t mask)
crashDetTimer.start();
crashDet_axes |= mask;

lcd_update_enable(true);
lcd_clear();
lcd_update(2);

if (mask & X_AXIS_MASK)
{
if (mask & X_AXIS_MASK) {
eeprom_increment_byte((uint8_t*)EEPROM_CRASH_COUNT_X);
eeprom_increment_word((uint16_t*)EEPROM_CRASH_COUNT_X_TOT);
}
if (mask & Y_AXIS_MASK)
{
if (mask & Y_AXIS_MASK) {
eeprom_increment_byte((uint8_t*)EEPROM_CRASH_COUNT_Y);
eeprom_increment_word((uint16_t*)EEPROM_CRASH_COUNT_Y_TOT);
}

lcd_update_enable(true);
lcd_update(2);

lcd_update_enable(true);
lcd_update(2);
// prepare the status message with the _current_ axes status
crashdet_fmt_error(msg, mask);
lcd_setstatus(msg);
Expand Down

0 comments on commit eb3421f

Please sign in to comment.