Commit Graph

205 Commits

Author SHA1 Message Date
Yuri D'Elia
d478aa5c5e wizard: Rewrite the wizard handling loop
Simplify status tracking:

- S::Restore to continue to the next logical wizard item
- S::Finish for a successful failure
- S::Failed to exit while showing a failure
2023-01-02 10:51:47 +01:00
Yuri D'Elia
8a43aa0024 wizard: Remove unused wizard stages
Remove PreheatPla/IsPla, as we currently always explicitly ask for the
material type.
2023-01-02 10:51:47 +01:00
Yuri D'Elia
a18f28715d backport: Stub LCDButtonChoice for LCD_LEFT_BUTTON_CHOICE 2023-01-02 10:51:47 +01:00
Yuri D'Elia
3b65aa06c5 TM: Clear the Stopped state when stopping the current print
We allow resuming from the LCD via start print and resume print,
it makes sense to clear the error on stop too.

For this reason distinguish whether the action is performed
automatically or manually (ie: interactively).

The error is only cleared when the command is run interactively.
2022-12-19 10:47:41 +01:00
3d-gussner
b5b4e4d335
Merge pull request #3789 from 3d-gussner/MK3_3.12_Nozzle_change
Mk3 3.12 nozzle change
2022-11-30 15:51:17 +01:00
3d-gussner
d87f499443 Nozzle change menu
Fix cherry pick
2022-11-30 15:20:44 +01:00
3d-gussner
7fe1a50899 Inital Temp Model cal wizard 2022-11-20 11:02:38 +01:00
3d-gussner
4785eedc06 Fix typo
Add lcd_setatatus_serial to output lcd status message and serial at the same time
2022-11-02 10:19:16 +01:00
3d-gussner
6d358187ff Temp Model cal. menu 2022-10-28 05:39:14 +02:00
Yuri D'Elia
16d666302b Allow choice positioning. Balance Yes/No messages.
Add an additional parameter to control the position of second choice
prompt position (while defaulting to the old).

This allows Yes/No prompts to be equally spaced.
2022-09-14 07:30:57 +02:00
Alex Voinea
bef7b086e3 Isolate the entire farm and statistics code 2022-08-30 13:57:43 +02:00
Alex Voinea
7d597eb8b0 Move farm mode to separate file 2022-08-30 13:57:43 +02:00
Alex Voinea
25350dfbbc Remove unused variable bFilamentFirstRun
flash: 0
RAM: -1
2022-08-26 19:14:40 +03:00
Yuri D'Elia
b3ca70a007 Show thermal warnings using the new LCD_MESSAGE_INFO priority
Add a new LCD_MESSAGE_INFO priority which can be overridden by regular
status updates, but only if a certain amount of time has passed.

Assign a time stamp to all message updates, so that the time since the
last update can be determined. Also switch the message type to Status,
so that the message always becomes visibile.

Always show status or info messages when printing via SD if the message
is recent enough.
2022-07-25 17:30:22 +02:00
Yuri D'Elia
dc2d596f40 Do not allow lcd_updatestatus to be called directly
Enfoce the usage of lcd_setalertstatuspgm and lcd_setstatus so what we
consistently have alert severities properly set.
2022-07-25 17:30:22 +02:00
Yuri D'Elia
e37435b53f Merge remote-tracking branch 'upstream/MK3_3.11.1' into mk311_sync 2022-07-04 16:14:23 +02:00
Guðni Már Gilbert
727060ddd8 Replace CustomMsg::MsgUpdate with CustomMsg::M117
MsgUpdate was only used with M117, renaming the message type to M117 may be more descriptive for current use case.
2022-04-17 15:01:48 +00:00
Guðni Már Gilbert
c77b768fdd Make M117 custom message persistant if print is paused
If M117 is called before M601 then we would like the custom message to
be visible on the LCD screen until the print is resumed.

Change in memory: +10 bytes of flash

Fixes #3316
2022-04-17 14:00:41 +00:00
3d-gussner
879803daa9 Temp. cal. -> PINDA cal.
01234567890123456789
 Temp. cal.   [Off] old
 PINDA cal.   [Off] new

Temp. cal.  1/6     old
PINDA cal.    1/6   new

