Skip to content

Commit

Permalink
Thanks to @gudnimg pointing out duplicate if statements that are cove…
Browse files Browse the repository at this point in the history
…red by the top-level if statement.
  • Loading branch information
3d-gussner committed Mar 27, 2024
1 parent 9e8aadd commit 8d1be26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5324,7 +5324,7 @@ static void lcd_main_menu()
#endif //SDCARDDETECT
}
#endif //SDSUPPORT
if(!printer_active() && !farm_mode) {
if(!farm_mode) {
const int8_t sheet = eeprom_read_byte(&(EEPROM_Sheets_base->active_sheet));
const int8_t nextSheet = eeprom_next_initialized_sheet(sheet);
if ((nextSheet >= 0) && (sheet != nextSheet)) { // show menu only if we have 2 or more sheets initialized
Expand All @@ -5336,7 +5336,7 @@ static void lcd_main_menu()

}

if (!( printer_active() || (eFilamentAction != FilamentAction::None) || Stopped )) {
if (!((eFilamentAction != FilamentAction::None) || Stopped )) {
if (MMU2::mmu2.Enabled()) {
if(!MMU2::mmu2.FindaDetectsFilament() && !fsensor.getFilamentPresent()) {
// The MMU 'Load filament' state machine will reject the command if any
Expand Down Expand Up @@ -5372,7 +5372,7 @@ static void lcd_main_menu()
#endif //FILAMENT_SENSOR
}
MENU_ITEM_SUBMENU_P(_T(MSG_SETTINGS), lcd_settings_menu);
if(!printingIsPaused()) MENU_ITEM_SUBMENU_P(_T(MSG_CALIBRATION), lcd_calibration_menu);
MENU_ITEM_SUBMENU_P(_T(MSG_CALIBRATION), lcd_calibration_menu);
}
}

Expand Down

0 comments on commit 8d1be26

Please sign in to comment.