Code cleanup.

This commit is contained in:
Knutwurst
2023-05-23 22:18:21 +02:00
parent a2137565e5
commit a019c471d1
3 changed files with 58 additions and 59 deletions

View File

@@ -2658,7 +2658,7 @@
*/ */
#define ADVANCED_PAUSE_FEATURE #define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. #define PAUSE_PARK_RETRACT_FEEDRATE 40 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract. #define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
// This short retract is done immediately, before parking the nozzle. // This short retract is done immediately, before parking the nozzle.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 30 // (mm/s) Unload filament feedrate. This can be pretty fast. #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 30 // (mm/s) Unload filament feedrate. This can be pretty fast.

View File

@@ -25,22 +25,14 @@
#include <string.h> #include <string.h>
#include "../ui_api.h" #include "../ui_api.h"
#include "../../../inc/MarlinConfigPre.h"
#include "../../../gcode/queue.h" #include "../../../gcode/queue.h"
#include "../../../gcode/parser.h"
#include "../../../feature/e_parser.h"
#include "../../../feature/pause.h"
#include "../../../feature/bedlevel/bedlevel.h" #include "../../../feature/bedlevel/bedlevel.h"
#include "../../../libs/buzzer.h" #include "../../../libs/buzzer.h"
#include "../../../libs/numtostr.h" #include "../../../libs/numtostr.h"
#include "../../../module/planner.h"
#include "../../../module/printcounter.h"
#include "../../../module/temperature.h" #include "../../../module/temperature.h"
#include "../../../module/motion.h" #include "../../../module/motion.h"
#include "../../../module/probe.h"
#include "../../../module/settings.h" #include "../../../module/settings.h"
#include "../../../module/stepper.h" #include "../../../module/stepper.h"
//#include "../../../sd/cardreader.h"
#define ANYCUBIC_TFT_DEBUG #define ANYCUBIC_TFT_DEBUG
@@ -376,7 +368,7 @@
mediaPauseState = AMPAUSESTATE_NOT_PAUSED; mediaPauseState = AMPAUSESTATE_NOT_PAUSED;
SENDLINE_DBG_PGM("J04", "TFT Serial Debug: SD print resumed... J04"); // J04 printing form sd card now SENDLINE_DBG_PGM("J04", "TFT Serial Debug: SD print resumed... J04"); // J04 printing form sd card now
setUserConfirmed(); setPauseMenuResponse(PAUSE_RESPONSE_RESUME_PRINT);
resumePrint(); resumePrint();
} }
#endif #endif
@@ -1176,6 +1168,12 @@
// enable continue button // enable continue button
SENDLINE_DBG_PGM("J18", "TFT Serial Debug: UserConfirm SD Reheat done... J18"); SENDLINE_DBG_PGM("J18", "TFT Serial Debug: UserConfirm SD Reheat done... J18");
} }
else if (strcmp_P(msg, PSTR("Paused")) == 0) {
mediaPrintingState = AMPRINTSTATE_PAUSED;
mediaPauseState = AMPAUSESTATE_PAUSED;
// enable continue button
SENDLINE_DBG_PGM("J18", "TFT Serial Debug: UserConfirm SD Reheat done... J18");
}
#endif #endif
} }

View File

@@ -72,7 +72,8 @@ enum AnycubicMediaPauseState {
AMPAUSESTATE_FILAMENT_PURGING, AMPAUSESTATE_FILAMENT_PURGING,
AMPAUSESTATE_HEATER_TIMEOUT, AMPAUSESTATE_HEATER_TIMEOUT,
AMPAUSESTATE_REHEATING, AMPAUSESTATE_REHEATING,
AMPAUSESTATE_REHEAT_FINISHED AMPAUSESTATE_REHEAT_FINISHED,
AMPAUSESTATE_PAUSED
}; };
#if DISABLED(KNUTWURST_DGUS2_TFT) #if DISABLED(KNUTWURST_DGUS2_TFT)