diff --git a/Marlin/Conditionals_post.h b/Marlin/Conditionals_post.h index 5dc5abc482b795a8767cd659eca71c23cc803530..ff997ce109598f8348878f0de9e4fb77e12907b4 100644 --- a/Marlin/Conditionals_post.h +++ b/Marlin/Conditionals_post.h @@ -28,12 +28,6 @@ #ifndef CONDITIONALS_POST_H #define CONDITIONALS_POST_H - #if ENABLED(EMERGENCY_PARSER) - #define EMERGENCY_PARSER_CAPABILITIES " EMERGENCY_CODES:M108,M112,M410" - #else - #define EMERGENCY_PARSER_CAPABILITIES "" - #endif - /** * Axis lengths and center */ diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 2be4fb46a35dadca72decfc61c3068e98b07e8ec..6faa05ae465f36ce52f36b1280891421a04f3c55 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 33cc43cbd148e2b6848ba608885a8641b9a3cc16..eef793eee8cc70a736a8756b9eabd332ffae294d 100755 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -175,7 +175,7 @@ * M112 - Emergency stop. * M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE) * M114 - Report current position. - * M115 - Report capabilities. + * M115 - Report capabilities. (Extended capabilities requires EXTENDED_CAPABILITIES_REPORT) * M117 - Display a message on the controller screen. (Requires an LCD) * M119 - Report endstops status. * M120 - Enable endstops detection. @@ -5771,7 +5771,71 @@ inline void gcode_M114() { report_current_position(); } * M115: Capabilities string */ inline void gcode_M115() { - SERIAL_PROTOCOLPGM(MSG_M115_REPORT); + SERIAL_PROTOCOLLNPGM(MSG_M115_REPORT); + + #if ENABLED(EXTENDED_CAPABILITIES_REPORT) + + // EEPROM (M500, M501) + SERIAL_PROTOCOLPGM("Cap:"); + #if ENABLED(EEPROM_SETTINGS) + SERIAL_PROTOCOLLNPGM("EEPROM:1"); + #else + SERIAL_PROTOCOLLNPGM("EEPROM:0"); + #endif + + // AUTOREPORT_TEMP (M155) + SERIAL_PROTOCOLPGM("Cap:"); + #if ENABLED(AUTO_REPORT_TEMPERATURES) + SERIAL_PROTOCOLLNPGM("AUTOREPORT_TEMP:1"); + #else + SERIAL_PROTOCOLLNPGM("AUTOREPORT_TEMP:0"); + #endif + + // PROGRESS (M530 S L, M531 <file>, M532 X L) + SERIAL_PROTOCOLPGM("Cap:"); + SERIAL_PROTOCOLPGM("PROGRESS:0"); + + // AUTOLEVEL (G29) + SERIAL_PROTOCOLPGM("Cap:"); + #if HAS_ABL + SERIAL_PROTOCOLLNPGM("AUTOLEVEL:1"); + #else + SERIAL_PROTOCOLLNPGM("AUTOLEVEL:0"); + #endif + + // Z_PROBE (G30) + SERIAL_PROTOCOLPGM("Cap:"); + #if HAS_BED_PROBE + SERIAL_PROTOCOLLNPGM("Z_PROBE:1"); + #else + SERIAL_PROTOCOLLNPGM("Z_PROBE:0"); + #endif + + // SOFTWARE_POWER (G30) + SERIAL_PROTOCOLPGM("Cap:"); + #if HAS_POWER_SWITCH + SERIAL_PROTOCOLLNPGM("SOFTWARE_POWER:1"); + #else + SERIAL_PROTOCOLLNPGM("SOFTWARE_POWER:0"); + #endif + + // TOGGLE_LIGHTS (M355) + SERIAL_PROTOCOLPGM("Cap:"); + #if HAS_CASE_LIGHT + SERIAL_PROTOCOLLNPGM("TOGGLE_LIGHTS:1"); + #else + SERIAL_PROTOCOLLNPGM("TOGGLE_LIGHTS:0"); + #endif + + // EMERGENCY_PARSER (M108, M112, M410) + SERIAL_PROTOCOLPGM("Cap:"); + #if ENABLED(EMERGENCY_PARSER) + SERIAL_PROTOCOLLNPGM("EMERGENCY_PARSER:1"); + #else + SERIAL_PROTOCOLLNPGM("EMERGENCY_PARSER:0"); + #endif + + #endif // EXTENDED_CAPABILITIES_REPORT } /** diff --git a/Marlin/example_configurations/Cartesio/Configuration_adv.h b/Marlin/example_configurations/Cartesio/Configuration_adv.h index f7e905a52918778a5c9b142b265be44a971e2121..9457e2cf082511726aea6aca2fad438cf82c8c3f 100644 --- a/Marlin/example_configurations/Cartesio/Configuration_adv.h +++ b/Marlin/example_configurations/Cartesio/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Felix/Configuration_adv.h b/Marlin/example_configurations/Felix/Configuration_adv.h index 23f9ddfaa8380ce82ee0914b9544f40c8583971c..4b6863eac6f150deb15947945ed1c74684b7d0e4 100644 --- a/Marlin/example_configurations/Felix/Configuration_adv.h +++ b/Marlin/example_configurations/Felix/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Hephestos/Configuration_adv.h b/Marlin/example_configurations/Hephestos/Configuration_adv.h index 5b800b49e7183dc46735a5889c68cb7979c7a3e9..4a1f18a7da550df25b9996fe14867637c61ecfd8 100644 --- a/Marlin/example_configurations/Hephestos/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h index fb2eab1352806a590351b5413f2fc270d928c57f..d56a4aba3eb57db57b535e63ab2156bd4c33ad9d 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration_adv.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/K8200/Configuration_adv.h b/Marlin/example_configurations/K8200/Configuration_adv.h index 01ddd10827d31aa69c6d35ce2140dcfd055820e2..1388269065a60567c23b421350db725d49a587e9 100644 --- a/Marlin/example_configurations/K8200/Configuration_adv.h +++ b/Marlin/example_configurations/K8200/Configuration_adv.h @@ -848,4 +848,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/K8400/Configuration_adv.h b/Marlin/example_configurations/K8400/Configuration_adv.h index 16b87d259ac5dc1f1e9e1a51bb0412e629dcab14..d601e039aa786440161f943f2cc6673e78e6929f 100644 --- a/Marlin/example_configurations/K8400/Configuration_adv.h +++ b/Marlin/example_configurations/K8400/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/RigidBot/Configuration_adv.h b/Marlin/example_configurations/RigidBot/Configuration_adv.h index 2a6a15c3e069d67586c7fa368a452b26d4e9561d..49e85037f850cd91dd049d85623a44a712d3673d 100644 --- a/Marlin/example_configurations/RigidBot/Configuration_adv.h +++ b/Marlin/example_configurations/RigidBot/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/SCARA/Configuration_adv.h b/Marlin/example_configurations/SCARA/Configuration_adv.h index 30e90f70b0a1a25035a657d502057729f39efcd7..8147a0246a8593fd7557af8f2e6b6433df189616 100644 --- a/Marlin/example_configurations/SCARA/Configuration_adv.h +++ b/Marlin/example_configurations/SCARA/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/TAZ4/Configuration_adv.h b/Marlin/example_configurations/TAZ4/Configuration_adv.h index 68d67ce568f0ddfc9f431f608d607e27774fee93..e9417311ec02f1005dbdf902457ea699676ea794 100644 --- a/Marlin/example_configurations/TAZ4/Configuration_adv.h +++ b/Marlin/example_configurations/TAZ4/Configuration_adv.h @@ -850,4 +850,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/WITBOX/Configuration_adv.h b/Marlin/example_configurations/WITBOX/Configuration_adv.h index 5b800b49e7183dc46735a5889c68cb7979c7a3e9..4a1f18a7da550df25b9996fe14867637c61ecfd8 100644 --- a/Marlin/example_configurations/WITBOX/Configuration_adv.h +++ b/Marlin/example_configurations/WITBOX/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h index 172f6bda70b8880029fc0a6e71288a53a48de338..a478e01977649542072a311f5ab94f2aec92484e 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration_adv.h @@ -844,4 +844,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/generic/Configuration_adv.h b/Marlin/example_configurations/delta/generic/Configuration_adv.h index d320474937def5b398a8441644fa838b6ab86ce7..08f36f5f73e5f48661b005cfbb26a0210c613c86 100644 --- a/Marlin/example_configurations/delta/generic/Configuration_adv.h +++ b/Marlin/example_configurations/delta/generic/Configuration_adv.h @@ -844,4 +844,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h index d320474937def5b398a8441644fa838b6ab86ce7..08f36f5f73e5f48661b005cfbb26a0210c613c86 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h @@ -844,4 +844,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h index 550269bfb5a5dd0dc62ef13986bb14f82a40d8f2..894ce85eddfe3de1bdfa2e005b9378832ced2128 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h @@ -849,4 +849,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h index 7c61bfdc572255d5b4b6a10aecb68d7f7f257d2b..77c899597a745be0492635a28a61039e3003516b 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h @@ -844,4 +844,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/makibox/Configuration_adv.h b/Marlin/example_configurations/makibox/Configuration_adv.h index 986c09cff0763fb88218356cc8f2fe2fc80b9d3e..ca451cc3bf9576a24e51ced2acd5b00c58fa4ef1 100644 --- a/Marlin/example_configurations/makibox/Configuration_adv.h +++ b/Marlin/example_configurations/makibox/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h index 07a097fcb371fd9c486d7328d691867fc513669e..22c0a04e7f63c205b2b28117f29d767ff6788bb2 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h @@ -842,4 +842,9 @@ */ //#define AUTO_REPORT_TEMPERATURES +/** + * Include capabilities in M115 output + */ +//#define EXTENDED_CAPABILITIES_REPORT + #endif // CONFIGURATION_ADV_H diff --git a/Marlin/language.h b/Marlin/language.h index 87a0d08c316d955c2423de558eaa76035d6535a1..4254f449383c5dcdab52c9f1568ddedb521fe58f 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -129,7 +129,7 @@ #define MSG_INVALID_EXTRUDER "Invalid extruder" #define MSG_INVALID_SOLENOID "Invalid solenoid" #define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature" -#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" +#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 #define MSG_COUNT_X " Count X: " #define MSG_COUNT_A " Count A: " #define MSG_ERR_KILLED "Printer halted. kill() called!"