|
@ -23,6 +23,14 @@ |
|
|
#include "../gcode.h" |
|
|
#include "../gcode.h" |
|
|
#include "../../inc/MarlinConfig.h" |
|
|
#include "../../inc/MarlinConfig.h" |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(EXTENDED_CAPABILITIES_REPORT) |
|
|
|
|
|
static void cap_line(const char * const name, bool ena=false) { |
|
|
|
|
|
SERIAL_PROTOCOLPGM("Cap:"); |
|
|
|
|
|
serialprintPGM(name); |
|
|
|
|
|
SERIAL_PROTOCOLLN(int(ena ? 1 : 0)); |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* M115: Capabilities string |
|
|
* M115: Capabilities string |
|
|
*/ |
|
|
*/ |
|
@ -32,86 +40,92 @@ void GcodeSuite::M115() { |
|
|
#if ENABLED(EXTENDED_CAPABILITIES_REPORT) |
|
|
#if ENABLED(EXTENDED_CAPABILITIES_REPORT) |
|
|
|
|
|
|
|
|
// SERIAL_XON_XOFF
|
|
|
// SERIAL_XON_XOFF
|
|
|
#if ENABLED(SERIAL_XON_XOFF) |
|
|
cap_line(PSTR("SERIAL_XON_XOFF") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:SERIAL_XON_XOFF:1"); |
|
|
#if ENABLED(SERIAL_XON_XOFF) |
|
|
#else |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:SERIAL_XON_XOFF:0"); |
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
|
|
|
|
|
|
// EEPROM (M500, M501)
|
|
|
// EEPROM (M500, M501)
|
|
|
#if ENABLED(EEPROM_SETTINGS) |
|
|
cap_line(PSTR("EEPROM") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:EEPROM:1"); |
|
|
#if ENABLED(EEPROM_SETTINGS) |
|
|
#else |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:EEPROM:0"); |
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// Volumetric Extrusion (M200)
|
|
|
|
|
|
cap_line(PSTR("VOLUMETRIC") |
|
|
|
|
|
#if DISABLED(NO_VOLUMETRICS) |
|
|
|
|
|
, true |
|
|
|
|
|
#endif |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
// AUTOREPORT_TEMP (M155)
|
|
|
// AUTOREPORT_TEMP (M155)
|
|
|
#if ENABLED(AUTO_REPORT_TEMPERATURES) |
|
|
cap_line(PSTR("AUTOREPORT_TEMP") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:AUTOREPORT_TEMP:1"); |
|
|
#if ENABLED(AUTO_REPORT_TEMPERATURES) |
|
|
#else |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:AUTOREPORT_TEMP:0"); |
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
|
|
|
|
|
|
// PROGRESS (M530 S L, M531 <file>, M532 X L)
|
|
|
// PROGRESS (M530 S L, M531 <file>, M532 X L)
|
|
|
SERIAL_PROTOCOLLNPGM("Cap:PROGRESS:0"); |
|
|
cap_line(PSTR("PROGRESS")); |
|
|
|
|
|
|
|
|
// Print Job timer M75, M76, M77
|
|
|
// Print Job timer M75, M76, M77
|
|
|
SERIAL_PROTOCOLLNPGM("Cap:PRINT_JOB:1"); |
|
|
cap_line(PSTR("PRINT_JOB"), true); |
|
|
|
|
|
|
|
|
// AUTOLEVEL (G29)
|
|
|
// AUTOLEVEL (G29)
|
|
|
#if HAS_AUTOLEVEL |
|
|
cap_line(PSTR("AUTOLEVEL") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:AUTOLEVEL:1"); |
|
|
#if HAS_AUTOLEVEL |
|
|
#else |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:AUTOLEVEL:0"); |
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
|
|
|
|
|
|
// Z_PROBE (G30)
|
|
|
// Z_PROBE (G30)
|
|
|
#if HAS_BED_PROBE |
|
|
cap_line(PSTR("Z_PROBE") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:Z_PROBE:1"); |
|
|
#if HAS_BED_PROBE |
|
|
#else |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:Z_PROBE:0"); |
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
|
|
|
|
|
|
// MESH_REPORT (M420 V)
|
|
|
// MESH_REPORT (M420 V)
|
|
|
#if HAS_LEVELING |
|
|
cap_line(PSTR("LEVELING_DATA") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:LEVELING_DATA:1"); |
|
|
#if HAS_LEVELING |
|
|
#else |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:LEVELING_DATA:0"); |
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
|
|
|
|
|
|
// BUILD_PERCENT (M73)
|
|
|
// BUILD_PERCENT (M73)
|
|
|
#if ENABLED(LCD_SET_PROGRESS_MANUALLY) |
|
|
cap_line(PSTR("BUILD_PERCENT") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:BUILD_PERCENT:1"); |
|
|
#if ENABLED(LCD_SET_PROGRESS_MANUALLY) |
|
|
#else |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:BUILD_PERCENT:0"); |
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
|
|
|
|
|
|
// SOFTWARE_POWER (M80, M81)
|
|
|
// SOFTWARE_POWER (M80, M81)
|
|
|
#if HAS_POWER_SWITCH |
|
|
cap_line(PSTR("SOFTWARE_POWER") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:SOFTWARE_POWER:1"); |
|
|
#if HAS_POWER_SWITCH |
|
|
#else |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:SOFTWARE_POWER:0"); |
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
|
|
|
|
|
|
// CASE LIGHTS (M355)
|
|
|
// CASE LIGHTS (M355)
|
|
|
#if HAS_CASE_LIGHT |
|
|
cap_line(PSTR("TOGGLE_LIGHTS") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:TOGGLE_LIGHTS:1"); |
|
|
#if HAS_CASE_LIGHT |
|
|
if (USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN)) { |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:CASE_LIGHT_BRIGHTNESS:1"); |
|
|
#endif |
|
|
} |
|
|
); |
|
|
else |
|
|
cap_line(PSTR("CASE_LIGHT_BRIGHTNESS") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:CASE_LIGHT_BRIGHTNESS:0"); |
|
|
#if HAS_CASE_LIGHT |
|
|
#else |
|
|
, USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN) |
|
|
SERIAL_PROTOCOLLNPGM("Cap:TOGGLE_LIGHTS:0"); |
|
|
#endif |
|
|
SERIAL_PROTOCOLLNPGM("Cap:CASE_LIGHT_BRIGHTNESS:0"); |
|
|
); |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// EMERGENCY_PARSER (M108, M112, M410)
|
|
|
// EMERGENCY_PARSER (M108, M112, M410)
|
|
|
#if ENABLED(EMERGENCY_PARSER) |
|
|
cap_line(PSTR("EMERGENCY_PARSER") |
|
|
SERIAL_PROTOCOLLNPGM("Cap:EMERGENCY_PARSER:1"); |
|
|
#if ENABLED(EMERGENCY_PARSER) |
|
|
#else |
|
|
, true |
|
|
SERIAL_PROTOCOLLNPGM("Cap:EMERGENCY_PARSER:0"); |
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
|
|
|
|
|
|
#endif // EXTENDED_CAPABILITIES_REPORT
|
|
|
#endif // EXTENDED_CAPABILITIES_REPORT
|
|
|
} |
|
|
} |
|
|