Commit Graph

142 Commits

Author SHA1 Message Date
D.R.racer 6298722f9a Disable E-motor before the MMU starts doing something
It may seem counterintuitive to disable the E-motor, but it gets enabled in the planner whenever the E-motor is to move.
The idea behind disbling the E-motor when it won't be needed for some time is to save power and lower the heat of the motor.
Therefore it is especially important to disable the motor before the printer pauses a print due to some MMU error screen.
2023-01-18 09:42:57 +01:00
D.R.racer 472f84e46a Avoid FullScreenMsg "Eject/Cut Filament" when called inside a toolchange
CutFilament and EjectFilament got a flag: enable/disable FullScreenMsg
2023-01-16 09:25:04 +01:00
D.R.racer 48ce22d41f Fix blank LCD while err. Load to Extr. Failed
Because this error is not an MMU error but a printer one, the existing infrastructure has been bent to support such a scenario.
During testing it turned out, that some machines fail to draw the error screen due to previous internal states.
This PR resets the internal states so that the conditions for drawing the error screen are met.
2023-01-16 09:25:04 +01:00
D.R.racer 58bed7e388 MMU: Make sound after the hotend reaches temp, not while waiting 2023-01-16 07:19:11 +01:00
Guðni Már Gilbert 5582114628 optimisation: re-use delay_keep_alive() in a few places
Change in memory:
Flash: -52 bytes
SRAM: 0 bytes
2023-01-15 19:21:55 +01:00
Guðni Már Gilbert d3aa40a575 Fix blank LCD issue 2023-01-14 13:51:10 +01:00
D.R.racer 85d27e6e5e Address 3 different start scenarios 1st lay cal + MMU
This PR tries to address the 3 different startup scenarios for 1st layer calibration with the MMU:

- 1st lay cal started with correct filament already loaded in the nozzle - we should continue, but skip the first 58mm (first 2 g-codes in the hard coded sequence) of purge line extrusion
- 1st lay cal started with other filament already loaded in the nozzle - we should unload and then issue a toolchange with no extra unload
- 1st lay cal started without loaded filament - we should just do a toolchange with no extra unload

PFW-1457
2022-12-30 15:04:45 +01:00
D.R.racer 52a3beb931 Cut & Eject: avoid preheat if no filament loaded
and add fullscreen messages for Cut & Eject (messages intentionally reused to save space)
2022-12-30 14:23:44 +01:00
D.R.racer 43f3865d7c Tune UI CutFilament & EjectFilament 2022-12-30 14:23:44 +01:00
D.R.racer 58ff0efb30 Silence nodiscard attribute at one spot
... where it is really irrelevant
2022-12-30 14:23:44 +01:00
D.R.racer 5e103cc24e Fixup: restoring temp. while Load2ExtrFailed 2022-12-30 14:23:44 +01:00
D.R.racer d4f0f363cd Fixes from tests
- introduce Cut Filament
- limit retries try-unload
- fix waiting in "Load to extruder failed" error screen
- add LOAD_TO_EXTRUDER_FAILED error definition
2022-12-30 14:23:44 +01:00
D.R.racer a30ea1c5ab Rename error: Load to Extruder Failed
as per request from the Content team
2022-12-30 14:23:44 +01:00
D.R.racer 0a3517e8b2 Show an error screen when try-unload fails to push filament into nozzle
This is a prototype implementation of having the ability to show an MMU error screen even for printer's errors (during an MMU operation).
Also, the retry count of unloads after failed load the extruder tube is now limited to ~3 attempts.

Technically, since this very error is not an MMU's one (MMU is just fine at this stage) but a printer's one I tried to hack the existing error-reporting infrastructure to handle such a case.
The original idea of this approach was suggested by @vintagePC
2022-12-30 14:23:44 +01:00
D.R.racer b2b7990cfc Allow tweaking try-unload feedrates
It looks like MMU2_VERIFY_LOAD_TO_NOZZLE_FEED_RATE can get much higher that the original 20mm/s.
50mm/s is the default now, can be tweaked further.
2022-12-30 14:23:44 +01:00
Alex Voinea 62ea78d46e Handle configurable distance past gears 2022-12-19 23:49:12 +01:00
Alex Voinea 70356b71df Handle filament sensor position that is not 0 2022-12-19 23:41:43 +01:00
Guðni Már Gilbert c72ae8a2f3 PFW-1439 Remove parameters from execute_load_to_nozzle_sequence 2022-12-19 21:12:12 +00:00
Guðni Már Gilbert 6ee5f08505 PFW-1439 Compensate load to nozzle extruder sequence for Extra Loading Distance
The Extra Loading Distance is configurable by the user.
We need to compensate the hardcoded sequence
such that it does not extrude too much or
too little. Currently the firmware
extrudes too little.
2022-12-19 21:12:11 +00:00
Alex Voinea 97ddcc66bb
Merge pull request #3839 from leptun/MMU2_split_variant_config
MMU2 split variant config
2022-12-19 20:31:01 +01:00
Alex Voinea ba0f051f72 Revert accidental removal of check 2022-12-18 15:55:48 +01:00
Guðni Már Gilbert 4c32e8b403 PFW-1457 make CHECK_FSENSOR into a function 2022-12-18 12:23:20 +00:00
Alex Voinea 8623d9ff55 Split the mmu2 config into MMU2 and MMU2S 2022-12-18 09:58:20 +01:00
Guðni Már Gilbert fee68b0f0d PFW-1457 Do not unload at start of First Layer Cal
Fixes issue where First Layer Cal. triggers an unload before any
filament is loaded

