Skip to content

Commit 84cf1b8

Browse files
authored
Merge pull request #2083 from DRracer/viper
Workaround for the "viper" situation bug.
2 parents a28c365 + d9dec38 commit 84cf1b8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Firmware/ultralcd.cpp

+13-1
Original file line numberDiff line numberDiff line change
@@ -4853,9 +4853,21 @@ void lcd_wizard(WizState state)
48534853
int wizard_event;
48544854
const char *msg = NULL;
48554855
while (!end) {
4856-
printf_P(PSTR("Wizard state: %d"), state);
4856+
printf_P(PSTR("Wizard state: %d\n"), state);
48574857
switch (state) {
48584858
case S::Run: //Run wizard?
4859+
4860+
// 2019-08-07 brutal hack - solving the "viper" situation.
4861+
// It is caused by the fact, that tmc2130_st_isr makes a crash detection before the printers really starts.
4862+
// And thus it calles stop_and_save_print_to_ram which sets the saved_printing flag.
4863+
// Having this flag set during normal printing is lethal - mesh_plan_buffer_line exist in the middle of planning long travels
4864+
// which results in distorted print.
4865+
// This primarily happens when the printer is new and parked in 0,0
4866+
// So any new printer will fail the first layer calibration unless being reset or the Stop function gets called.
4867+
// We really must find a way to prevent the crash from happening before the printer is started - that would be the correct solution.
4868+
// 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.
4869+
saved_printing = false;
4870+
48594871
wizard_active = true;
48604872
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
48614873
if (wizard_event) {

0 commit comments

Comments
 (0)