浏览代码

Echo LCD message to serial in kill

Scott Lahteine 4 年前
父节点
当前提交
1eb68e9f9a
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7
    6
      Marlin/src/MarlinCore.cpp

+ 7
- 6
Marlin/src/MarlinCore.cpp 查看文件

825
 
825
 
826
   TERN_(HAS_CUTTER, cutter.kill()); // Full cutter shutdown including ISR control
826
   TERN_(HAS_CUTTER, cutter.kill()); // Full cutter shutdown including ISR control
827
 
827
 
828
-  SERIAL_ERROR_MSG(STR_ERR_KILLED);
828
+  // Echo the LCD message to serial for extra context
829
+  if (lcd_error) { SERIAL_ECHO_START(); SERIAL_ECHOLNPGM_P(lcd_error); }
829
 
830
 
830
   #if HAS_DISPLAY
831
   #if HAS_DISPLAY
831
     ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR);
832
     ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR);
832
   #else
833
   #else
833
-    UNUSED(lcd_error);
834
-    UNUSED(lcd_component);
834
+    UNUSED(lcd_error); UNUSED(lcd_component);
835
   #endif
835
   #endif
836
 
836
 
837
-  #if HAS_TFT_LVGL_UI
838
-    lv_draw_error_message(lcd_error);
839
-  #endif
837
+  TERN_(HAS_TFT_LVGL_UI, lv_draw_error_message(lcd_error));
838
+
839
+  // "Error:Printer halted. kill() called!"
840
+  SERIAL_ERROR_MSG(STR_ERR_KILLED);
840
 
841
 
841
   #ifdef ACTION_ON_KILL
842
   #ifdef ACTION_ON_KILL
842
     host_action_kill();
843
     host_action_kill();

正在加载...
取消
保存