Extended capabilities report in M115

master
Scott Lahteine 8 years ago
parent 68b866b5dd
commit 3c9a838651

@ -28,12 +28,6 @@
#ifndef CONDITIONALS_POST_H #ifndef CONDITIONALS_POST_H
#define 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 * Axis lengths and center
*/ */

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -175,7 +175,7 @@
* M112 - Emergency stop. * M112 - Emergency stop.
* M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE) * M113 - Get or set the timeout interval for Host Keepalive "busy" messages. (Requires HOST_KEEPALIVE_FEATURE)
* M114 - Report current position. * 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) * M117 - Display a message on the controller screen. (Requires an LCD)
* M119 - Report endstops status. * M119 - Report endstops status.
* M120 - Enable endstops detection. * M120 - Enable endstops detection.
@ -5771,7 +5771,71 @@ inline void gcode_M114() { report_current_position(); }
* M115: Capabilities string * M115: Capabilities string
*/ */
inline void gcode_M115() { 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
} }
/** /**

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -848,4 +848,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -850,4 +850,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -844,4 +844,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -844,4 +844,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -844,4 +844,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -849,4 +849,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -844,4 +844,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -842,4 +842,9 @@
*/ */
//#define AUTO_REPORT_TEMPERATURES //#define AUTO_REPORT_TEMPERATURES
/**
* Include capabilities in M115 output
*/
//#define EXTENDED_CAPABILITIES_REPORT
#endif // CONFIGURATION_ADV_H #endif // CONFIGURATION_ADV_H

@ -129,7 +129,7 @@
#define MSG_INVALID_EXTRUDER "Invalid extruder" #define MSG_INVALID_EXTRUDER "Invalid extruder"
#define MSG_INVALID_SOLENOID "Invalid solenoid" #define MSG_INVALID_SOLENOID "Invalid solenoid"
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature" #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_X " Count X: "
#define MSG_COUNT_A " Count A: " #define MSG_COUNT_A " Count A: "
#define MSG_ERR_KILLED "Printer halted. kill() called!" #define MSG_ERR_KILLED "Printer halted. kill() called!"

Loading…
Cancel
Save