Commit Graph

17 Commits

Author SHA1 Message Date
Guðni Már Gilbert 50cd6e77cc Initial commit for loading filament to the nozzle 2022-09-16 10:22:37 +02:00
D.R.racer 68b007c759 Fix compile-time conversion MMU2 ErrorCode -> Prusa-Error-Code
and hide some of the implementation details into mmu2_error_converter.cpp
which makes the code in mmu_reporting.cpp much easier to read.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert e6a3fa5e40 Remove unused includes after I moved the MMU error screen 2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 83fefe10c1 Checkpoint:
- 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[]
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 96ff291f59 Implement PFW-1312 in MMU code 2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 39df6440ce Allow LCD to be updated in manage_response loop
Also removed one TODO which David mentioned is not needed anymore
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert b59c9da9ee Move extruder when loading filament to fsensor
When the fsensor see filament, stop the extruder
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert dcebad21c8 Add missing spaces to ErrorCode messages
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.
2022-09-16 10:21:53 +02:00
Guðni Már Gilbert 6fab95f145 Fix PROGMEM read in ErrorCode message
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.
2022-09-16 10:21:53 +02:00
Guðni Már Gilbert 52f7fb8c51 Add missing space in ProgressCode message
Such that:
MMU2:P=123EngageIdler
Becomes:
MMU2:P=123 EngageIdler
2022-09-16 10:21:53 +02:00
Guðni Már Gilbert 2142cb0849 Fix overwrite in ProgressCode 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).
2022-09-16 10:21:53 +02:00
Guðni Már Gilbert d6044387d9 Fix crash in manage_response
The watchdog needs to be kicked in the for(;;) loop.
This is usually done by calling manage_heater before
manage_inactivity.
2022-09-16 10:21:53 +02:00
Alex Voinea c201a5791a Implement MMU hw reset 2022-09-16 10:21:53 +02:00
D.R.racer 9140ebba55 Add MMU FW version variables
hardcoded for now, but API ready
2022-09-16 10:21:53 +02:00
D.R.racer 4fa4b3b2fc Refactor Tx/Tc/T? commands 2022-09-16 10:21:53 +02:00
D.R.racer 5870bbc524 Prune most of TODO from mmu2.cpp
+ refactor sound.h for better readability
2022-09-16 10:21:53 +02:00
D.R.racer 2e293e90a0 MMU2 interface overhaul
First port of the new MMU2-printer interface into 8bit FW.
2022-09-16 10:21:53 +02:00