3d-gussner
02b91dc2cb
Merge pull request #4563 from 3d-gussner/MK3_Quick_nozzle_change_menu
...
Add nozzle diameter change to main menu for REVO builds
2024-01-19 14:26:18 +01:00
3d-gussner
6da1ec924b
Merge pull request #4567 from 3d-gussner/MK3_M850_show_active_sheet
...
M850 shows active sheet
2024-01-15 08:56:04 +01:00
3d-gussner
339a10eb81
Merge pull request #4556 from gudnimg/usb-timer-fix
...
Restart USB timer during long moves
2024-01-12 14:41:51 +01:00
3d-gussner
f3e5444d47
M850 shows active sheet
...
Prevent sheet being active if not initialized
2024-01-12 13:41:55 +01:00
3d-gussner
13fb11889e
Minor cosmetic changes voted by community
2024-01-12 07:20:33 +01:00
gudnimg
adf2ecabc1
Fix pause indicator when print job timer is not used
...
Fixes #4554
Change in memory:
Flash: +50 bytes
SRAM: +1 byte
2024-01-11 19:30:30 +00:00
3d-gussner
d5a5835059
Add nozzle change to main menu when QUICK_NOZZLE_CHANGE is defined
...
Add Nozzle diameter to Info screen when printer inactive and QUICK_NOZZLE_CHANGE defined
Solves #4488
2024-01-11 07:36:51 +01:00
3d-gussner
8d50d29776
Merge pull request #4553 from sarusani/shutdownHostLCDEntry
...
Add Shutdown host to LCD Menu
2024-01-11 07:33:16 +01:00
3d-gussner
f18fc2bbce
Fix Pause->Tune->Auto Home layer shift
2024-01-09 11:07:29 +01:00
Guðni Már Gilbert
ae31c0ec31
optimisation: used expired() instead of elapsed()
...
If the timer is expired, then the timer is stopped. This is OK since
we are starting the timer again anyway
Change in memory:
Flash: -14 bytes
SRAM: 0 bytes
2024-01-06 00:23:19 +00:00
gudnimg
09952db139
Restart USB timer during long moves
...
When long moves are planned and executed the USB timer can expire.
In PrusaSlicer 2.7.1 the Toolchange command (T0, T1, etc.) is sent while the USB timer is expired. This will trigger
a manual MMU unload in the firmware. Not only does this trigger a loud beep from the buzzer, but this will also significantly increase print time.
The issue only affects host prints. SD card printing does not have this issue.
Fixes #4551
The fix in this commit is the following:
If there are blocks queued while printing via host AND the USB timer is halfway expired WHILE executing a move. Then simply restart the timer to keep it alive.
Change in memory:
Flash: +62 bytes
SRAM: 0 bytes
2024-01-06 00:23:19 +00:00
sarusani
59093107fd
Add #ifdef HOST_SHUTDOWN
2024-01-06 00:45:06 +01:00
sarusani
49f9d7abdc
Add Shutdown host to LCD Menu
...
Add "Shutdown host" entry to LCD menu if printer is not active and host is connected.
2024-01-06 00:45:06 +01:00
3d-gussner
db044163f9
Unify Selftest messages
2024-01-04 11:18:07 +01:00
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
gudnimg
ceec54f026
reprint: reduce duplicate code
...
restore_file_from_sd function now supports any
filename extension. If a print was finished (to allow reprinting) then the
EEPROM filename and extension should always be valid.
Change in memory:
Flash: -312 bytes
SRAM: 0 bytes
2023-12-30 12:06:46 +00:00
3d-gussner
45d70b195d
Merge pull request #4405 from gudnimg/mmu-response-fix
...
MMU: always wait for a request's expected response
2023-12-22 16:34:27 +01:00
3d-gussner
c9ea5fa746
Fix M850 output and documentation
2023-12-19 15:34:16 +01:00
3d-gussner
15a3fb998c
Merge pull request #4541 from sarusani/actionReadyOpt
...
Remove leading M118 from "action:ready" & "action:not_ready"
2023-12-19 15:02:09 +01:00
sarusani
2c4474b1dd
Remove leading "M118"
2023-12-16 12:51:17 +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
gudnimg
c384524877
mmu: always wait for a request's expected response
...
If a planned request is activated when the current status is finished
then the firmware must wait for the response when the request
is expecting it
An example is a register read or a register write.
manage_response not return unless the register has been read or
written. And we must see the response to know if an error should be
reported.
Step to reproduce issue:
1. Fail selector homing
2. Select 'Tune' item
3. Observe issue. In this situation you can see the value
for the previous register read is shown. Which is 0. This very timing dependent and does not always happen.
4. Repeat step 2 until the issue appears. It may take a few times.
2023-12-10 12:54:18 +00:00
gudnimg
40786a24e0
Rename "cardOK" to "mounted"
...
Sync the Prusa firmware a little bit with Marlin 2.1
2023-12-09 10:52:26 +00:00
gudnimg
d94f263843
Rename initsd() to mount()
...
Sync the Prusa firmware with Marlin 2.1 a little bit.
2023-12-09 10:50:30 +00:00
gudnimg
42855f9f13
Rename setroot() to cdroot()
...
This way the name is the same as Marlin 2.1
2023-12-09 10:50:30 +00:00
gudnimg
e0eb8b8a24
optimisation: if SD card fails to mount, do not set root directory
...
I noticed this on Marlin 2.1 side, it should apply here as well.
2023-12-09 10:50:30 +00:00
3d-gussner
1868839dc6
Fix cmake with tags starting with `t`
2023-12-05 15:42:47 +01:00
3d-gussner
69b35d37c3
Bump up version
2023-12-05 14:53:56 +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
sarusani
e2aafc882c
Fix MSG_PRINT_PAUSED
...
MSG_PRINT_PAUSED used the lang declaration MSG_PAUSE_PRINT instead of MSG_PRINT_PAUSED
2023-12-03 10:16:16 +01:00
sarusani
60e311d74f
Change reprint MENU_ITEM_SUBMENU_P to MENU_ITEM_FUNCTION_P
...
There's no submenu -> don't show arrow
2023-12-03 08:46:48 +01:00
sarusani
4d9e084cf7
Rename lcd_reprint_usb_print to lcd_send_action_start
...
Sending action start can not only be used for reprints
2023-12-03 08:44:54 +01:00
sarusani
d267140ee6
Rename reprint_from_eeprom to lcd_reprint_from_eeprom
...
It sets the lcd_return_to_status() at the end, so naming should be consistent witch the other functions
2023-12-03 08:43:16 +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
02c5da198d
Enable EEPROM_UVLO flag for host prints
...
Change in memory:
Flash: -30 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
67c7ad1c99
power panic: improve file position recovery
...
- Only queue M26 for SD prints
- Add M110 to set gcode_LastN for host prints
- Remove one debug log to save resource (52 bytes)
Change in memory:
Flash: -14 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
096a1c9fe0
Change Reprint action message to comply to OctoPrint actions
2023-11-30 15:08:48 +01:00
3d-gussner
b37e39fdd9
Merge pull request #4427 from gudnimg/minor-stepper-opt
...
optimisation: stepper: make `dda_isteps_t` an array
2023-11-29 08:54:38 +01:00
3d-gussner
3216ef863a
Merge pull request #4149 from gudnimg/tone-opt
...
use `uint16_t` instead of `uint32_t` when writing to OCR4C register
2023-11-29 08:26:54 +01:00
3d-gussner
ff42510a5c
Merge pull request #4512 from jamesdehart/fix-spelling-temperature
...
Fix Spelling: temperature.cpp
@jamesdehart Thanks for the PR even a small community PR like this is very appreciated 🤗
2023-11-28 08:54:15 +01:00
3d-gussner
ba004d2fa8
Merge pull request #4514 from DRracer/current-tool
...
MMU2: Report current tool onto the serial
2023-11-27 17:13:49 +01:00
D.R.racer
67d7be2b2d
MMU2: Report current tool onto the serial
...
PFW-1546
2023-11-27 13:16:13 +01:00
D.R.racer
0462b7289a
MMU2: enlarge the Idler's SG_thrs range in Tune menu
...
Based on experience of mibehaving MMU2S units, a broader range seems to help more people in getting their unit to home properly.
Related to issue #4285
2023-11-27 08:57:28 +01:00
James DeHart
e2a60be029
Fix Spelling: temperature.cpp
...
While running the temperature calibration. I happen to notice the `estimate` was spelled `estimat`.
2023-11-25 15:28:18 -07: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
3d-gussner
d9d42a0678
Use of PrinterState for Reprint menu
2023-11-23 06:47:04 +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
Juan Francisco Estrada
0b4af3b97f
Fix: Reprint menu does not appear during the heating
2023-11-22 12:20:13 +01:00
Juan Francisco Estrada
73436e9351
Fixed Reprint from USB and from SD, some debug is needed
2023-11-22 12:20:00 +01:00
Juan Francisco Estrada
7130504fcf
Apply the reprint_pr_changes_diff2.txt provided by @3d-gussner
2023-11-22 12:18:59 +01:00
Juan Francisco Estrada
ce135a0976
Added support for reprint and streamed GCODE
2023-11-22 12:14:08 +01:00
Juan Francisco Estrada
532a5b3e2f
- Serial message --> /// action:reprint done
...
- Yes/no question --> Need to fix the bug related with the filename print --> if (lcd_show_fullscreen_message_yes_no_and_wait_P(altfilename, false, LCD_LEFT_BUTTON_CHOICE)==LCD_LEFT_BUTTON_CHOICE)
2023-11-22 12:14:00 +01:00
Juan Francisco Estrada
004169034a
Remove some MYSERIAL calls
2023-11-22 12:13:24 +01:00
Juan Francisco Estrada
ae5fbce6e7
Remove MYSERIAL.println code (debug purpose) and old commented code
2023-11-22 12:13:16 +01:00
Juan Francisco Estrada
a52d5430aa
Change to enquecommandf_P and enquecommand_P
2023-11-22 12:13:01 +01:00
Juan Francisco Estrada
e8a2d4c7e1
Reprint function integrated on 3.13v
2023-11-22 12:11:39 +01:00
3d-gussner
02459edcb6
Rebase fix
...
Add documentation
Whitespace
2023-11-22 08:21:52 +01:00
3d-gussner
d394645b69
Whitespace
2023-11-22 07:59:18 +01:00
3d-gussner
af79ac0714
Add `SetPrinterState(PrinterState::Idle);` after `lcd_commands_type = LcdCommands::Idle;`
2023-11-22 07:58:17 +01:00
3d-gussner
d5d77ee243
Cleanup documentation
2023-11-22 07:58:17 +01:00
3d-gussner
880d2f28bd
LCD menu only sends `// action:ready` or `// action:not_ready` via serial
...
Host has to send back state with `M72 S1|0` to keep printer and host in sync
Changed LCD menu messages to `Set ready` and `Set not ready`
Updated translations
2023-11-22 07:58:17 +01:00
3d-gussner
516ae1b952
Update state
2023-11-22 07:58:17 +01:00
3d-gussner
d3b98f30a7
Show Set Ready LCD menu only when M79 timer is running.
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
60cb089e96
Show statistics menu for USB/Serial prints
...
Change in memory:
Flash: -8 bytes
SRAM: 0 bytes
2023-11-21 18:38:40 +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
8b3373b9dc
Raise `END_FILE_SECTION` from 20000 to 30720 to prevent false positive `File incomplete. Continue Anyway?` messages.
2023-11-20 11:23:36 +01: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
7e0df7f9d3
Merge pull request #4502 from gudnimg/gcode_reset_stepper_timeout
...
MMU: Remove gcode_reset_stepper_timeout
2023-11-17 09:27:49 +00:00
3d-gussner
f42d7e4ea0
Merge pull request #4495 from gudnimg/eeprom-table-cleanup
...
EEPROM: Formatting cleanup
2023-11-16 17:04:08 +01:00
Guðni Már Gilbert
e758b146be
MMU: Remove gcode_reset_stepper_timeout
...
This function was removed on the 32-bit side.
On the 8-bit the function was empty so it is safe
remove it.
2023-11-16 14:30:29 +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
Guðni Már Gilbert
400722ec67
Merge pull request #4461 from gudnimg/lcd-opt-message
...
optimisation: simplify two LCD messages
2023-11-16 07:37:09 +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
gudnimg
842d029f7e
Replace unused EEPROM entry names with placeholders
...
_EEPROM_FREE_NRx_ make it a bit more clear this entry is free.
2023-11-12 16:21:34 +00: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
077aa0a2b8
Minor wording changes
2023-11-12 16:09:15 +00:00
gudnimg
1fc1998874
EEPROM: Formatting cleanup
...
Mark unused bytes consistently
Add "Power Panic" into the Feature column for relevant bytes
Change "MMU2/s" to "MMU"
2023-11-12 14:39:52 +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
4e6b649865
PFW-1523 Only overwrite name if not SD printing
2023-11-11 16:56:14 +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
bcc7a16e1c
PFW-1523 Trim trailing whitespace in util.h
2023-11-07 07:27:26 +00:00
gudnimg
890bfab946
PFW-1523 Update M79 description
2023-11-07 07:27:21 +00:00
gudnimg
dc280b0d9e
power panic: support any valid DOS 8.3 extension
...
When a SD file is selected to print
save the DOS 8.3 extension into EEPROM.
After a power outage, the correct file extension is then
selected instead of always assuming it's ".gco"
This allows users to recover ".g" files.
Change in memory:
Flash: +104 bytes
SRAM: 0 bytes
2023-11-05 16:46:54 +00:00
gudnimg
4c52d92d16
power panic: read whole directory name block from EEPROM
...
There is no need to read one byte at a time. We can simply
read the whole block in one go. This saves some flash memory.
Change in memory:
Flash: -18 bytes
SRAM: 0 bytes
2023-11-05 16:46:54 +00:00
gudnimg
21d0130626
power panic: simplify recovering SD filename
...
We can just read the whole EEPROM block since short filenames
are always null terminated. strcat_P will then apply the file extension
at the correct position.
Change in memory:
Flash: -24 bytes
SRAM: 0 bytes
2023-11-05 16:46:54 +00:00
Guðni Már Gilbert
dec5e2c1b4
Refactor menu_action_sdfile
2023-11-05 16:46:54 +00:00
Guðni Már Gilbert
82cece95aa
power panic: read EEPROM_FILENAME until \0 is seen
...
Also removed debug logs
2023-11-05 16:46:14 +00:00
Guðni Már Gilbert
977792961c
power panic: only send M23 for SD prints
...
If the saved printing type was USB, then EEPROM_FILENAME
does not contain anything. The firmware should also
not be trying to open a file on a SD card which is maybe
not even mounted.
Change in memory:
Flash: +12 bytes
SRAM: 0 bytes
2023-11-05 16:46:13 +00:00
gudnimg
469f002179
optimisation: simplify two LCD messages
...
There is no need to restrict how often the message is rendered.
It was being restricted to render every 1 second. We don't do
this for most of the static menus. So I propose this 1 second period
be removed.
Tested on MK3S+
Change in memory:
Flash: -168 bytes
SRAM: -8 bytes
2023-11-05 12:57:28 +00:00
gudnimg
ed376009aa
PFW-1523 Force inline unquoted_string constructor
...
Saves 36 bytes of flash
2023-11-04 20:57:31 +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
cdb559040c
PFW-1523 Refactor parsing quoted strings
...
My plan is to re-use this function in M79
in a later commit. The firmware doesn't
have a dedicated parser like Marlin 2.1
so this is my attempt to not duplicate the parsing of a quoted string in G-codes
Change in memory (MK3S+ Multilang):
Flash: -50 bytes
SRAM: 0 bytes
2023-11-04 17:45:14 +00:00
3d-gussner
fca93b00e9
Merge pull request #4471 from gudnimg/issue-4470
...
MMU: Set PAUSED_FOR_USER state on MMU error screen
2023-10-31 08:36:53 +01:00
3d-gussner
3ffe7bf406
Merge pull request #4460 from gudnimg/PFW-1523
...
PFW-1523 Add a new timer for Prusa Link
2023-10-30 11:23:46 +01: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
gudnimg
645b11e643
Fix regression in MMU enable menu
...
Fixes a regression introduced in https://github.com/prusa3d/Prusa-Firmware/pull/4454
2023-10-29 16:17:03 +00:00
gudnimg
287e340117
MMU: Set PAUSED_FOR_USER state on MMU error screen
...
Setting this state notifies PrusaLink/PrusaConnect
that the printer is waiting for user input (attention).
Change in memory:
Flash: +12 bytes
SRAM: 0 bytes
2023-10-28 19:31:32 +00:00
Guðni Már Gilbert
3b10c6130e
Merge pull request #4466 from gudnimg/eeprom-optimisations
...
Optimise EEPROM access in a few places by reading/writing larger blocks
2023-10-27 21:12:13 +00:00
Guðni Már Gilbert
3297429ca7
TM: Optimise EEPROM read and writes
2023-10-25 17:37:04 +00:00
Guðni Már Gilbert
e207945154
MBL: optimise EEPROM read/writes
2023-10-25 17:36:15 +00:00
Guðni Már Gilbert
82e0124cb4
mmu: remove isErrorScreenRunning()
...
No change in memory
2023-10-19 18:32:42 +00:00
Guðni Már Gilbert
d56f2bc57e
mmu: remove obsolete EEPROM comments
2023-10-19 18:32:42 +00:00
Guðni Már Gilbert
62b90fde28
mmu: remove ResetOnExit
...
No change in memory
2023-10-19 18:32:42 +00:00
Guðni Már Gilbert
7b9e707709
mmu: add ResetCommunicationTimeoutAttempts
...
Adding __attribute__((noinline)) saves 14 bytes of flash
Change in memory:
Flash: +34 bytes
SRAM: 0 bytes
2023-10-19 18:32:42 +00:00
Guðni Már Gilbert
ef33db9a71
mmu: add DisableMMUInSettings
...
power_on should not be modifying
EEPROM_MMU_ENABLED. The code is never
executed unless it's already been set.
Only disable EEPROM_MMU_ENABLED through Buttons::DisableMMU
Change in memory:
Flash: -18 bytes
SRAM: 0 bytes
2023-10-19 18:32:42 +00:00
Guðni Már Gilbert
cd3372dc92
mmu: formatting
2023-10-19 18:32:41 +00:00
Guðni Már Gilbert
12a3051c50
mmu: Add CheckErrorScreenUserInput
...
Due to differences in 8-bit FW I had to implement two new get functions
* GetCommandInProgress
* GetLastErrorCode
2023-10-19 18:32:41 +00:00
Alex Voinea
1528294450
Update enabled diacritics
2023-10-19 13:07:49 +02:00
3d-gussner
1f1743d7ad
Not needed anymore thanks to @vintagepc
2023-10-18 18:02:56 +02:00
3d-gussner
fe9a8cf8ac
Fix PF-build.sh with new cmake
...
Same as MK3_3.13.2 branch
2023-10-17 15:36:54 +02:00
Guðni Már Gilbert
baba1e78c7
use uint16_t when writing to Timer/Counter4
...
Using uint16_t instead of uint32_t reduces code size
and probably is quicker to execute
OCR4C register is 2 bytes on ATmega2560
It's 1 byte on ATmega32u4 and ATmega16u4
Change in memory:
Flash: -80 bytes
SRAM: 0 bytes
2023-10-15 16:50:43 +00:00
gudnimg
20a434dbac
PFW-1542 Reset status line message on EFCE_OK
...
If the error is really resolved, I'd prefer to see
"Prusa i3 MK3S OK" instead of "Err:HOTEND FAN ERROR"
2023-10-15 12:26:44 +00:00
gudnimg
466e562360
PFW-1542 Don't allow starting SD print if there is a fan error
...
Apply same conditions as on "Resume print" feature.
Starting a SD print should not be possible if there is an active hardware error
2023-10-15 12:17:36 +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
Guðni Már Gilbert
f6737d2fca
optimisation: make dda_isteps_t an array
...
This way we can loop through it with a for-loop
and save some code size
2023-10-07 22:18:01 +00:00
Guðni Már Gilbert
415c0c79d1
Fix FW_COMMIT_HASH compiler warning
...
On my end, the default length for the abbreviated commit hash is 9 characters.
This won't fit into uint32_t (4 bytes).
Instead change FW_COMMIT_HASH into a string
and create preprocessor symbol for the string length
such that it's known at compile time.
If the string should be longer or shorter
then only FW_COMMIT_HASH_LENGTH needs to be configured on the CMake side
2023-10-07 21:01:28 +00:00
3d-gussner
23503624d0
Merge pull request #4407 from gudnimg/minor-opt-temp-gudni
...
optimisation: make `alert_automaton_mintemp` constructor `constexpr`
2023-10-06 09:05:24 +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
9aca81dc7c
Merge pull request #4381 from vintagepc/misc-cmake-fixes
...
Refine CMake version handling based on tags
2023-10-05 16:00:55 +02:00
Guðni Már Gilbert
b89c62bd50
PFW-1543 Replace ffh 255 with ^
2023-10-04 20:57:05 +00: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
9606c4f00b
Add font unpacking documentation
2023-10-03 08:19:48 +02:00
Alex Voinea
d53ba0eba2
Fix wrong character sent when potentially unused slot is replaced
2023-10-03 08:19:48 +02:00
Alex Voinea
7e88e49b4e
Fix tilde in message
2023-10-03 08:19:48 +02:00
Alex Voinea
32cee8b529
Move custom character type to lcd.cpp
2023-10-03 08:19:48 +02:00
Alex Voinea
c2c01a9a86
Use beta symbol as fallback of `ß`
2023-10-03 08:19:48 +02:00
Alex Voinea
3e15a24be7
Fix sheet rename resetting characters to blank
2023-10-03 08:19:48 +02:00
Alex Voinea
8a39f53e26
Prevent out of bounds custom character font data
2023-10-03 08:19:48 +02:00
Alex Voinea
9dbbb12a13
Fix frame start for non-menu screens
2023-10-03 08:19:48 +02:00
Alex Voinea
8e25e1b164
Allow all diacritics in the sheet name
2023-10-03 08:19:48 +02:00
Alex Voinea
d5074129f5
Fix MMU error message character
2023-10-03 08:19:48 +02:00
Alex Voinea
6703640c56
Optimize `lcd_print_custom()`
2023-10-03 08:19:48 +02:00
Alex Voinea
fcaa9c8de6
Update `ăĂñ`
2023-10-03 08:19:48 +02:00
Alex Voinea
9ee71b2942
Update `ø`
2023-10-03 08:19:48 +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
Alex Voinea
90dbaa8c51
Update `đûůű`
2023-10-03 08:19:48 +02:00
Alex Voinea
927b27615e
Update `ď`
2023-10-03 08:19:48 +02:00
Alex Voinea
3817893199
Implement the rest of the diacritics
2023-10-03 08:19:48 +02:00
Alex Voinea
5ea2b881d5
Yet another workaround for the language update
2023-10-03 08:19:48 +02:00
Alex Voinea
3305227bbc
Implement all a-based diacritics
2023-10-03 08:19:48 +02:00
Alex Voinea
6707570c6c
Update diacritic alignment
2023-10-03 08:19:48 +02:00
Alex Voinea
c0875f37f2
Implement 'á'
2023-10-03 08:19:48 +02:00
Alex Voinea
a267d80fe2
Fix legacy build
2023-10-03 08:19:48 +02:00
Alex Voinea
10e6087d6b
Update language scripts to use the font
2023-10-03 08:19:48 +02:00
Alex Voinea
09c85796a6
No need to mask the CGRAM data before sending
2023-10-03 08:19:48 +02:00
Alex Voinea
245a2852ac
Font table compression
2023-10-03 08:19:48 +02:00
Alex Voinea
1c637f8082
Fix " 🔃 Refresh" translation
2023-10-03 08:19:48 +02:00
Alex Voinea
1c260f94a0
Expand list of custom characters
2023-10-03 08:19:48 +02:00
Alex Voinea
6d5e645c1f
Regen font table and include ID in comment
2023-10-03 08:19:48 +02:00
Alex Voinea
c1ec8d97e6
Remove TR font
2023-10-03 08:19:48 +02:00
Alex Voinea
81103602f0
Change μ to µ
...
stupid unicode...
2023-10-03 08:19:48 +02:00
Alex Voinea
6367172177
Change ↡ to
2023-10-03 08:19:48 +02:00
Alex Voinea
4957544fcf
Change 🗘 to 🔃
2023-10-03 08:19:48 +02:00
Alex Voinea
c514774a54
Generate the font from Prusa.lcd
2023-10-03 08:19:48 +02:00
Alex Voinea
8e18c83d51
Update debug messages
2023-10-03 08:19:48 +02:00
Alex Voinea
4736a1624f
First working implementation
...
Fix cherry-pick conflict
2023-10-03 08:19:48 +02:00
Alex Voinea
e9f74b2678
Remove unnecessary lcd_home() calls
2023-10-03 08:19:48 +02:00
Alex Voinea
580b27e394
Use lcd_home() wherever possible
...
Fix cherry-pick conflict
2023-10-03 08:19:48 +02:00
Alex Voinea
c7f9a46c86
Cleanup around invalidating the custom characters
2023-10-03 08:19:48 +02:00
Alex Voinea
60494b20e8
lcd_print_custom(): limit searching to lcd_custom_index
2023-10-03 08:19:48 +02:00
Alex Voinea
7e0ab44d09
Refactor the lcd_print_custom() method
2023-10-03 08:19:48 +02:00
Alex Voinea
90222747f2
lcd_set_cursor_column() also updates lcd_ddram_address
2023-10-03 08:19:48 +02:00
3d-gussner
f392fae996
Fix cherry-pick conflict 2
2023-10-03 08:19:48 +02:00
Alex Voinea
100a8e3b33
Dynamic characters initial
...
Fix more hardcoded characters
Finally optimize the lcd printf with custom characters
FontGen.py script
Add arguments and action
Fix build
Fix conflicts
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
fcd61a378d
power panic: save print type in EEPROM
...
The printer should know whether it is recovering a SD print
or a USB print
PFW-1543
2023-10-01 12:44:49 +00:00
gudnimg
0139cf6dde
MMU: Fix printing uint8_t value onto serial
...
uint8_t values don't print correctly. Cast to 2-byte integer is required.
2023-09-30 14:06:38 +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
gudnimg
ae494b04de
optimisation: make constructor constexpr
...
Minor optimisation I found. It doesn't save much but this change
should be harmless :)
Change in memory:
Flash: -30 bytes
SRAM: 0 bytes
2023-09-24 11:41:18 +00:00
VintagePC
52de576e0a
change where FW_VERSION_FULL is defined so it's less messy
2023-09-23 13:10:04 -04:00
gudnimg
016db6a6e8
Hide menus more consistently when the printer is busy
...
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
2023-09-23 15:42:03 +00:00
gudnimg
06d34b4398
Fix an issue where print can't be stopped under specific circumstances
...
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
2023-09-23 14:18:52 +00:00
VintagePC
949539dfc9
Merge remote-tracking branch 'upstream/MK3' into vintagepc/more-cmake-fixes
2023-09-22 16:42:06 -04: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
0f1cb4f407
Fixup from review
2023-09-18 10:51:32 +02:00
gudnimg
4134bf4f40
8-bit proposed changes
...
The status line code is not nice, but we need to work around it
so the status line rendering works correctly
This commit mostly reapplies the code
from 3.13.2
Also fixes compiler warnings
2023-09-18 10:51:32 +02:00
D.R.racer
ea01012026
Unify MMU operations' workflow
2023-09-18 10:51:32 +02:00
D.R.racer
a02ff0651c
Return try-load reporting to serial
2023-09-18 10:51:32 +02:00
D.R.racer
59e49c80f9
Sync MK3<->MK4 MMU2 Tune, Buttons, PowerPanic hooks refactoring
2023-09-18 10:51:32 +02:00
D.R.racer
9b48ab729a
Sync MK3<->MK4 MMU2 TryLoadUnloadReporter
2023-09-18 10:51:32 +02:00
D.R.racer
7db7250773
Sync MK3<->MK4 MMU2 mmu2_mk4.cpp formatting
2023-09-18 10:51:32 +02:00
D.R.racer
be5523187b
Sync MK3<->MK4 MMU2 mmu2_mk4.h
2023-09-18 10:51:32 +02:00
D.R.racer
075858c9fa
Sync MK3<->MK4 MMU2 reporting
2023-09-18 10:51:32 +02:00
D.R.racer
5235fe2480
Sync MK3<->MK4 MMU2 marlin macros
2023-09-18 10:51:32 +02:00
D.R.racer
b4b0bba11c
Sync MK3<->MK4 MMU2 marlin interface
2023-09-18 10:51:32 +02:00
D.R.racer
eb7a73e748
Sync MK3<->MK4 MMU2 log
2023-09-18 10:51:32 +02:00
D.R.racer
fd9f4ffb9e
Sync MK3<->MK4 MMU2 progress converter
2023-09-18 10:51:32 +02:00
D.R.racer
ec4740fe53
Clean-up ProgressCodes and ErrorCodes parameters throughout the code
2023-09-18 10:51:32 +02:00
D.R.racer
717281cd87
Sync MK3<->MK4 MMU2 crc
2023-09-18 10:51:32 +02:00
D.R.racer
f235976f26
Sync MK3<->MK4 MMU2 protocol logic
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
sarusani
dc129e0934
Remove obsolete mesh definitions
...
Clean up mesh definitions that where made obsolete by #4183
2023-09-13 10:49:52 +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
0aa380b931
Merge pull request #4206 from gudnimg/sd-card-menu-opt
...
optimisation: `menu_item == menu_line` is always true in `menu_item_sddir()` and `menu_item_sdfile()`
2023-09-13 07:49:43 +02:00
3d-gussner
73118dd4e2
Merge pull request #2474 from vintagepc/#2161-tune-x-y-rehome
...
Add X-Y home to tune menu if print is paused
2023-09-13 07:49:23 +02:00
3d-gussner
f5d48cd029
Merge pull request #4342 from gudnimg/optimsation_timer_class
...
optimisation: Timer constructor can be `constexpr`
2023-09-13 07:48:43 +02:00