From b471bb7540f11508d18d5c498793513b3232a8ec Mon Sep 17 00:00:00 2001 From: MRprusa3d Date: Mon, 5 Aug 2019 17:51:26 +0200 Subject: [PATCH 1/2] farm mode update, documentation correction --- Firmware/Marlin_main.cpp | 12 ++++++------ Firmware/util.cpp | 7 +++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index a24f7876..4197c863 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -7307,17 +7307,17 @@ Sigma_Exit: // ---------------------------------------------- /*! Checks the parameters of the printer and gcode and performs compatibility check - - M862.1 [ P | Q ] - - M862.2 [ P | Q ] - - M862.3 [ P | Q ] - - M862.4 [ P | Q] - - M862.5 [ P | Q] + - M862.1 { P | Q } + - M862.2 { P | Q } + - M862.3 { P"" | Q } + - M862.4 { P | Q } + - M862.5 { P | Q } When run with P<> argument, the check is performed against the input value. When run with Q argument, the current value is shown. M862.3 accepts text identifiers of printer types too. - The syntax of M862.3 is (note the space between P and the printer type name and the quotes around the type): + The syntax of M862.3 is (note the quotes around the type): M862.3 P "MK3S" diff --git a/Firmware/util.cpp b/Firmware/util.cpp index cc8d7850..aa1a624d 100644 --- a/Firmware/util.cpp +++ b/Firmware/util.cpp @@ -401,8 +401,11 @@ lcd_update_enable(true); // display / status-line recovery case ClCheckMode::_Undef: break; } -bSettings=false; // flag ('fake parameter') for 'lcd_hw_setup_menu()' function -menu_submenu(lcd_hw_setup_menu); +if(!farm_mode) + { + bSettings=false; // flag ('fake parameter') for 'lcd_hw_setup_menu()' function + menu_submenu(lcd_hw_setup_menu); + } } void printer_model_check(uint16_t nPrinterModel) From d9dec38815badd55e9acc02a3c7a434ffc4662de Mon Sep 17 00:00:00 2001 From: DRracer Date: Wed, 7 Aug 2019 17:23:19 +0200 Subject: [PATCH 2/2] Workaround for the "viper" situation bug. --- Firmware/ultralcd.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 3bd451ed..ac8a302f 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -4853,9 +4853,21 @@ void lcd_wizard(WizState state) int wizard_event; const char *msg = NULL; while (!end) { - printf_P(PSTR("Wizard state: %d"), state); + printf_P(PSTR("Wizard state: %d\n"), state); switch (state) { case S::Run: //Run wizard? + + // 2019-08-07 brutal hack - solving the "viper" situation. + // It is caused by the fact, that tmc2130_st_isr makes a crash detection before the printers really starts. + // And thus it calles stop_and_save_print_to_ram which sets the saved_printing flag. + // Having this flag set during normal printing is lethal - mesh_plan_buffer_line exist in the middle of planning long travels + // which results in distorted print. + // This primarily happens when the printer is new and parked in 0,0 + // So any new printer will fail the first layer calibration unless being reset or the Stop function gets called. + // We really must find a way to prevent the crash from happening before the printer is started - that would be the correct solution. + // Btw. the flag may even trigger the viper situation on normal start this way and the user won't be able to find out why. + saved_printing = false; + wizard_active = true; wizard_event = lcd_show_multiscreen_message_yes_no_and_wait_P(_i("Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"), false, true);////MSG_WIZARD_WELCOME c=20 r=7 if (wizard_event) {