Add VOLUMETRIC capability item

2.0.x
Scott Lahteine 7 years ago
parent af1d6acb7e
commit 93a6a4e1a8

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

Loading…
Cancel
Save