Skip to content

Commit

Permalink
Fixed Reprint from USB and from SD, some debug is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
jfestrada authored and 3d-gussner committed Nov 22, 2023
1 parent ec1c215 commit 73436e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion Firmware/cmdqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ 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.
Expand Down
14 changes: 9 additions & 5 deletions Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@

#include "Prusa_farm.h"

#include "power_panic.h"

static void lcd_sd_updir();
static void lcd_mesh_bed_leveling_settings();
Expand Down Expand Up @@ -259,6 +258,8 @@ bool bSettings; // flag (i.e. 'fake parameter'

//action: Reprint
bool enableReprint = false;
bool enableReprintUSB = false;

static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* longFilename)
{
uint8_t len = LCD_WIDTH - 1;
Expand Down Expand Up @@ -5198,13 +5199,13 @@ static void lcd_main_menu()
#endif //TMC2130_DEBUG

// Menu item for reprint
if(!printer_active() && enableReprint && card.cardOK)
if(!printer_active() && enableReprint && card.cardOK && !enableReprintUSB)
{
MENU_ITEM_SUBMENU_P(_T(MSG_REPRINT), reprint_from_eeprom);
}else if(!printer_active() && enableReprint && saved_printing_type == PowerPanic::PRINT_TYPE_USB)
}else if(!printer_active() && enableReprintUSB )
{
lcd_reprint_usb_print();
}else if (!card.cardOK && (saved_printing_type != PowerPanic::PRINT_TYPE_USB))
MENU_ITEM_SUBMENU_P(_T(MSG_REPRINT), lcd_reprint_usb_print);
}else if (!card.cardOK)
{
enableReprint = false;
}
Expand Down Expand Up @@ -7516,4 +7517,7 @@ void reprint_from_eeprom() {
void lcd_reprint_usb_print()
{
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_REPRINT);
enableReprint=false;
enableReprintUSB=false;
lcd_return_to_status();
}

0 comments on commit 73436e9

Please sign in to comment.