Merge upstream changes from Marlin 2.1.2.2

This commit is contained in:
Stefan Kalscheuer
2024-02-13 20:32:22 +01:00
parent e466309bfb
commit 752476dc8f
1367 changed files with 41601 additions and 31124 deletions

View File

@@ -39,30 +39,27 @@
//#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
/**
* M115: Capabilities string and extended capabilities report
* If a capability is not reported, hosts should assume
* the capability is not present.
*
* NOTE: Always make sure to add new capabilities to the RepRap Wiki
* at https://reprap.org/wiki/Firmware_Capabilities_Protocol
*/
void GcodeSuite::M115() {
SERIAL_ECHOPGM("FIRMWARE_NAME:Marlin"
" " DETAILED_BUILD_VERSION " (" __DATE__ " " __TIME__ ")"
" SOURCE_CODE_URL:" SOURCE_CODE_URL
@@ -85,7 +82,7 @@ void GcodeSuite::M115() {
// Although this code should work on all STM32 based boards
SERIAL_ECHOPGM(" UUID:");
uint32_t *uid_address = (uint32_t*)UID_BASE;
LOOP_L_N(i, 3) {
for (uint8_t i = 0; i < 3; ++i) {
const uint32_t UID = uint32_t(READ_REG(*(uid_address)));
uid_address += 4U;
for (int B = 24; B >= 0; B -= 8) print_hex_byte(UID >> B);
@@ -100,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));
@@ -124,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));
@@ -153,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)
@@ -168,10 +165,10 @@ void GcodeSuite::M115() {
cap_line(F("PROMPT_SUPPORT"), ENABLED(HOST_PROMPT_SUPPORT));
// SDCARD (M20, M23, M24, etc.)
cap_line(F("SDCARD"), ENABLED(SDSUPPORT));
cap_line(F("SDCARD"), ENABLED(HAS_MEDIA));
// MULTI_VOLUME (M21 S/M21 U)
#if ENABLED(SDSUPPORT)
#if HAS_MEDIA
cap_line(F("MULTI_VOLUME"), ENABLED(MULTI_VOLUME));
#endif
@@ -179,7 +176,7 @@ void GcodeSuite::M115() {
cap_line(F("REPEAT"), ENABLED(GCODE_REPEAT_MARKERS));
// SD_WRITE (M928, M28, M29)
cap_line(F("SD_WRITE"), ENABLED(SDSUPPORT) && DISABLED(SDCARD_READONLY));
cap_line(F("SD_WRITE"), ENABLED(HAS_MEDIA) && DISABLED(SDCARD_READONLY));
// AUTOREPORT_SD_STATUS (M27 extension)
cap_line(F("AUTOREPORT_SD_STATUS"), ENABLED(AUTO_REPORT_SD_STATUS));
@@ -232,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:{"
@@ -249,6 +246,8 @@ void GcodeSuite::M115() {
),
"}" // max
"}," // full
);
SERIAL_ECHOLNPGM(
"work:{"
"min:{"
LIST_N(DOUBLE(NUM_AXES),