The purpose of this if() statement is to handle the case where
a user or developer is sending T-codes to the printer directly
via Serial. Such as when one first sends T0 and then T4.
And unload must be triggered in-between, we can do this automatically
if FINDA detect filament.

Change in memory:
Flash: -10 bytes
SRAM: 0 bytes
2022-12-18 05:51:21 +00:00
Guðni Már Gilbert c8157919b1 PFW-1440 Fix issue where cooldown timer is not set after a faile retry 2022-11-21 12:54:53 +01:00
Guðni Már Gilbert 37ac33bc32 Fix compiler warning 2022-11-21 12:54:53 +01:00
D.R.racer fe6e3ca2b1 Unload first before retrying
Should free the filament if accidentally held by the fsensor.
2022-11-20 19:23:07 +01:00
D.R.racer 5639620041 Avoid watchdog while doing VerifyFilamentEnteredPTFE 2022-11-20 17:27:36 +01:00
D.R.racer 84d9eee61d Resume hotend temperature if parked + MMU restarted
PFW-1355
2022-11-20 17:27:36 +01:00
Guðni Már Gilbert 01c1f4a8dd Load test: Monitor unload as well 2022-11-20 17:27:36 +01:00
Guðni Már Gilbert 5c8ea4c90a fixup 2022-11-20 17:27:36 +01:00
Guðni Már Gilbert 327f0edb17 VerifyFilamentEnteredPTFE must take into account the Extra Loading Distance 2022-11-20 17:27:36 +01:00
Guðni Már Gilbert c9d9ba0b1a Add a bracket around subtraction, just in case 2022-11-20 17:27:36 +01:00
Guðni Már Gilbert ef51b5778d Fix VerifyFilamentEnteredPTFE
Test should push filament first and then retract.
2022-11-20 17:27:36 +01:00
D.R.racer a17153f877 Make TMC mask more readable 2022-11-20 17:27:36 +01:00
Guðni Már Gilbert f1ed2fc5c7 Fix issue where tool_change_extruder is not reset after retry 2022-11-20 17:27:36 +01:00
Guðni Már Gilbert 46f4f2658d PFW-1432 Reduce LOC
If verification test fails, increment load fail statistic
2022-11-20 17:27:36 +01:00
Guðni Már Gilbert 03235c8aab PFW-1432 restore toolchange load testing 2022-11-20 17:27:36 +01:00
D.R.racer adb24cd410 Increment errors in ReportError 2022-11-20 17:27:36 +01:00
D.R.racer 4eaabbf092 Revive MMU stats + LCD screens 2022-11-20 17:27:36 +01:00
D.R.racer fe11b7a247 Tune Interrupted state based on unit tests
Now finally the printer can restart ToolChange if MMU restarted.
2022-11-20 17:27:36 +01:00
D.R.racer ffbd95b482 Unify naming convention (index->slot)
in all top level MMU-related functions
2022-11-20 17:27:36 +01:00
D.R.racer e414413b2e Refactor ToolChange+LoadToNozzle
Add basic infrastructure for handling of repeated commands until they finish correctly.
2022-11-20 17:27:36 +01:00
D.R.racer 10a9e0f0a0 Recover from MMU restart while performing a command
PFW-1427
2022-11-20 17:27:36 +01:00
Guðni Már Gilbert e11ef11a64 PFW-1425 Rename "Load to Extruder" to "Loading Test" 2022-11-16 06:00:15 +01:00
Guðni Már Gilbert 006fe110cc Don't raise MMU error screen until retry is done
Change in memory:
Flash: +8 bytes
SRAM: 0 bytes
2022-11-12 18:47:10 +01:00
VintagePC 68bd7f9b19 Fix excessive flash usage. 2022-11-12 18:47:10 +01:00
VintagePC ecef69012a Fix PFW-1364 & possible comms timeout during reheat 2022-11-12 18:47:10 +01:00
Guðni Már Gilbert a896dfd4e0 PFW-1397 To reserve EEPROM write cycles, only update toolchange counter when a print finishes or is stopped 2022-11-08 13:49:40 +01:00
Guðni Már Gilbert 3120bf0aa2 PFW-1397 Implement new function increment_tool_change_counter()
Reduces flash consumption by 44 bytes
2022-11-08 13:49:40 +01:00