浏览代码

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
Guðni Már Gilbert 2 年之前
父节点
当前提交
45edc69cc4
共有 2 个文件被更改,包括 7 次插入6 次删除
  1. 0 4
      Firmware/mmu2.cpp
  2. 7 2
      Firmware/ultralcd.cpp

+ 0 - 4
Firmware/mmu2.cpp

@@ -356,10 +356,6 @@ bool MMU2::load_filament_to_nozzle(uint8_t index) {
         SetActiveExtruder(0);
 
         Sound_MakeSound(e_SOUND_TYPE_StandardConfirm);
-
-        // TODO: The LCD should prompt the user with a full-screen message
-        //       to ask whether the extruder is extruding the correct color.
-        //       This does not apply when the tool change is done via gcode.
         return true;
     }
 }

+ 7 - 2
Firmware/ultralcd.cpp

@@ -2301,8 +2301,6 @@ void lcd_load_filament_color_check()
 {
 	bool clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, true);
 	while (clean == MIDDLE_BUTTON_CHOICE) {
-		lcd_update_enable(true);
-		lcd_update(2);
 		load_filament_final_feed();
 		st_synchronize();
 		clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, true);
@@ -5125,6 +5123,13 @@ static void mmu_load_filament_menu() {
 
 static inline void lcd_mmu_load_to_nozzle_wrapper(uint8_t index){
     MMU2::mmu2.load_filament_to_nozzle(index);
+
+	// Ask user if the extruded color is correct:
+	lcd_return_to_status();
+	lcd_update_enable(true);
+	lcd_load_filament_color_check();
+	lcd_setstatuspgm(MSG_WELCOME);
+	custom_message_type = CustomMsg::Status;
 }
 
 static void mmu_load_to_nozzle_menu() {