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

Power Panic and LCD menu #4635

Merged
merged 21 commits into from
Mar 28, 2024
Merged

Conversation

3d-gussner
Copy link
Collaborator

@3d-gussner 3d-gussner commented Mar 13, 2024

Improved Power Panic

  • Added Debug for printer states
  • SD power panic
    • Recovers from multiple power panic and even resets (as long it is in recovering)
  • Host power panic
  • LCD menu
    • During recovering all menus are hidden except
      • Stop print (to be able to exit)
      • Statistics
      • Fail Stats
      • Support
    • Reprint hidden
      • Host reprint only shown when host sends M79 to ensure that the host is ready to reprint
      • SD Reprint only shown when previous print was finished successfully.
        • ToDo for next release: Don't show Reprint when SD card has been changed
    • Resume hidden
      • When resuming
      • With host prints until host sends M79
    • Autoload filament menu only shown with active FSensor and NO filament detected
    • Load filament menu only shown with active FSensor and NO filament detected OR FSensor disabled
    • Unload filament menu only shown with active FSensor and filament detected OR FSensor disabled

This Firmware doesn't recover correctly with Prusa Link 0.8.0-alpha4 at this moment.
I was able to recover host prints with a modified OctoPrint + two Plugins and additional code (which isn't in this PR as this code is a workaround of existing OctoPrint+Plugins)

Update 27-03-2024

Added EEPROM_UVLO_Z_LIFTED to prevent multiple Z lifts in case of a power panic while the print is paused.
A host print recovery it doesn't wait for hotend temp to be stable as it will go into pause state anyway and the hotend will be disabled while paused anyway.

Tested with MK404

  • SD print + power panic
    • For some unknown reason it doesn't recover correctly SD print + power panic + reset while recovering, while a double power panic does recover correctly even with a reset.
  • SD print + power panic and while lifting Z another power panic
  • SD print + power panic and while lifting Z another power panic + reset while recovering
  • SD print + pause + power panic
  • SD print + pause + power panic and while lifting Z another power panic
  • SD print + pause + power panic and while lifting Z another power panic + reset while recovering
  • Host print same as above for SD

Difference between SD and Host print power panic:

  • SD recovers automatically when bed temp isn't lower than 5°C to target bed temperature
  • Host recovers the print settings and goes to pause state.
    • Then it waits for the host sending "M79" before showing Resume to ensure that the host is "there" to receive any messages from the printer.

The print can't be recovered if a reset happens at the last step of the recovery as at this moment the power panic recovery is "completed" and the printer is back in normal mode.

@3d-gussner 3d-gussner added this to the FW 3.14.0 milestone Mar 13, 2024
@3d-gussner 3d-gussner requested a review from gudnimg March 13, 2024 17:01
Copy link

github-actions bot commented Mar 13, 2024

All values in bytes. Δ Delta to base

Target ΔFlash ΔSRAM Used Flash Used SRAM Free Flash Free SRAM
MK3S_MULTILANG 190 -1 247220 5653 6732 2539
MK3_MULTILANG 168 1 246480 5662 7472 2530

@3d-gussner 3d-gussner requested review from leptun and DRracer March 15, 2024 06:55
Firmware/Marlin_main.cpp Outdated Show resolved Hide resolved
Firmware/power_panic.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@gudnimg gudnimg left a comment

Choose a reason for hiding this comment

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

See my comments

Firmware/ultralcd.cpp Outdated Show resolved Hide resolved
Firmware/ultralcd.cpp Outdated Show resolved Hide resolved
Firmware/ultralcd.cpp Outdated Show resolved Hide resolved
- No wait for heatup during host print recovery
- No extra Z lift when power panic happens during paused print
  - added an extra EEPROM value
  - fixed `EEPROM_LAST_ITEM`
  - changed EEPROM version to 3.14.0
- Added `reset_uvlo` function
- removed `reset_uvlo` as `#ifdef UVLO_SUPPORT` everywhere for MK2.5 is a huge change.
@3d-gussner 3d-gussner requested a review from gudnimg March 27, 2024 08:45
Kept few as these get too long
}
} else {
bMain=true; // flag (i.e. 'fake parameter') for 'lcd_sdcard_menu()' function
MENU_ITEM_BACK_P(_i("No SD card")); ////MSG_NO_CARD c=18
Copy link
Collaborator

Choose a reason for hiding this comment

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

This changes the UI, is this change needed?

Firmware/ultralcd.cpp Outdated Show resolved Hide resolved
Firmware/ultralcd.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@gudnimg gudnimg left a comment

Choose a reason for hiding this comment

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

See comments

@3d-gussner 3d-gussner merged commit 0c9bf5d into prusa3d:MK3 Mar 28, 2024
4 checks passed
@3d-gussner 3d-gussner deleted the MK3_PP_improvements branch March 28, 2024 05:59
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