Sfoglia il codice sorgente

Extended capabilities report in M115

Scott Lahteine 8 anni fa
parent
commit
3c9a838651

+ 0
- 6
Marlin/Conditionals_post.h Vedi File

@@ -28,12 +28,6 @@
28 28
 #ifndef CONDITIONALS_POST_H
29 29
 #define CONDITIONALS_POST_H
30 30
 
31
-  #if ENABLED(EMERGENCY_PARSER)
32
-    #define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410"
33
-  #else
34
-    #define EMERGENCY_PARSER_CAPABILITIES ""
35
-  #endif
36
-
37 31
   /**
38 32
    * Axis lengths and center
39 33
    */

+ 5
- 0
Marlin/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 66
- 2
Marlin/Marlin_main.cpp Vedi File

@@ -175,7 +175,7 @@
175 175
  * M112 - Emergency stop.
176 176
  * M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE)
177 177
  * M114 - Report current position.
178
- * M115 - Report capabilities.
178
+ * M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT)
179 179
  * M117 - Display a message on the controller screen. (Requires an LCD)
180 180
  * M119 - Report endstops status.
181 181
  * M120 - Enable endstops detection.
@@ -5771,7 +5771,71 @@ inline void gcode_M114() { report_current_position(); }
5771 5771
  * M115: Capabilities string
5772 5772
  */
5773 5773
 inline void gcode_M115() {
5774
-  SERIAL_PROTOCOLPGM(MSG_M115_REPORT);
5774
+  SERIAL_PROTOCOLLNPGM(MSG_M115_REPORT);
5775
+
5776
+  #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
5777
+
5778
+    // EEPROM (M500, M501)
5779
+    SERIAL_PROTOCOLPGM("Cap:");
5780
+    #if ENABLED(EEPROM_SETTINGS)
5781
+      SERIAL_PROTOCOLLNPGM("EEPROM:1");
5782
+    #else
5783
+      SERIAL_PROTOCOLLNPGM("EEPROM:0");
5784
+    #endif
5785
+
5786
+    // AUTOREPORT_TEMP (M155)
5787
+    SERIAL_PROTOCOLPGM("Cap:");
5788
+    #if ENABLED(AUTO_REPORT_TEMPERATURES)
5789
+      SERIAL_PROTOCOLLNPGM("AUTOREPORT_TEMP:1");
5790
+    #else
5791
+      SERIAL_PROTOCOLLNPGM("AUTOREPORT_TEMP:0");
5792
+    #endif
5793
+
5794
+    // PROGRESS (M530 S L, M531 <file>, M532 X L)
5795
+    SERIAL_PROTOCOLPGM("Cap:");
5796
+    SERIAL_PROTOCOLPGM("PROGRESS:0");
5797
+
5798
+    // AUTOLEVEL (G29)
5799
+    SERIAL_PROTOCOLPGM("Cap:");
5800
+    #if HAS_ABL
5801
+      SERIAL_PROTOCOLLNPGM("AUTOLEVEL:1");
5802
+    #else
5803
+      SERIAL_PROTOCOLLNPGM("AUTOLEVEL:0");
5804
+    #endif
5805
+
5806
+    // Z_PROBE (G30)
5807
+    SERIAL_PROTOCOLPGM("Cap:");
5808
+    #if HAS_BED_PROBE
5809
+      SERIAL_PROTOCOLLNPGM("Z_PROBE:1");
5810
+    #else
5811
+      SERIAL_PROTOCOLLNPGM("Z_PROBE:0");
5812
+    #endif
5813
+
5814
+    // SOFTWARE_POWER (G30)
5815
+    SERIAL_PROTOCOLPGM("Cap:");
5816
+    #if HAS_POWER_SWITCH
5817
+      SERIAL_PROTOCOLLNPGM("SOFTWARE_POWER:1");
5818
+    #else
5819
+      SERIAL_PROTOCOLLNPGM("SOFTWARE_POWER:0");
5820
+    #endif
5821
+
5822
+    // TOGGLE_LIGHTS (M355)
5823
+    SERIAL_PROTOCOLPGM("Cap:");
5824
+    #if HAS_CASE_LIGHT
5825
+      SERIAL_PROTOCOLLNPGM("TOGGLE_LIGHTS:1");
5826
+    #else
5827
+      SERIAL_PROTOCOLLNPGM("TOGGLE_LIGHTS:0");
5828
+    #endif
5829
+
5830
+    // EMERGENCY_PARSER (M108, M112, M410)
5831
+    SERIAL_PROTOCOLPGM("Cap:");
5832
+    #if ENABLED(EMERGENCY_PARSER)
5833
+      SERIAL_PROTOCOLLNPGM("EMERGENCY_PARSER:1");
5834
+    #else
5835
+      SERIAL_PROTOCOLLNPGM("EMERGENCY_PARSER:0");
5836
+    #endif
5837
+
5838
+  #endif // EXTENDED_CAPABILITIES_REPORT
5775 5839
 }
