Configurations embed and retrieve (#21321, #23303)

This commit is contained in:
X-Ryl669
2021-12-14 07:22:06 +01:00
committed by Scott Lahteine
parent f2ca70e232
commit 0dc1a58b24
15 changed files with 436 additions and 86 deletions

View File

@ -24,7 +24,6 @@
#include "../../inc/MarlinConfig.h"
#include "../queue.h" // for getting the command port
#if ENABLED(M115_GEOMETRY_REPORT)
#include "../../module/motion.h"
#endif
@ -33,13 +32,25 @@
#include "../../feature/caselight.h"
#endif
//#define MINIMAL_CAP_LINES // Don't even mention the disabled capabilities
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
static void cap_line(FSTR_P const name, bool ena=false) {
SERIAL_ECHOPGM("Cap:");
SERIAL_ECHOF(name);
SERIAL_CHAR(':', '0' + ena);
SERIAL_EOL();
}
#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);
SERIAL_CHAR(':', '0' + ena);
SERIAL_EOL();
}
#endif
#endif
/**
@ -167,6 +178,9 @@ void GcodeSuite::M115() {
// MEATPACK Compression
cap_line(F("MEATPACK"), SERIAL_IMPL.has_feature(port, SerialFeature::MeatPack));
// CONFIG_EXPORT
cap_line(F("CONFIG_EXPORT"), ENABLED(CONFIG_EMBED_AND_SAVE_TO_SD));
// Machine Geometry
#if ENABLED(M115_GEOMETRY_REPORT)
const xyz_pos_t bmin = { 0, 0, 0 },