🧑💻 Other code patches
This commit is contained in:
@@ -39,22 +39,15 @@
|
||||
//#define MINIMAL_CAP_LINES // Don't even mention the disabled capabilities
|
||||
|
||||
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
|
||||
#if ENABLED(MINIMAL_CAP_LINES)
|
||||
#define cap_line(S,C) if (C) _cap_line(S)
|
||||
static void _cap_line(FSTR_P const name) {
|
||||
SERIAL_ECHOPGM("Cap:");
|
||||
SERIAL_ECHOF(name);
|
||||
SERIAL_ECHOLNPGM(":1");
|
||||
}
|
||||
#else
|
||||
#define cap_line(V...) _cap_line(V)
|
||||
static void _cap_line(FSTR_P const name, bool ena=false) {
|
||||
SERIAL_ECHOPGM("Cap:");
|
||||
SERIAL_ECHOF(name);
|
||||
inline void cap_line(FSTR_P const name, const bool ena=true) {
|
||||
#if ENABLED(MINIMAL_CAP_LINES)
|
||||
if (ena) SERIAL_ECHOLNPGM("Cap:", name, ":1");
|
||||
#else
|
||||
SERIAL_ECHOPGM("Cap:", name);
|
||||
SERIAL_CHAR(':', '0' + ena);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -104,10 +97,10 @@ void GcodeSuite::M115() {
|
||||
serial_index_t port = queue.ring_buffer.command_port();
|
||||
|
||||
// PAREN_COMMENTS
|
||||
TERN_(PAREN_COMMENTS, cap_line(F("PAREN_COMMENTS"), true));
|
||||
TERN_(PAREN_COMMENTS, cap_line(F("PAREN_COMMENTS")));
|
||||
|
||||
// QUOTED_STRINGS
|
||||
TERN_(GCODE_QUOTED_STRINGS, cap_line(F("QUOTED_STRINGS"), true));
|
||||
TERN_(GCODE_QUOTED_STRINGS, cap_line(F("QUOTED_STRINGS")));
|
||||
|
||||
// SERIAL_XON_XOFF
|
||||
cap_line(F("SERIAL_XON_XOFF"), ENABLED(SERIAL_XON_XOFF));
|
||||
@@ -128,10 +121,10 @@ void GcodeSuite::M115() {
|
||||
cap_line(F("AUTOREPORT_TEMP"), ENABLED(AUTO_REPORT_TEMPERATURES));
|
||||
|
||||
// PROGRESS (M530 S L, M531 <file>, M532 X L)
|
||||
cap_line(F("PROGRESS"));
|
||||
cap_line(F("PROGRESS"), false);
|
||||
|
||||
// Print Job timer M75, M76, M77
|
||||
cap_line(F("PRINT_JOB"), true);
|
||||
cap_line(F("PRINT_JOB"));
|
||||
|
||||
// AUTOLEVEL (G29)
|
||||
cap_line(F("AUTOLEVEL"), ENABLED(HAS_AUTOLEVEL));
|
||||
@@ -157,9 +150,9 @@ void GcodeSuite::M115() {
|
||||
|
||||
// SPINDLE AND LASER CONTROL (M3, M4, M5)
|
||||
#if ENABLED(SPINDLE_FEATURE)
|
||||
cap_line(F("SPINDLE"), true);
|
||||
cap_line(F("SPINDLE"));
|
||||
#elif ENABLED(LASER_FEATURE)
|
||||
cap_line(F("LASER"), true);
|
||||
cap_line(F("LASER"));
|
||||
#endif
|
||||
|
||||
// EMERGENCY_PARSER (M108, M112, M410, M876)
|
||||
@@ -236,7 +229,7 @@ void GcodeSuite::M115() {
|
||||
const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(),
|
||||
wmin = cmin.asLogical(), wmax = cmax.asLogical();
|
||||
|
||||
SERIAL_ECHOLNPGM(
|
||||
SERIAL_ECHOPGM(
|
||||
"area:{"
|
||||
"full:{"
|
||||
"min:{"
|
||||
@@ -253,6 +246,8 @@ void GcodeSuite::M115() {
|
||||
),
|
||||
"}" // max
|
||||
"}," // full
|
||||
);
|
||||
SERIAL_ECHOLNPGM(
|
||||
"work:{"
|
||||
"min:{"
|
||||
LIST_N(DOUBLE(NUM_AXES),
|
||||
|
Reference in New Issue
Block a user