5776 5840
 
5777 5841
 /**

+ 5
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/Felix/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/Hephestos/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/Hephestos_2/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/K8200/Configuration_adv.h Vedi File

@@ -848,4 +848,9 @@
848 848
  */
849 849
 //#define AUTO_REPORT_TEMPERATURES
850 850
 
851
+/**
852
+ * Include capabilities in M115 output
853
+ */
854
+//#define EXTENDED_CAPABILITIES_REPORT
855
+
851 856
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/K8400/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/RigidBot/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/SCARA/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/TAZ4/Configuration_adv.h Vedi File

@@ -850,4 +850,9 @@
850 850
  */
851 851
 //#define AUTO_REPORT_TEMPERATURES
852 852
 
853
+/**
854
+ * Include capabilities in M115 output
855
+ */
856
+//#define EXTENDED_CAPABILITIES_REPORT
857
+
853 858
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/WITBOX/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h Vedi File

@@ -844,4 +844,9 @@
844 844
  */
845 845
 //#define AUTO_REPORT_TEMPERATURES
846 846
 
847
+/**
848
+ * Include capabilities in M115 output
849
+ */
850
+//#define EXTENDED_CAPABILITIES_REPORT
851
+
847 852
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/delta/generic/Configuration_adv.h Vedi File

@@ -844,4 +844,9 @@
844 844
  */
845 845
 //#define AUTO_REPORT_TEMPERATURES
846 846
 
847
+/**
848
+ * Include capabilities in M115 output
849
+ */
850
+//#define EXTENDED_CAPABILITIES_REPORT
851
+
847 852
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h Vedi File

@@ -844,4 +844,9 @@
844 844
  */
845 845
 //#define AUTO_REPORT_TEMPERATURES
846 846
 
847
+/**
848
+ * Include capabilities in M115 output
849
+ */
850
+//#define EXTENDED_CAPABILITIES_REPORT
851
+
847 852
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h Vedi File

@@ -849,4 +849,9 @@
849 849
  */
850 850
 //#define AUTO_REPORT_TEMPERATURES
851 851
 
852
+/**
853
+ * Include capabilities in M115 output
854
+ */
855
+//#define EXTENDED_CAPABILITIES_REPORT
856
+
852 857
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h Vedi File

@@ -844,4 +844,9 @@
844 844
  */
845 845
 //#define AUTO_REPORT_TEMPERATURES
846 846
 
847
+/**
848
+ * Include capabilities in M115 output
849
+ */
850
+//#define EXTENDED_CAPABILITIES_REPORT
851
+
847 852
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/makibox/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 5
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h Vedi File

@@ -842,4 +842,9 @@
842 842
  */
843 843
 //#define AUTO_REPORT_TEMPERATURES
844 844
 
845
+/**
846
+ * Include capabilities in M115 output
847
+ */
848
+//#define EXTENDED_CAPABILITIES_REPORT
849
+
845 850
 #endif // CONFIGURATION_ADV_H

+ 1
- 1
Marlin/language.h Vedi File

@@ -129,7 +129,7 @@
129 129
 #define MSG_INVALID_EXTRUDER                "Invalid extruder"
130 130
 #define MSG_INVALID_SOLENOID                "Invalid solenoid"
131 131
 #define MSG_ERR_NO_THERMISTORS              "No thermistors - no temperature"
132
-#define MSG_M115_REPORT                     "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID EMERGENCY_PARSER_CAPABILITIES "\n"
132
+#define MSG_M115_REPORT                     "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID
133 133
 #define MSG_COUNT_X                         " Count X: "
134 134
 #define MSG_COUNT_A                         " Count A: "
135 135
 #define MSG_ERR_KILLED                      "Printer halted. kill() called!"

Loading…
Annulla
Salva