Misc. code cleanup
This commit is contained in:
parent
45d3866f97
commit
cca5844ba9
@ -390,8 +390,8 @@ void startOrResumeJob() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline void finishSDPrinting() {
|
inline void finishSDPrinting() {
|
||||||
if (queue.enqueue_one_P(PSTR("M1001"))) {
|
if (queue.enqueue_one_P(PSTR("M1001"))) { // Keep trying until it gets queued
|
||||||
marlin_state = MF_RUNNING;
|
marlin_state = MF_RUNNING; // Signal to stop trying
|
||||||
TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
|
TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
|
||||||
TERN_(DGUS_LCD_UI_MKS, ScreenHandler.SDPrintingFinished());
|
TERN_(DGUS_LCD_UI_MKS, ScreenHandler.SDPrintingFinished());
|
||||||
}
|
}
|
||||||
|
@ -501,13 +501,9 @@ void GCodeQueue::get_serial_commands() {
|
|||||||
char* gpos = strchr(command, 'G');
|
char* gpos = strchr(command, 'G');
|
||||||
if (gpos) {
|
if (gpos) {
|
||||||
switch (strtol(gpos + 1, nullptr, 10)) {
|
switch (strtol(gpos + 1, nullptr, 10)) {
|
||||||
case 0: case 1:
|
case 0 ... 1:
|
||||||
#if ENABLED(ARC_SUPPORT)
|
TERN_(ARC_SUPPORT, case 2 ... 3:)
|
||||||
case 2: case 3:
|
TERN_(BEZIER_CURVE_SUPPORT, case 5:)
|
||||||
#endif
|
|
||||||
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
|
||||||
case 5:
|
|
||||||
#endif
|
|
||||||
PORT_REDIRECT(SERIAL_PORTMASK(p)); // Reply to the serial port that sent the command
|
PORT_REDIRECT(SERIAL_PORTMASK(p)); // Reply to the serial port that sent the command
|
||||||
SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
|
SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
|
||||||
LCD_MESSAGEPGM(MSG_STOPPED);
|
LCD_MESSAGEPGM(MSG_STOPPED);
|
||||||
|
@ -1477,7 +1477,7 @@ void DGUSScreenHandler::DGUS_ExtrudeLoadInit(void) {
|
|||||||
|
|
||||||
void DGUSScreenHandler::DGUS_RunoutInit(void) {
|
void DGUSScreenHandler::DGUS_RunoutInit(void) {
|
||||||
#if PIN_EXISTS(MT_DET_1)
|
#if PIN_EXISTS(MT_DET_1)
|
||||||
pinMode(MT_DET_1_PIN, INPUT_PULLUP);
|
SET_INPUT_PULLUP(MT_DET_1_PIN);
|
||||||
#endif
|
#endif
|
||||||
runout_mks.de_count = 0;
|
runout_mks.de_count = 0;
|
||||||
runout_mks.de_times = 10;
|
runout_mks.de_times = 10;
|
||||||
@ -1496,7 +1496,7 @@ void DGUSScreenHandler::DGUS_Runout_Idle(void) {
|
|||||||
GotoScreen(MKSLCD_SCREEN_PAUSE);
|
GotoScreen(MKSLCD_SCREEN_PAUSE);
|
||||||
|
|
||||||
sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please change filament!"), nullptr, true, true, true, true);
|
sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please change filament!"), nullptr, true, true, true, true);
|
||||||
// SetupConfirmAction(nullptr);
|
//SetupConfirmAction(nullptr);
|
||||||
GotoScreen(DGUSLCD_SCREEN_POPUP);
|
GotoScreen(DGUSLCD_SCREEN_POPUP);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -645,9 +645,7 @@ char *creat_title_text() {
|
|||||||
gcode_preview_over = false;
|
gcode_preview_over = false;
|
||||||
|
|
||||||
card.closefile();
|
card.closefile();
|
||||||
char *cur_name;
|
char *cur_name = strrchr(list_file.file_name[sel_id], '/');
|
||||||
|
|
||||||
cur_name = strrchr(list_file.file_name[sel_id], '/');
|
|
||||||
|
|
||||||
SdFile file;
|
SdFile file;
|
||||||
SdFile *curDir;
|
SdFile *curDir;
|
||||||
|
@ -1795,12 +1795,8 @@ void get_wifi_commands() {
|
|||||||
if (gpos) {
|
if (gpos) {
|
||||||
switch (strtol(gpos + 1, nullptr, 10)) {
|
switch (strtol(gpos + 1, nullptr, 10)) {
|
||||||
case 0 ... 1:
|
case 0 ... 1:
|
||||||
#if ENABLED(ARC_SUPPORT)
|
TERN_(ARC_SUPPORT, case 2 ... 3:)
|
||||||
case 2 ... 3:
|
TERN_(BEZIER_CURVE_SUPPORT, case 5:)
|
||||||
#endif
|
|
||||||
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
|
||||||
case 5:
|
|
||||||
#endif
|
|
||||||
SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
|
SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
|
||||||
LCD_MESSAGEPGM(MSG_STOPPED);
|
LCD_MESSAGEPGM(MSG_STOPPED);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user