MSG_TEMP_CALIBRATION -> MSG_PINDA_CALIBRATION
MSG_TEMP_CALIBRATION_DONE -> MSG_PINDA_CALIBRATION_DONE

Updated text
- MSG_PINDA_CALIBRATION_DONE
- MSG_PINDA_CAL_FAILED

Update status line during PINDA cal.

Changed PINDA cal. from submenu to function
- Deleted `lcd_pinda_calibration_menu()`
- Deleted `#MSG_CALIBRATE_PINDA c=17`

Tried to update translations

Updated po files
2022-03-07 11:47:52 +01:00
DRracer
159c9c34bd
Merge pull request #3089 from wavexx/show_axes_during_crash
Show affected axes in crash detection messages
2022-02-17 09:52:19 +01:00
Yuri D'Elia
9b6fca9214 Introduce lcd_show_yes_no_and_wait for future use
Split off yes/no lcd handling from
lcd_show_fullscreen_message_yes_no_and_wait_P into a separate function
in order to allow generic requests where the text prompt can change.
2022-02-16 14:17:56 +01:00
Alex Voinea
a6331d22c8 Remove ancient SNMM code in the MK3 branch 2022-02-15 15:58:33 +01:00
Guðni Már Gilbert
4672b6444c
Merge branch 'MK3' into remove-eeprom-func 2022-02-11 19:32:11 +00:00
Alex Voinea
42b91a83cd Merge branch 'MK3' into MK3_3.12_Optimizations 2022-02-10 10:36:31 +01:00
Alex Voinea
234add3c58 Merge branch 'MK3' into lcd-optimisation-gudni 2022-02-08 00:14:59 +01:00
3d-gussner
0d4d386991
Merge pull request #3228 from gudnimg/remove-mmu_lcd
Remove a few redundant lines from ultralcd code
2022-02-07 17:04:34 +01:00
Guðni Már Gilbert
c6ecc0dfc9
Merge branch 'prusa3d:MK3' into lcd-optimisation-gudni 2022-02-06 09:54:58 +00:00
Alex Voinea
1523194d3b Fix build (merge conflict) 2022-01-30 13:18:07 +01:00
Guðni Már Gilbert
9bf45773f9 Merge remote-tracking branch 'upstream/MK3' into rebase-testing-ground-v2 2022-01-30 11:43:16 +00:00
Guðni Már Gilbert
2013295f94 Change farm_timer to uint8_t
Remove extern declaration of farm_timer and farm_status as they
are only used in one file.

Saves 26 bytes of flash
2022-01-30 11:39:26 +00:00
Guðni Már Gilbert
a687173e02 Change custom_message_state_old and custom_message_state to uint8_t
I see max value as 7*7+10 = 59

Saves 100 byte of flash and 1 byte of SRAM
2022-01-30 11:39:26 +00:00
DRracer
0be90dc5d1
Merge pull request #3320 from prusa3d/MK3_3.10.1
Merge MK3_3.10.1 into MK3 after release
2021-12-17 14:02:13 +01:00
Yuri D'Elia
fb025bba05 Introduce severity levels for alert messages
Use the internal lcd_status_message_level for multiple severity levels
of alert messages.

This is needed to distinguish between non-critical alerts (such as FAN
ERROR) from critical ones (any heater issue). During a failure
scenario, a critical error MUST NOT be overridden by a lower-level one.

