Commit Graph

1998 Commits

Author SHA1 Message Date
gudnimg 9bd043c83b Move restore_file_from_sd out of power panic file
This function is not specific to power panic. Some printer models
do not have power panic enabled.

This change fixes a build failure

No change in memory
2023-12-30 12:19:51 +00:00
3d-gussner c9ea5fa746 Fix M850 output and documentation 2023-12-19 15:34:16 +01:00
sarusani e5d6d72d23 Add #ifdef 2023-12-15 14:09:46 +01:00
sarusani 1407f29362 Prevent oozing after filament load
Retract 10mm of filament after loading
2023-12-14 14:20:46 +01:00
3d-gussner aa92375e62
Merge pull request #4523 from 3d-gussner/MK3_Improve_PP_Crash
Improve Host Power Panic and Crash
2023-12-05 14:49:33 +01:00
3d-gussner 18daa5a62e
Merge pull request #2423 from Panayiotis-git/MK3_M600_Issue-2415
LCD option to unload new filament on M600 (issue #2415)
2023-12-04 17:03:38 +01:00
Panayiotis-git 3da4407e4f Repeat the M600 unload/load filament sequence - Fix translations 2023-12-01 21:13:24 +02:00
Panayiotis-git 8ceda27cda Provide option to repeat the M600 unload/load filament sequence 2023-12-01 21:12:31 +02:00
3d-gussner 47b298782f Set YES as default in Crash Resume message 2023-12-01 17:43:29 +01:00
3d-gussner d36ea24c02 After reset or low bed temp recover HOST print as the HOST has to decide what to do
Only during SD print and a Reset + Low Bed temp the user has to confirm on LCD
2023-12-01 17:43:29 +01:00
3d-gussner 4bc6bc3f90 Improve USb power panic 2023-12-01 17:43:29 +01:00
3d-gussner 4dfc484265
Merge pull request #4207 from gudnimg/crashdet_cancel-fixup
`crashdet_cancel()` doesnt cleanup all variables when USB printing
2023-12-01 17:41:33 +01:00
gudnimg 4d9dc11510 power panic: pause the print, and wait for M79
"PRUSA uvlo" is the last g-code to be processed after the power panic
recovery. For host prints, we want to finish processing all these
g-codes and put the print in a paused state.

Currently I am using lcd_pause_print() but this may be simplified
later.

A new PrinterState is introduced PowerPanicWaitingForHost to
differentiate this paused state from the typical paused state.
In this new paused state the printer is waiting for the host to boot up
and send M79.

Once M79 is seen a new action is sent "// action:uvlo_recovery_ready"

It is up to the host software to then resume the print correctly. All
the needed information to resume the print is in EEPROM and can
be read by using the D3 g-code.

Change in memory:
Flash: +82 bytes
SRAM: 0 bytes
2023-12-01 16:16:39 +01:00
gudnimg ce24d917e6 power panic: Only send M24 for SD prints
For host prints, we don't want to send M24.

Change in memory:
Flash: +16 bytes
SRAM: 0 bytes
2023-12-01 16:16:39 +01:00
gudnimg 665c01804c power panic: remove redundant lcd_setstatuspgm
If recover_print was never called, then there should be
no need to call lcd_setstatuspgm(MSG_WELCOME) since
the status line was not modified by the power panic feature.

Change in memory:
Flash: -4 bytes
SRAM: 0 bytes
2023-12-01 16:16:39 +01:00
gudnimg e2d0e9a2ee power panic: remove redundant lcd update calls
lcd_show_fullscreen_message_yes_no_and_wait_P will
enable LCD update upon exit.

Change in memory:
Flash: -24 bytes
SRAM: 0 bytes
2023-12-01 16:16:39 +01:00
3d-gussner 9f9bb12eeb
Merge pull request #4419 from gudnimg/reduce-stack-m600-opt
M600: reduce stack usage
2023-11-24 05:39:26 +01:00
Guðni Már Gilbert e1e0b0afa1 Refactor code which resets crash detection setting
Add function crashdet_use_eeprom_setting

Change in memory:
Flash: -52 bytes
SRAM: 0 bytes
2023-11-22 21:19:43 +00:00
Guðni Már Gilbert 30d0da4698 Close SD file in print_stop instead of UnconditionalStop()
Change in memory:
Flash: -6 bytes
SRAM: 0 bytes
2023-11-22 21:19:17 +00:00
Guðni Már Gilbert 3ad40f0206 crashdet_cancel doesnt cleanup all variables when using Octoprint
I would think that this should behave similarly as when stopping
the print via the LCD.

Changed UnconditionalSto()p to not close the SD card file
if we're using Octoprint. Then there shouldnt be any file open.

Some of the variables which were not reset:

isPrintPaused
pause_time
saved_start_position
saved_printing_type

Bed heater may be left on?

Change in memory:
Flash: -28 bytes
SRAM: 0 bytes
2023-11-22 21:19:17 +00:00
3d-gussner d5d77ee243 Cleanup documentation 2023-11-22 07:58:17 +01:00
3d-gussner 514607318e Add printer_state.cpp/.h 2023-11-22 07:58:17 +01:00
3d-gussner d276695ce7 Set Ready 2023-11-22 07:58:13 +01:00
Guðni Már Gilbert 134e892d8e Fix build failure
Another isPrintPaused was added by rebase
2023-11-21 18:40:28 +00:00
gudnimg 331ceaf044 M77: Save statistics when timer is stopped
For remote hosts, when the timer is stopped, then also save the statistics.

Slightly refactored save_statistics function by removing the parameters.
The function parameters are always the same.

Change in memory:
Flash: -40 bytes
SRAM: 0 bytes
2023-11-21 18:38:40 +00:00
gudnimg a2e6cda37e Fix build failure 2023-11-21 18:38:40 +00:00
gudnimg a6de11059f PFW-1206 Add M75-M78
Change in memory:
Flash: +240 bytes
SRAM: 0 bytes
2023-11-21 18:38:40 +00:00
gudnimg 423f98ff6e Implement Marlin's print job timer
I changed the code a bit so it would compile
in Prusa Firmware.

The paused duration is no longer included in the
print time statistics.

Change in memory:
Flash: -122 bytes
SRAM: 0 bytes
2023-11-21 18:38:40 +00:00
3d-gussner 96094dc548 Don't pause with `S`et values
Update documentation
2023-11-20 07:30:07 +01:00
Guðni Már Gilbert 0d60a82c56 Don't reset pause_position on every M125
Change in memory:
Flash: -76 bytes
SRAM: 0 bytes
2023-11-20 07:30:06 +01:00
Guðni Már Gilbert 4a4c015ad8 M125: make pause_position static 2023-11-20 07:30:06 +01:00
Guðni Már Gilbert 2e12133716 M125: Code size optimisation
Change in memory:
Flash: -66 bytes
SRAM: -12 bytes
2023-11-20 07:30:06 +01:00
3d-gussner 498d99b84b Code size improvments 2023-11-20 07:30:06 +01:00
3d-gussner 4dc87acf20 Fix issues
Check printer limits
Fix crash when pausing / paused
2023-11-20 07:30:06 +01:00
3d-gussner 43692b416b Fix float
Thanks to @gudnimg for pointing out
2023-11-20 07:30:06 +01:00
3d-gussner af054923a7 Add M125 2023-11-20 07:30:06 +01:00
3d-gussner 9fd478c9c2
Merge pull request #4173 from gudnimg/disable-heaters-gudni
optimisation: use `disable_heater()` in more places
2023-11-20 07:01:05 +01:00
3d-gussner 53c419f52d Basic Printer name in EEPROM
- Output with M115 works
- ToDo
  - LCD screen
  - M550 gcode
  - Detect length of EEPROM CUSTOM_MENDLE_NAME
2023-11-18 10:14:07 +01:00
gudnimg cf0e0f3718 M600: use partial backup in RAM
To handle power panic in M600 we started saving
relevant data at the start of M600 gcode.

We are currently also saving the same data within
gcode_M600 which is saved on the stack. I propose
we just use the data already saved in SRAM to reduce
stack usage.

Change in memory:
Flash: -64 bytes
SRAM: 0 bytes
2023-11-17 19:25:56 +00:00
Guðni Már Gilbert 4922bcd7b1
Merge pull request #4408 from gudnimg/PR2390
PFW-1097 M600: Fix filament change behavior when print is paused
2023-11-16 07:37:42 +00:00
D.R.racer 38104063d4 M702: fix documentation link 2023-11-15 09:14:44 +01:00
3d-gussner e74abb102a
Merge pull request #4494 from gudnimg/issue3122
Fix #3122
2023-11-12 17:42:10 +01:00
Guðni Már Gilbert 1e6460c344
Merge pull request #4479 from gudnimg/PFW-1523-2
PFW-1523 Add the `S` parameter to `M79`
2023-11-12 16:19:31 +00:00
gudnimg ddbadf4874 Fix #3122
If the feedrate multiplier is changed while the print is paused
update the saved feedrate multiplier in RAM
2023-11-12 12:38:05 +00:00
gudnimg af465da9e2 Add a comment 2023-11-11 16:53:56 +00:00
gudnimg 45880c252b Fix filament change behavior when print is paused
Reimplementing PR 2390
https://github.com/prusa3d/Prusa-Firmware/pull/2390
from @wavexx
2023-11-11 16:51:35 +00:00
3d-gussner 342d8e92ab Update doxygen M709 2023-11-11 12:20:58 +01:00
3d-gussner 0016b77827 Updated MMU serial status message
- Shown during bootup
- Shown on LCD menue MMU [ON|OFF]
- Shown using `M709`
- Shown when `Disable`d with MMU ERROR FW UPDATE NEEDED
2023-11-11 12:18:34 +01:00
3d-gussner e3392a763a Update doxygen for M709 2023-11-11 12:18:34 +01:00
3d-gussner b11c0024d1 Update requested changes 2023-11-11 12:18:34 +01:00