Extended capabilities report in M115

This commit is contained in:
Scott Lahteine 2016-11-08 18:05:59 -06:00
parent 68b866b5dd
commit 3c9a838651
21 changed files with 157 additions and 9 deletions

View File

@ -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
*/

View File

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

View File

@ -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
}
/**

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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!"