Fixed Reprint from USB and from SD, some debug is needed
This commit is contained in:
parent
ec1c215681
commit
73436e9351
|
|
@ -63,7 +63,6 @@ bool cmdqueue_pop_front()
|
||||||
// No serial communication is pending. Reset both pointers to zero.
|
// No serial communication is pending. Reset both pointers to zero.
|
||||||
bufindw = 0;
|
bufindw = 0;
|
||||||
bufindr = bufindw;
|
bufindr = bufindw;
|
||||||
enableReprint = true;
|
|
||||||
} else {
|
} else {
|
||||||
// There is at least one ready line in the buffer.
|
// 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.
|
// First skip the current command ID and iterate up to the end of the string.
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@
|
||||||
|
|
||||||
#include "Prusa_farm.h"
|
#include "Prusa_farm.h"
|
||||||
|
|
||||||
#include "power_panic.h"
|
|
||||||
|
|
||||||
static void lcd_sd_updir();
|
static void lcd_sd_updir();
|
||||||
static void lcd_mesh_bed_leveling_settings();
|
static void lcd_mesh_bed_leveling_settings();
|
||||||
|
|
@ -259,6 +258,8 @@ bool bSettings; // flag (i.e. 'fake parameter'
|
||||||
|
|
||||||
//action: Reprint
|
//action: Reprint
|
||||||
bool enableReprint = false;
|
bool enableReprint = false;
|
||||||
|
bool enableReprintUSB = false;
|
||||||
|
|
||||||
static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* longFilename)
|
static void lcd_implementation_drawmenu_sdfile(uint8_t row, const char* longFilename)
|
||||||
{
|
{
|
||||||
uint8_t len = LCD_WIDTH - 1;
|
uint8_t len = LCD_WIDTH - 1;
|
||||||
|
|
@ -5198,13 +5199,13 @@ static void lcd_main_menu()
|
||||||
#endif //TMC2130_DEBUG
|
#endif //TMC2130_DEBUG
|
||||||
|
|
||||||
// Menu item for reprint
|
// 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);
|
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();
|
MENU_ITEM_SUBMENU_P(_T(MSG_REPRINT), lcd_reprint_usb_print);
|
||||||
}else if (!card.cardOK && (saved_printing_type != PowerPanic::PRINT_TYPE_USB))
|
}else if (!card.cardOK)
|
||||||
{
|
{
|
||||||
enableReprint = false;
|
enableReprint = false;
|
||||||
}
|
}
|
||||||
|
|
@ -7516,4 +7517,7 @@ void reprint_from_eeprom() {
|
||||||
void lcd_reprint_usb_print()
|
void lcd_reprint_usb_print()
|
||||||
{
|
{
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_REPRINT);
|
SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_REPRINT);
|
||||||
|
enableReprint=false;
|
||||||
|
enableReprintUSB=false;
|
||||||
|
lcd_return_to_status();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue