Commit Graph

6395 Commits

Author SHA1 Message Date
Guðni Már Gilbert bd932b3b10 Cleanup: Fix two compiler warnings 2022-09-16 10:22:38 +02:00
Guðni Már Gilbert cfc56af95c Cleanup: fix parameter comments 2022-09-16 10:22:38 +02:00
Guðni Már Gilbert 268c96334b Cleanup: Pull out PrusaErrorCodeIndex
Saves 8 bytes of flash
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert d49e858cf7 PFW-1323 Fix MMU error screen doesn't disappear when error resolved on the MMU 2022-09-16 10:22:38 +02:00
Guðni Már Gilbert 7b91e73c8b Fix issue where error screen updates too slowly in manage_response 2022-09-16 10:22:38 +02:00
Guðni Már Gilbert 98d07e6a09 Call lcd_set_custom_characters_nextpage 2022-09-16 10:22:38 +02:00
Guðni Már Gilbert 5ced30d8ca Cleanup: Add comments and reduce code size slightly 2022-09-16 10:22:38 +02:00
Guðni Már Gilbert 352a22c22e Cleanup: Remove unused callback
Remove unused callback in lcd_show_multiscreen_message_with_choices_and_wait_P
2022-09-16 10:22:38 +02:00
Guðni Már Gilbert ecb4d08049 PFW-1318 Rewrite the implementation to be non-blocking 2022-09-16 10:22:38 +02:00
Guðni Már Gilbert dc87bbae11 Fix compile error 2022-09-16 10:22:38 +02:00
D.R.racer 0e75a03c8c Reuse FSensor runout blocking impl. throughout the whole FW 2022-09-16 10:22:38 +02:00
D.R.racer eed816d9de Fix build 2022-09-16 10:22:38 +02:00
D.R.racer d7270e0b80 Fix lang build 2022-09-16 10:22:38 +02:00
D.R.racer f04d83fc4c Update printer's type (MMU/non-MMU) at runtime
+ reformat utils.cpp
2022-09-16 10:22:38 +02:00
D.R.racer 5082da78d2 Convert button on LCD into button for MMU
- Dependent on current MMU error being processed
- Includes rename of LEFT_BUTTON_CHOICE -> LCD_LEFT_BUTTON_CHOICE (and right, middle as well) to avoid confusion with MMU buttons' ordering
2022-09-16 10:22:38 +02:00
D.R.racer a0e9a302b8 Suppress communication drop-out < 8s (MMU in bootloader)
PFW-1327
2022-09-16 10:22:38 +02:00
D.R.racer ba8332cd3e Fix MK25 build 2022-09-16 10:22:38 +02:00
D.R.racer d628525a94 Fix build MK25S 2022-09-16 10:22:38 +02:00
D.R.racer f3f2086f29 Fix compilation MK3 2022-09-16 10:22:38 +02:00
D.R.racer 0bd3dfdcf7 This starts to print ;)
Temporarily disabled filament runout as this breaks ToolChange operation
yet for unknown reason.
2022-09-16 10:22:38 +02:00
D.R.racer 456ddbb538 Handle the new MMU states (slow load to fsensor) 2022-09-16 10:22:38 +02:00
D.R.racer 5f9ca6a6f3 Reorder errors list according to Prusa-Error-Codes #61 2022-09-16 10:22:37 +02:00
D.R.racer 8a92865969 Update MK3S to match MMU PR#168
- new progress and error codes
- remove #error from mmu2_power.cpp as it makes no sense
- remove temporary error translation code
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 33650c6e56 Remove redundant call to lcd_update_enable 2022-09-16 10:22:37 +02:00
Guðni Már Gilbert f1803357b0 Fix default selection after changes in PFW-1312
The Yes and No are reverted. Before PFW-132 Yes is 1 and No is 0
Now they are Yes is 0, and No is 1
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 45edc69cc4 Add back menu it confirm if extrusion has correct color after loading to nozzle via LCD
I've added the call to this message via the menu function to ensure it
only appears when interacting with the LCD
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 1c26875e0e PFW-1318 Implement callback to render status line
To render the thermometer and degree symbols
the CGRAM table will instead swap out
the feedrate and clock symbol when
lcd_set_custom_characters_nextpage()
is called.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 452f39dc4b fixup 2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 3b0fba14ac Remove unused parameter nlines to simplify things
This allows us to remove one overload
of lcd_display_message_fullscreen_P
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert e817a2d321 Don't block OnMMUProgressMsg while waiting for fsensor to trigger 2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 0aa3a5855e Add TODO to prompt user if extruder is extruding correct color 2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 1c25041134 Add the load to nozzle sequence once the MK3S takes control and MMU has disengaged idler.
Also removed ProgressCode::FeedingToNozzle from switch-case since it is not used for this purpose at the moment.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 3e77f9f3a1 Reduce grinding when loading to the fsensor
- 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.
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 450ce0fc64 Improve 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
2022-09-16 10:22:37 +02:00
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 87ed42ba9b Fix FW update needed button order 2022-09-16 10:22:37 +02:00
D.R.racer 108f439bb7 Make sure the MMU error title never overflows on the LCD 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 138a0d21c7 Change default selection parameter from bool to uint8_t
This allows us make any of the three button choices the default selection
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 89e2bc4d6b Change name of variable 'yes' to be more descriptive 2022-09-16 10:22:37 +02:00
Guðni Már Gilbert c1ec80817c Update the error menu after merging new changes
Will test this tomorrow
2022-09-16 10:22:37 +02:00
D.R.racer c28354bf92 Update error codes + constexpr FindErrorIndex
Beware - requires avr-gcc 7.3!
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 6e1cf7e98c Fixup 2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 031c588802 Make all choice menus return consistent values
Such that left = 0, middle = 1, and right = 2
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 37bfd8ecd1 Checkpoint
- combined lcd_show_three_choices_prompt_P and lcd_show_two_choices_prompt_P into one function called lcd_show_choices_prompt_P
- Removed third_col parameter
- Added an enum to make the button selection result more readable
2022-09-16 10:22:37 +02:00
Guðni Már Gilbert 8dbb883971 Add helper macros to parse nibbles
Also made the button operations and nibbles constant since they should not be modified.
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 734e176445 Don't disable LCD updates in menu_item_function_P 2022-09-16 10:22:37 +02:00