Browse Source

Tweak MMU beeps, misc. cleanup

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
943a594ba0
  1. 6
      Marlin/src/feature/mmu2/mmu2.cpp
  2. 2
      Marlin/src/gcode/config/M302.cpp
  3. 4
      Marlin/src/gcode/sd/M24_M25.cpp
  4. 4
      Marlin/src/lcd/dwin/e3v2/dwin.cpp
  5. 4
      Marlin/src/sd/cardreader.cpp

6
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()) { if (move_axes && all_axes_homed()) {
LCD_MESSAGEPGM(MSG_MMU2_RESUMING); LCD_MESSAGEPGM(MSG_MMU2_RESUMING);
BUZZ(200, 404); BUZZ(198, 404); BUZZ(4, 0); BUZZ(198, 404);
BUZZ(200, 404);
// Move XY to starting position, then Z // Move XY to starting position, then Z
do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE)); 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)); do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
} }
else { else {
BUZZ(200, 404); BUZZ(198, 404); BUZZ(4, 0); BUZZ(198, 404);
BUZZ(200, 404);
LCD_MESSAGEPGM(MSG_MMU2_RESUMING); LCD_MESSAGEPGM(MSG_MMU2_RESUMING);
} }
} }

2
Marlin/src/gcode/config/M302.cpp

@ -37,7 +37,7 @@
* *
* M302 ; report current cold extrusion state * M302 ; report current cold extrusion state
* M302 P0 ; enable cold extrusion checking * 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 S0 ; always allow extrusion (disables checking)
* M302 S170 ; only allow extrusion above 170 * M302 S170 ; only allow extrusion above 170
* M302 S170 P1 ; set min extrude temp to 170 but leave disabled * M302 S170 P1 ; set min extrude temp to 170 but leave disabled

4
Marlin/src/gcode/sd/M24_M25.cpp

@ -98,7 +98,9 @@ void GcodeSuite::M25() {
print_job_timer.pause(); 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) #if ENABLED(HOST_ACTION_COMMANDS)
TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("Pause SD"), PSTR("Resume"))); TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("Pause SD"), PSTR("Resume")));

4
Marlin/src/lcd/dwin/e3v2/dwin.cpp

@ -1099,7 +1099,7 @@ void Goto_PrintProcess() {
// Copy into filebuf string before entry // Copy into filebuf string before entry
char * const name = card.longest_filename(); 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_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, npos, 60, name);
DWIN_ICON_Show(ICON, ICON_PrintTime, 17, 193); 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) { inline void Draw_SDItem_Shifted(int8_t &shift) {
// Limit to the number of chars past the cutoff // Limit to the number of chars past the cutoff
const size_t len = strlen(shift_name); 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 // Shorten to the available space
const size_t lastchar = _MIN((signed)len, shift + MENU_CHAR_LIMIT); const size_t lastchar = _MIN((signed)len, shift + MENU_CHAR_LIMIT);

4
Marlin/src/sd/cardreader.cpp

@ -53,7 +53,7 @@
#include "../feature/pause.h" #include "../feature/pause.h"
#endif #endif
#define DEBUG_OUT ENABLED(DEBUG_CARDREADER) #define DEBUG_OUT EITHER(DEBUG_CARDREADER, MARLIN_DEV_MODE)
#include "../core/debug_out.h" #include "../core/debug_out.h"
// public: // public:
@ -716,7 +716,7 @@ void CardReader::beginautostart() {
cdroot(); cdroot();
} }
void CardReader::closefile(const bool store_location) { void CardReader::closefile(const bool store_location/*=false*/) {
file.sync(); file.sync();
file.close(); file.close();
flag.saving = flag.logging = false; flag.saving = flag.logging = false;

Loading…
Cancel
Save