This piece just changes the default extra load length on the MK3 side.
The same needs to be done on the MMU side but:
- the MMU exposes its register for this (so we can change the extra load distance by writing into the register via G-code)
- the printer shall probably set this value on its own after line up of MMU communication
I had a crash when producing an error screen and printer was unhomed.
Extruder was located at the far right side, and immediately crashed when attempting to park.
Since mmu_loop() is called in the main loop() function
when the MMU is disabled, we need to utilise the
MMU protocol layer to prevent FINDA runout from happening
if MMU is disabled.
We also need to keep in mind we probably can't trigger
a FINDA runout in the middle of a Q0 query.
So my solution now is to wait for the "Finished" state
and check if the FINDA is off during printing.
When "Finished" state appears, the FINDA value should be up
to date.
This fixes an issue where the assumed slot to use is unknown and
the printer will hang on loading filament 100.
Another good thing is this is an old user feature request which
we have in our 3.12 milestone.
Change in memory:
Flash: +14 bytes
SRAM: -1 bytes
Don't start moving the E-motor immediately
Instead of starting the E-motor move when the load to extruder starts,
we can start when we are loading to the fsensor. At that stage
the MMU has changed from a fast load to a slow load.
This is a draft PR showing the potential 3x retry implementation on the printer's side.
It is much less code and looks more reliable than the same functionality in the MMU FW.
Still, more work needs to be done:
- [ ] Button is sent to the MMU even before returning from the parking position
- [ ] Then the button is sent again
- [ ] Then the printer runs out of retryAttempts
We need to find a better spot to check for "automatic" retry and issuing of the buttons
* Fix MK3S buttons being processed too slowly
After a button is selected on the MK3S MMU error screen, we need to process it before asking for another MMU Query.
Because the MMU Query will make the Error screen return and overwrite the status screen
* Add back CheckUserInput for ButtonPushed event
When a FSENSOR error happens, the first step for the MK3S should be to stop any loading by stopping the E-motor.
From this point, the buttons should determine what the MK3S does next.
- We need to take into account additional 35mm move by the MMU.
- While the fsensor is not triggered, reduce the extruder movement each step from 20mm to 5mm. This should help reduce the variance in the filaments position before we run the final load to nozzle sequence.
- Fixed a bug where the feed rate was 60x higher than intended
- Adjusted the sequence via trial and error. The sequence where the filament has not exited the nozzle is 35mm shorter than the previous implementation
- I reduced the feed rate slightly (by 1mm/s) on the fast load sequence
- Rename lcd_show_multiscreen_message_two_choices_and_wait_P to lcd_show_multiscreen_message_with_choices_and_wait_P
- Move MMU error screen from ReportError() to ReportErrorHook()
- Fix the menu selection to work for menus with either two choices or three choices
- The buttons shown on the MMU error menu are now determined by the definition of btnOperation[]
Such that:
MMU2:E=32766ErrorTitleTextDescription
Becomes:
MMU2:E=32766 ErrorTitle TextDescription
Also simplified the process of combining ErrorTitle and TextDescription
into the msg buffer by using snprintf. This is saver since we only
use dstSize in one place instead of two.
This could cause the printer to crash. The Serial Stream would show
a garbled string.
Also included in this commit:
* The buffer size is increased from 64 bytes to 192 bytes. We need to
take into account the length of the ErrorTitle and ErrorDescription.
* Fix overwrite in ErrorCode message buffer.
When snprintf() if called we need to read the return value to see how
many bytes were written. Then when we call strncpy_P() through
TranslateProgress(), we need to tell the code to start writing
at byte 'len', or &msg[len]. Also we need to update the byte size
which strncpy_P() is allowed to write (64 - len).