From 943a594ba0f2ccbe6494c15ebe67d1a634a7a604 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 27 Sep 2020 02:01:56 -0500 Subject: [PATCH] Tweak MMU beeps, misc. cleanup --- Marlin/src/feature/mmu2/mmu2.cpp | 6 ++---- Marlin/src/gcode/config/M302.cpp | 2 +- Marlin/src/gcode/sd/M24_M25.cpp | 4 +++- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 4 ++-- Marlin/src/sd/cardreader.cpp | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Marlin/src/feature/mmu2/mmu2.cpp b/Marlin/src/feature/mmu2/mmu2.cpp index 31b179a3e..31fa529d5 100644 --- a/Marlin/src/feature/mmu2/mmu2.cpp +++ b/Marlin/src/feature/mmu2/mmu2.cpp @@ -838,8 +838,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) { if (move_axes && all_axes_homed()) { LCD_MESSAGEPGM(MSG_MMU2_RESUMING); - BUZZ(200, 404); - BUZZ(200, 404); + BUZZ(198, 404); BUZZ(4, 0); BUZZ(198, 404); // Move XY to starting position, then Z do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE)); @@ -848,8 +847,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) { do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE)); } else { - BUZZ(200, 404); - BUZZ(200, 404); + BUZZ(198, 404); BUZZ(4, 0); BUZZ(198, 404); LCD_MESSAGEPGM(MSG_MMU2_RESUMING); } } diff --git a/Marlin/src/gcode/config/M302.cpp b/Marlin/src/gcode/config/M302.cpp index 14fbd9f57..afdc6c9e8 100644 --- a/Marlin/src/gcode/config/M302.cpp +++ b/Marlin/src/gcode/config/M302.cpp @@ -37,7 +37,7 @@ * * M302 ; report current cold extrusion state * M302 P0 ; enable cold extrusion checking - * M302 P1 ; disables cold extrusion checking + * M302 P1 ; disable cold extrusion checking * M302 S0 ; always allow extrusion (disables checking) * M302 S170 ; only allow extrusion above 170 * M302 S170 P1 ; set min extrude temp to 170 but leave disabled diff --git a/Marlin/src/gcode/sd/M24_M25.cpp b/Marlin/src/gcode/sd/M24_M25.cpp index c27e03862..bdb37f605 100644 --- a/Marlin/src/gcode/sd/M24_M25.cpp +++ b/Marlin/src/gcode/sd/M24_M25.cpp @@ -98,7 +98,9 @@ void GcodeSuite::M25() { print_job_timer.pause(); - TERN(DWIN_CREALITY_LCD,,ui.reset_status()); + #if DISABLED(DWIN_CREALITY_LCD) + ui.reset_status(); + #endif #if ENABLED(HOST_ACTION_COMMANDS) TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("Pause SD"), PSTR("Resume"))); diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp index 131c96bef..faf9720fa 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/dwin/e3v2/dwin.cpp @@ -1099,7 +1099,7 @@ void Goto_PrintProcess() { // Copy into filebuf string before entry char * const name = card.longest_filename(); - const int8_t npos = _MAX(0, DWIN_WIDTH - strlen(name) * MENU_CHR_W) / 2; + const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * MENU_CHR_W) / 2; DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, npos, 60, name); DWIN_ICON_Show(ICON, ICON_PrintTime, 17, 193); @@ -1787,7 +1787,7 @@ inline void Draw_SDItem(const uint16_t item, int16_t row=-1) { inline void Draw_SDItem_Shifted(int8_t &shift) { // Limit to the number of chars past the cutoff const size_t len = strlen(shift_name); - NOMORE(shift, _MAX((signed)len - MENU_CHAR_LIMIT, 0)); + NOMORE(shift, _MAX(len - MENU_CHAR_LIMIT, 0U)); // Shorten to the available space const size_t lastchar = _MIN((signed)len, shift + MENU_CHAR_LIMIT); diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 538fca3c8..5210c6ed9 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -53,7 +53,7 @@ #include "../feature/pause.h" #endif -#define DEBUG_OUT ENABLED(DEBUG_CARDREADER) +#define DEBUG_OUT EITHER(DEBUG_CARDREADER, MARLIN_DEV_MODE) #include "../core/debug_out.h" // public: @@ -716,7 +716,7 @@ void CardReader::beginautostart() { cdroot(); } -void CardReader::closefile(const bool store_location) { +void CardReader::closefile(const bool store_location/*=false*/) { file.sync(); file.close(); flag.saving = flag.logging = false;