Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PFW-1542 Fix an issue where print can't be stopped under specific circumstances #4403

Merged
merged 2 commits into from
Sep 25, 2023

Conversation

gudnimg
Copy link
Collaborator

@gudnimg gudnimg commented Sep 23, 2023

ℹ️ This has been an issue since at least FW 3.9

There is a bug where if the printer is recovering a print, it will execute a blocking loop to restore the extruder and bed temperatures. But if a Fan error is triggered in this loop, then the user can't abort the print via LCD.

If the fan error resolves on its own the 'Resume print' menu will appear in a few seconds. But if not, then the user can't resume the print (which is normal). But with the bug above the user can't abort the print either!

The problem is essentially isPrintPaused variable is cleared too early. We should wait until the print is completely restored first.

Steps to reproduce:

  1. Start a print
  2. Pause the print
  3. Wait for extruder temperature to fall at lest 180°C
  4. Click 'Resume' print
  5. While heating, stop the hotend fan and wait for a few seconds until an error is raised
  6. Observe issue => 'Stop print' menu item is gone!

TODO:

  • Unload filament, and similar 'filament' menus should not be visible in this state.

PFW-1542

There is a bug where if the printer is recovering a print, it run a
blocking loop to restore the extruder and bed temperatures.
But if a Fan error is triggered in this loop, then the user can't
abort the print via LCD.

If the fan error resolves on its own the 'Resume print' menu will
appear in a few seconds. But if not, then the user can't resume the print
(which is normal). But with the bug above the user can't abort the print either!

The problem is essentially isPrintPaused variable is cleared too early.
We should wait until the print is completely restored first.

Steps to reproduce:
1. Start a print
2. Pause the print
3. Wait for extruder temperature to fall at lest 180°C
4. Click 'Resume' print
5. While heating, stop the hotend fan and wait for a few seconds until an error is raised
6. Observe issue => 'Stop print' menu item is gone!

PFW-1542
@gudnimg gudnimg requested a review from 3d-gussner September 23, 2023 14:19
@gudnimg gudnimg added this to the FW 3.13.2 milestone Sep 23, 2023
@github-actions
Copy link

github-actions bot commented Sep 23, 2023

Target ΔFlash (bytes) ΔSRAM (bytes)
MK3S_MULTILANG -40 0
MK3_MULTILANG -40 0

@gudnimg
Copy link
Collaborator Author

gudnimg commented Sep 23, 2023

@3d-gussner I think this fixes a lot of inconsistencies with the menus. For example I suspect we don't need this change anymore: 77a4b99

lcd_calibration_menu: Remove redundant if (!isPrintPaused). The menu
is never called unless this condition is true.

eeprom_switch_to_next_sheet: Don't show this menu if the printer
is busy doing work!

Do not allow these menus to run while a print is paused or
when we're recovering a print:

- Preload to MMU
- Load to Nozzle
- Unload filament
- Eject from MMU
- Cut filament
- Autoload filament
- Settings
- Calibration
@gudnimg gudnimg changed the title Fix an issue where print can't be stopped under specific circumstances PFW-1542 Fix an issue where print can't be stopped under specific circumstances Sep 24, 2023
@gudnimg
Copy link
Collaborator Author

gudnimg commented Sep 24, 2023

@3d-gussner let me know if I should remove the menu changes (they are technically unrelated to the core issue blocking final 3.13.2 release). I only added them since you mentioned these menus shouldn't be available when resuming a print or when it's paused.

I did try unloading filament during a pause and it behaves strangely. (With MMU btw)

Copy link
Collaborator

@3d-gussner 3d-gussner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, tried really hard to BREAK it with multiple stall/resume stall while resuming multiple times. Always recovered correctly.
@gudnimg Please prepare a cherry-pick PR for MK_3.13.2 branch. Maybe only the fan fix without the 2nd part and menus.

@3d-gussner 3d-gussner merged commit c97143f into prusa3d:MK3 Sep 25, 2023
5 checks passed
@gudnimg gudnimg deleted the PFW-1542 branch September 25, 2023 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants