- Serial message --> /// action:reprint done

- Yes/no question --> Need to fix the bug related with the filename print --> if (lcd_show_fullscreen_message_yes_no_and_wait_P(altfilename, false, LCD_LEFT_BUTTON_CHOICE)==LCD_LEFT_BUTTON_CHOICE)
This commit is contained in:
Juan Francisco Estrada 2023-10-30 09:33:35 +01:00 committed by 3d-gussner
parent 004169034a
commit 532a5b3e2f
5 changed files with 23 additions and 6 deletions

View File

@ -63,6 +63,7 @@ bool cmdqueue_pop_front()
// No serial communication is pending. Reset both pointers to zero.
bufindw = 0;
bufindr = bufindw;
enableReprint = true;
} else {
// There is at least one ready line in the buffer.
// First skip the current command ID and iterate up to the end of the string.
@ -657,7 +658,6 @@ void get_command()
// queue is complete, but before we process EOF commands prevent
// re-entry by disabling SD processing from any st_synchronize call
card.closefile();
enableReprint=true;
SERIAL_PROTOCOLLNRPGM(_n("Done printing file"));////MSG_FILE_PRINTED
char time[30];

View File

@ -232,6 +232,7 @@ const char MSG_OCTOPRINT_RESUMED[] PROGMEM_N1 = "// action:resumed"; ////
const char MSG_OCTOPRINT_CANCEL[] PROGMEM_N1 = "// action:cancel"; ////
const char MSG_OCTOPRINT_READY[] PROGMEM_N1 = "// action:ready"; ////
const char MSG_OCTOPRINT_NOT_READY[] PROGMEM_N1 = "// action:not_ready"; ////
const char MSG_OCTOPRINT_REPRINT[] PROGMEM_N1 = "// action:reprint"; ////
const char MSG_FANCHECK_HOTEND[] PROGMEM_N1 = "Err:HOTEND FAN ERROR"; ////c=20
const char MSG_FANCHECK_PRINT[] PROGMEM_N1 = "Err:PRINT FAN ERROR"; ////c=20
const char MSG_M112_KILL[] PROGMEM_N1 = "M112 called. Emergency Stop."; ////c=20

View File

@ -236,6 +236,7 @@ extern const char MSG_OCTOPRINT_RESUMED[];
extern const char MSG_OCTOPRINT_CANCEL[];
extern const char MSG_OCTOPRINT_READY[];
extern const char MSG_OCTOPRINT_NOT_READY[];
extern const char MSG_OCTOPRINT_REPRINT[];
extern const char MSG_FANCHECK_HOTEND[];
extern const char MSG_FANCHECK_PRINT[];
extern const char MSG_M112_KILL[];

View File

@ -45,6 +45,8 @@
#include "Prusa_farm.h"
#include "power_panic.h"
static void lcd_sd_updir();
static void lcd_mesh_bed_leveling_settings();
#ifdef LCD_BL_PIN
@ -5199,6 +5201,9 @@ static void lcd_main_menu()
if(!printer_active() && enableReprint && card.cardOK)
{
MENU_ITEM_SUBMENU_P(_T(MSG_REPRINT), reprint_from_eeprom);
}else if(saved_printing_type == PowerPanic::PRINT_TYPE_USB)
{
lcd_reprint_usb_print();
}else if (!card.cardOK)
{
enableReprint = false;
@ -7500,9 +7505,18 @@ void reprint_from_eeprom() {
strcat_P(altfilename, PSTR(".g"));
}
}
// M23: Select SD file
enquecommandf_P(MSG_M23, altfilename);
// M24: Start/resume SD print
enquecommand_P(MSG_M24);
lcd_return_to_status();
if (lcd_show_fullscreen_message_yes_no_and_wait_P(altfilename, false, LCD_LEFT_BUTTON_CHOICE)==LCD_LEFT_BUTTON_CHOICE)
{
// M23: Select SD file
enquecommandf_P(MSG_M23, altfilename);
// M24: Start/resume SD print
enquecommand_P(MSG_M24);
}
lcd_return_to_status();
}
//! @brief Send host action "reprint"
void lcd_reprint_usb_print()
{
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_REPRINT);
}

View File

@ -58,6 +58,7 @@ void lcd_loading_color();
void lcd_sdcard_stop();
void lcd_pause_print();
void lcd_pause_usb_print();
void lcd_reprint_usb_print();
void lcd_resume_print();
void lcd_print_stop(); // interactive print stop
void print_stop(bool interactive=false);