As such LCD_STATUS_CRITICAL is currently used for all heater-related
errors that result in a safety full-stop.
2021-12-07 11:06:08 +01:00
Guðni Már Gilbert
b716c208d7 Various optimisation to change int to uint8_t
This commit saves 174 bytes of flash memory
2021-08-03 22:42:01 +00:00
Guðni Már Gilbert
6afc87d3c8 Reduce unnecessary LCD CGRAM writes 2021-07-30 23:53:57 +00:00
Guðni Már Gilbert
13477c65c6 Remove two functions EEPROM_read_B() and EEPROM_save_B()
This resolves #3218
2021-07-20 17:04:17 +00:00
Guðni Már Gilbert
538ce06bf0 Remove unused function lcd_choose_color() 2021-07-20 08:55:49 +02:00
Guðni Már Gilbert
153de8e1db Remove redundant lines 2021-07-10 17:01:13 +00:00
DRracer
6188870c2e
Merge pull request #3157 from wavexx/improve_d2
Add extra debugging functions & crash analysis
2021-06-22 07:37:30 +02:00
Alex Voinea
30d9faef9d
Minor fixes to SD presence handling (#3139)
* Remove forgotten function protorypes

* Fix code indentation

* Fix double sorting if SD card is inserted during setup()

* Correctly handle SD removal during sorting
2021-06-21 07:30:47 +02:00
Yuri D'Elia
050cf72e98 Move stack checking to the temperature ISR
Now that the stack_error function is truly minimal,
we can check for stack errors much more frequently.

Also move away stack_error from ultralcd to Marlin_main.
2021-06-12 15:23:33 +02:00
Yuri D'Elia
449510392d Untangle a bit some recursive include mess 2021-06-12 15:09:03 +02:00
Marek Bel
aa45091400
Scale extruder motor current linearly with speed. (#2813)
Scale extruder motor current linearly with speed.

49% less heating when running at low speed and standstill, 4% more torque at maximum extrusion rate (15mm^3/s), 15% more torque in high speed movements (un/retractions).

StealthChop mode is used for low speeds (below 900mm/min)
spreadCycle is used above. Transition speed is well above maximum extrusion rate of 15mm^3/s (275mm/min) so mode transition is not expected to be visible on printed surface.

StealthChop is expected to improve printed surface quality (less artifacts).

Warning you can burn extruder motor if it is not the same impedance as original Prusa i3 Extruder stepper motor. There is no current feedback in low speed so lower impedance motor can be burned by over current.

Even there is no direct current feedback, there is no risk for original motor thermal runaway, as motor resistance increases with temperature, current decreases.

Standstill peak phase current is expected to be 500 mA and linearly increase with speed to 970 mA at 900mm/min where spreadCycle constant current regulation takes over and keeps peak current at 805 mA to maximum speed possible.

As motor heating increases with current squared, lowering low speed current from 700mA to 500mA decreases heating 49% in thate mode, where motor spends most of the time.

Enable E-motor cool mode in farm mode only (and experimental menu) - the experimental menu is visible AND the EEPROM_ECOOL variable has a value of the universal answer to all problems of the universe - i.e. two conditions must be met at the start of the FW to enable the E-cool mode. If the user enables the experimental menu, sets the E-cool mode and disables the menu afterwards, on the next start of the FW the E-cool mode will be DISABLED. This is still subject to discussion how much obscure (security through obscurity) we'd like this option to have .

Additional stuff:
* Add serial debug msg to verify if E-cool mode is on
* Avoid access to E-cool mode switch on machines without TMC2130
* Do not allow only M907 E in case of E-cool mode+warn the user on the serial line that the command was skipped

Co-authored-by: D.R.racer <drracer@drracer.eu>
2021-04-23 16:06:28 +02:00
Yuri D'Elia
8d04316497 Revert/cleanup mininum extruder height during M600
This change restores the minimum extruder height for filament purge
during M600 from the current 50mm back to 27mm from FW 3.9.

We do this by introducing a new option for unload_filament() to indicate
that the unload is part of an automatic swap, and in such cases avoid
raising more than absolutely necessary (this will _also_ come in handy
to avoid the extra purge in PR #2318 during M600).

A new define MIN_Z_FOR_SWAP is introduced for this purpose.
MIN_Z_FOR_UNLOAD is still used for manual lcd unload and for M702 and
hasn't been changed.
2021-04-21 19:07:58 +02:00
Alex Voinea
7faffa539a
Merge branch 'MK3' into MK3_NEW_SD_COMPILATION 2021-02-26 09:48:46 +02:00
3d-gussner
a109d20506 Merge remote-tracking branch 'upstream/MK3' into PFW-1174
Fix merge issues
2021-02-18 11:05:31 +01:00
3d-gussner
59c2b7e795 Fix Fan error issues. 2021-02-17 07:42:12 +01:00
3d-gussner
d6c6517fcd Back to Status after Resuming 2021-02-16 07:27:46 +01:00
3d-gussner
fc270a356a Fix indentations 2021-02-15 12:50:40 +01:00
Alex Voinea
4c977cc335 Merge branch 'MK3' into MK3_NEW_SD_COMPILATION 2021-02-03 18:28:18 +02:00