소스 검색

Function for CONFIG_ECHO_HEADING

Scott Lahteine 4 년 전
부모
커밋
b8b225c8b5
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10
    1
      Marlin/src/module/configuration_store.cpp

+ 10
- 1
Marlin/src/module/configuration_store.cpp 파일 보기

@@ -2766,9 +2766,18 @@ void MarlinSettings::reset() {
2766 2766
 
2767 2767
 #if DISABLED(DISABLE_M503)
2768 2768
 
2769
+  static void config_heading(const bool repl, PGM_P const pstr, const bool eol=true) {
2770
+    if (!repl) {
2771
+      CONFIG_ECHO_START();
2772
+      SERIAL_ECHOPGM("; ");
2773
+      serialprintPGM(pstr);
2774
+      if (eol) SERIAL_EOL();
2775
+    }
2776
+  }
2777
+
2769 2778
   #define CONFIG_ECHO_START()       do{ if (!forReplay) SERIAL_ECHO_START(); }while(0)
2770 2779
   #define CONFIG_ECHO_MSG(STR)      do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(STR); }while(0)
2771
-  #define CONFIG_ECHO_HEADING(STR)  do{ if (!forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(STR); } }while(0)
2780
+  #define CONFIG_ECHO_HEADING(STR, V...) config_heading(forReplay, PSTR(STR), V)
2772 2781
 
2773 2782
   #if HAS_TRINAMIC
2774 2783
     inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM("  M906"); }

Loading…
취소
저장