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
3d-gussner
69cb7add26
Add en- and disable MMU to M709
...
Add X42 to erase the MMU eeprom
2023-11-11 12:18:34 +01:00
gudnimg
890bfab946
PFW-1523 Update M79 description
2023-11-07 07:27:21 +00:00
gudnimg
20a2216623
PFW-1523 Implement S parameter for M79
...
Change in memory:
Flash: +112 bytes
SRAM: +3 bytes
2023-11-04 20:38:50 +00:00
gudnimg
8fcfdf31c4
PFW-1523 Implement M79 timer for PrusaLink
...
The idea is to have the host ping the printer periodically with a M79 to
enable certain features/UI. Using the usb_timer is not a good solution
for this as it depends on seeing a 'G' character
The LCD code, or whatever code is implementing the new functionality
will need to include host.h and check whether M79_timer_get_status()
returns 0 (timer not running) or 1 (timer is running).
I created a new file for the code host.cpp which we can use to expand
host related functionality and not clutter Marlin_main.cpp further.
Change in memory:
Flash: +104 bytes
SRAM: +5 bytes
2023-10-29 16:33:45 +00:00
3d-gussner
63b628d722
Merge pull request #4396 from 3d-gussner/MK3_PFW-1538_M420
...
PFW-1538: Add M420
2023-10-13 14:27:34 +02:00
3d-gussner
2027a54873
Merge pull request #4420 from gudnimg/PFW-1543
...
PFW-1543 Save print type in EEPROM
2023-10-06 09:04:30 +02:00
3d-gussner
8b9b63c35b
Merge pull request #4418 from gudnimg/PFW-1542-v2
...
PFW-1542 Handle fan error sooner when waiting for heating to complete
2023-10-03 10:16:49 +02:00
Alex Voinea
dd32f7be3c
bootapp cleanup
2023-10-03 08:19:48 +02:00
Alex Voinea
5466bfb500
Cleanup uartout declaration
2023-10-03 08:19:48 +02:00
gudnimg
3eaca29b0b
PFW-1543 Move printing types into enum
...
Also add power panic namespace
2023-10-01 12:57:25 +00:00
gudnimg
e621d3445e
PFW-1542 Handle fan error sooner when waiting for heating to complete
...
While waiting for the nozzle to reach a certain temperature, a fan error
should disable the hotend heater. If printing, it will simply pause the print.
Previously the printer would wait for the nozzle to heat up before pausing the print
and turning off the hotend heater.
We rely on LcdCommands::LongPause and must return to the top level loop to process it.
Waiting in the while loop e.g. in M190 does not make sense.
2023-09-30 14:01:09 +00:00
3d-gussner
f8c64de505
Merge pull request #4390 from sarusani/mbl_mag_comp
...
MBL: Add magnet compensation parameter
2023-09-22 14:57:09 +02:00
Guðni Már Gilbert
e323490659
optimisation: Remove unused Z offset
...
Frees up some SRAM
Change in memory:
Flash: 0 bytes
SRAM: -4 bytes
2023-09-19 23:37:38 +00:00
3d-gussner
1996f977e1
Merge branch 'MK3' into mbl_mag_comp
2023-09-18 15:55:42 +02:00
3d-gussner
8bd71b7bf0
Merge pull request #4391 from sarusani/mbl_default_to_eeprom
...
MBL: Default to EEPROM values
2023-09-18 15:52:38 +02:00
3d-gussner
039202f34b
Fix typo
2023-09-18 15:48:36 +02:00
3d-gussner
0877585bd1
Add M420
...
Same as G81
2023-09-18 15:45:13 +02:00
D.R.racer
be5523187b
Sync MK3<->MK4 MMU2 mmu2_mk4.h
2023-09-18 10:51:32 +02:00
Guðni Már Gilbert
6187b7eecf
optimisation: use disable_heater() in more places
...
Change in memory:
Flash: -84 bytes
SRAM: 0 bytes
2023-09-16 14:26:09 +00:00
sarusani
84d353793d
Fix typos
2023-09-16 12:38:14 +02:00
sarusani
e4a10e5fab
Move code_seen back into if statement
...
Same memory usage, but prettier to look at. :)
2023-09-15 14:11:27 +02:00
sarusani
56a79f88ef
Optimise memory usage
2023-09-15 14:11:27 +02:00
sarusani
2951bc8af0
Default to eeprom values
...
Use eeprom values if provided parameters are out of bounds.
2023-09-15 14:11:27 +02:00
3d-gussner
9e794a47a4
Merge pull request #4386 from 3d-gussner/MK3_mbl_print_area_translations
...
🚧 Add new MBL message for #4183 and translation
2023-09-15 09:00:38 +02:00
sarusani
21c57a1222
Add parameter for magnet compensation
...
allow to enable/disable magnet compensation when 7x7 is in use.
2023-09-14 21:02:56 +02:00
sarusani
2863c9bc01
Cleanup: whitespace in nProbeRetryCount var
2023-09-14 09:43:26 +02:00
3d-gussner
5f605012eb
Merge pull request #4388 from prusa3d/vintagepc/tmc-mode-query
...
Add Q parameter to M91[4/5]
2023-09-14 09:13:55 +02:00
VintagePC
70d83fe4ee
Add Q parameter to query current mode.
2023-09-13 16:52:11 -04:00
sarusani
a9c8bb7dbf
Code cleanup: rename params
2023-09-13 18:31:45 +02:00
sarusani
d3bb6e5ca5
Rename MBL repeat param
2023-09-13 17:37:39 +02:00
3d-gussner
ca27841d67
Add new MBL message for #4183 and translate these messages
2023-09-13 11:14:16 +02:00
3d-gussner
2e70697fa7
Merge pull request #4183 from leptun/mbl_print_area
...
MBL print area
2023-09-13 10:28:08 +02:00
3d-gussner
74f724b228
Merge pull request #4174 from gudnimg/check_all_heaters
...
optimisation: use `CHECK_ALL_HEATERS` in more places
2023-09-12 16:31:45 +02:00
3d-gussner
c84985ec3e
Merge pull request #4328 from dawidpieper/m850_addselection
...
M850 add possibility to set sheet as active
2023-09-11 13:02:04 +02:00
Guðni Már Gilbert
e6f05e7856
PFW-1522 Fix firmware getting stuck on ejecting
...
If slot is unknown, the printer will always get a rejected command
error from the MMU.
Change in memory:
Flash: +4 bytes
SRAM: 0 bytes
2023-08-18 14:27:39 +02:00
Guðni Már Gilbert
fc18f4c5d7
PFW-1522 Implement filament change screen
...
Change in memory:
Flash: +116 bytes
SRAM: +1 byte
2023-08-18 14:27:39 +02:00
Alex Voinea
ede4cc5d30
Update error messages
2023-08-17 08:02:47 +02:00
Alex Voinea
45823e7336
Make the G80 Z threshold tighter
2023-08-17 08:02:47 +02:00
Alex Voinea
f5f09f147c
Add a limit to how many times G80 can fail
...
Flash: +80
SRAM: +1
2023-08-17 07:53:39 +02:00
Alex Voinea
7740a81edb
Do not store a global mbl_z_probe_nr
...
flash: -6
sram: 0? (somehow)
2023-08-17 07:53:39 +02:00
Alex Voinea
a984b2e609
G80 `O` parameter
...
a
2023-08-17 07:53:39 +02:00
Alex Voinea
a15f536ff4
Combine BED_X/Y() and mbl::get_x/y()
...
flash: -112
2023-08-17 07:52:55 +02:00
Guðni Már Gilbert
6b12be42d9
optimisation: Make BED_X and BED_Y into functions
...
Previously these preprocessor macros were always being inlined.
By making these into a function we can control the inlining
more directly.
The number of points on the mesh is also now constant. This means
'n' can now be float at compile time. This removes one uint8_t to float
conversion.
Change in memory:
Flash: -208 bytes
SRAM: 0 bytes
2023-08-17 07:52:55 +02:00
Alex Voinea
3ccf2d60c0
Make bed correction matrix const
2023-08-17 07:52:55 +02:00
Alex Voinea
be3465cf18
optimize lambda expression capture
...
flash: -10
2023-08-17 07:52:55 +02:00
Alex Voinea
2d0b96fe6a
Bed correction code optimization
...
flash: -44
2023-08-17 07:52:55 +02:00
Alex Voinea
5b8c65e342
Minor magnet elimination optimization
...
flash: -4B
2023-08-17 07:52:55 +02:00
Alex Voinea
67945579de
G80 minor optimization
2023-08-17 07:52:55 +02:00
Alex Voinea
a5c20a1c6e
Do not plan a Z move if no move is actually performed
2023-08-17 07:52:55 +02:00
Alex Voinea
de98551691
Extract hardcoded value
2023-08-17 07:52:55 +02:00
Alex Voinea
40db9c9258
Fix eeprom mesh offset
2023-08-17 07:52:55 +02:00
Alex Voinea
a7d3dd720b
Fix eeprom mesh interpolation
2023-08-17 07:52:55 +02:00
Alex Voinea
36d8de0727
G80 general fixes
...
Use interpolated eeprom mesh for skewed Z detection
Use the interpolated eeprom mesh for raising Z for the next point
Fix LCD countdown during MBL
2023-08-17 07:52:55 +02:00
Alex Voinea
b234560b22
MBL print function optimization
2023-08-17 07:52:55 +02:00
Alex Voinea
f94bc72235
Optimize G80 bed correction argument parsing
2023-08-17 07:52:55 +02:00
Alex Voinea
6c97907507
A bit more cleanup
2023-08-17 07:52:55 +02:00
Alex Voinea
6af5f5e2a2
Some code cleanup around homing_feedrate
2023-08-17 07:52:55 +02:00
Alex Voinea
83879fd10c
Cleanup magnet compensation code
2023-08-17 07:52:55 +02:00
Alex Voinea
46710c4b4e
G80 code cleanup
2023-08-17 07:52:55 +02:00
Alex Voinea
07b9447ee1
Fix correction nMeasPoints
2023-08-17 07:51:15 +02:00
Alex Voinea
a4ef72b1fc
Use mesh from eeprom during print area MBL
2023-08-17 07:51:15 +02:00