Skip to content

Commit 90e77c2

Browse files
authored
Merge pull request #532 from stklcode/fix/regression-2122
Merge upstream changes from Marlin 2.1.2.3
2 parents 5c1cebc + 35b6573 commit 90e77c2

20 files changed

+104
-91
lines changed

Marlin/Configuration.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*
3636
* Advanced settings can be found in Configuration_adv.h
3737
*/
38-
#define CONFIGURATION_H_VERSION 02010202
38+
#define CONFIGURATION_H_VERSION 02010203
3939
#define ANYCUBIC_TOUCHSCREEN
4040
#define KNUTWURST_SPECIAL_MENU
4141
// #define ANYCUBIC_TFT_DEBUG
@@ -802,6 +802,7 @@
802802
#else
803803
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
804804
#endif
805+
805806
/**
806807
* Model Predictive Control for hotend
807808
*
@@ -1851,8 +1852,6 @@
18511852

18521853
// Most probes should stay away from the edges of the bed, but
18531854
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
1854-
// #define PROBING_MARGIN 10
1855-
18561855
#if ENABLED(KNUTWURST_CHIRON)
18571856
#define PROBING_MARGIN 15
18581857
#else
@@ -4015,10 +4014,10 @@
40154014
#define SERVO_DELAY { 300 }
40164015

40174016
// Only power servos during movement, otherwise leave off to prevent jitter
4018-
// #define DEACTIVATE_SERVOS_AFTER_MOVE
4017+
//#define DEACTIVATE_SERVOS_AFTER_MOVE
40194018

40204019
// Edit servo angles with M281 and save to EEPROM with M500
4021-
// #define EDITABLE_SERVO_ANGLES
4020+
//#define EDITABLE_SERVO_ANGLES
40224021

40234022
// Disable servo with M282 to reduce power consumption, noise, and heat when not in use
4024-
// #define SERVO_DETACH_GCODE
4023+
//#define SERVO_DETACH_GCODE

Marlin/Configuration_adv.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* Basic settings can be found in Configuration.h
3232
*/
33-
#define CONFIGURATION_ADV_H_VERSION 02010202
33+
#define CONFIGURATION_ADV_H_VERSION 02010203
3434

3535
// @section develop
3636

@@ -1191,11 +1191,11 @@
11911191
* XY Frequency limit
11921192
* Reduce resonance by limiting the frequency of small zigzag infill moves.
11931193
* See https://hydraraptor.blogspot.com/2010/12/frequency-limit.html
1194-
* Use M201 F<freq> G<min%> to change limits at runtime.
1194+
* Use M201 F<freq> S<min%> to change limits at runtime.
11951195
*/
11961196
//#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F<hertz>.
11971197
#ifdef XY_FREQUENCY_LIMIT
1198-
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 G<min%>.
1198+
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 S<min%>.
11991199
#endif
12001200

12011201
// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
@@ -4195,7 +4195,7 @@
41954195
* Extras for an ESP32-based motherboard with WIFISUPPORT
41964196
* These options don't apply to add-on WiFi modules based on ESP32 WiFi101.
41974197
*/
4198-
#if ENABLED(WIFISUPPORT)
4198+
#if ANY(WIFISUPPORT, ESP3D_WIFISUPPORT)
41994199
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery) using SPIFFS
42004200
//#define OTASUPPORT // Support over-the-air firmware updates
42014201
//#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host

Marlin/Version.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* Marlin release version identifier
3030
*/
31-
//#define SHORT_BUILD_VERSION "2.1.2.2"
31+
//#define SHORT_BUILD_VERSION "2.1.2.3"
3232

3333
/**
3434
* Verbose version identifier which should contain a reference to the location
@@ -41,7 +41,7 @@
4141
* here we define this default string as the date where the latest release
4242
* version was tagged.
4343
*/
44-
//#define STRING_DISTRIBUTION_DATE "2024-02-08"
44+
//#define STRING_DISTRIBUTION_DATE "2024-05-29"
4545

4646
/**
4747
* Defines a generic printer name to be output to the LCD after booting Marlin.

Marlin/src/core/macros.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@
679679
#define DEFER4(M) M EMPTY EMPTY EMPTY EMPTY()()()()
680680

681681
// Force define expansion
682-
#define EVAL EVAL16
682+
#define EVAL(V...) EVAL16(V)
683683
#define EVAL4096(V...) EVAL2048(EVAL2048(V))
684684
#define EVAL2048(V...) EVAL1024(EVAL1024(V))
685685
#define EVAL1024(V...) EVAL512(EVAL512(V))

Marlin/src/core/types.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ struct XYval {
451451
// Length reduced to one dimension
452452
FI constexpr T magnitude() const { return (T)sqrtf(x*x + y*y); }
453453
// Pointer to the data as a simple array
454-
FI operator T* () { return pos; }
454+
explicit FI operator T* () { return pos; }
455455
// If any element is true then it's true
456456
FI constexpr operator bool() const { return x || y; }
457457
// Smallest element
@@ -601,7 +601,7 @@ struct XYZval {
601601
// Length reduced to one dimension
602602
FI constexpr T magnitude() const { return (T)TERN(HAS_X_AXIS, sqrtf(NUM_AXIS_GANG(x*x, + y*y, + z*z, + i*i, + j*j, + k*k, + u*u, + v*v, + w*w)), 0); }
603603
// Pointer to the data as a simple array
604-
FI operator T* () { return pos; }
604+
explicit FI operator T* () { return pos; }
605605
// If any element is true then it's true
606606
FI constexpr operator bool() const { return 0 NUM_AXIS_GANG(|| x, || y, || z, || i, || j, || k, || u, || v, || w); }
607607
// Smallest element
@@ -749,7 +749,7 @@ struct XYZEval {
749749
// Length reduced to one dimension
750750
FI constexpr T magnitude() const { return (T)sqrtf(LOGICAL_AXIS_GANG(+ e*e, + x*x, + y*y, + z*z, + i*i, + j*j, + k*k, + u*u, + v*v, + w*w)); }
751751
// Pointer to the data as a simple array
752-
FI operator T* () { return pos; }
752+
explicit FI operator T* () { return pos; }
753753
// If any element is true then it's true
754754
FI constexpr operator bool() const { return 0 LOGICAL_AXIS_GANG(|| e, || x, || y, || z, || i, || j, || k, || u, || v, || w); }
755755
// Smallest element

Marlin/src/feature/powerloss.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
#include "powerloss.h"
3232
#include "../core/macros.h"
3333

34+
#if ENABLED(EXTENSIBLE_UI)
35+
#include "../lcd/extui/ui_api.h"
36+
#endif
37+
3438
bool PrintJobRecovery::enabled; // Initialized by settings.load()
3539

3640
MediaFile PrintJobRecovery::file;

Marlin/src/inc/Conditionals_LCD.h

+1
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@
456456
#endif
457457
#ifdef Y2_DRIVER_TYPE
458458
#define HAS_Y2_STEPPER 1
459+
#define HAS_DUAL_Y_STEPPERS 1
459460
#endif
460461

461462
/**

Marlin/src/inc/Conditionals_post.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2852,7 +2852,7 @@
28522852
#ifndef PROBE_OFFSET_YMAX
28532853
#define PROBE_OFFSET_YMAX 50
28542854
#endif
2855-
#if ALL(ENDSTOPPULLUPS, USE_Z_MIN_PROBE)
2855+
#if ALL(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN)
28562856
#define ENDSTOPPULLUP_ZMIN_PROBE
28572857
#endif
28582858
#ifndef XY_PROBE_FEEDRATE

Marlin/src/inc/SanityCheck.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -3679,11 +3679,11 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
36793679
#if !(defined(WIFI_SSID) && defined(WIFI_PWD))
36803680
#error "ESP32 motherboard with WIFISUPPORT requires WIFI_SSID and WIFI_PWD."
36813681
#endif
3682-
#elif ENABLED(WIFI_CUSTOM_COMMAND)
3682+
#elif ENABLED(WIFI_CUSTOM_COMMAND) && NONE(ESP3D_WIFISUPPORT, WIFISUPPORT)
36833683
#error "WIFI_CUSTOM_COMMAND requires an ESP32 motherboard and WIFISUPPORT."
3684-
#elif ENABLED(OTASUPPORT)
3684+
#elif ENABLED(OTASUPPORT) && NONE(ESP3D_WIFISUPPORT, WIFISUPPORT)
36853685
#error "OTASUPPORT requires an ESP32 motherboard and WIFISUPPORT."
3686-
#elif defined(WIFI_SSID) || defined(WIFI_PWD)
3686+
#elif (defined(WIFI_SSID) || defined(WIFI_PWD)) && NONE(ESP3D_WIFISUPPORT, WIFISUPPORT)
36873687
#error "WIFI_SSID and WIFI_PWD only apply to ESP32 motherboard with WIFISUPPORT."
36883688
#endif
36893689

Marlin/src/inc/Version.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* Release version. Leave the Marlin version or apply a custom scheme.
2626
*/
2727
#ifndef SHORT_BUILD_VERSION
28-
#define SHORT_BUILD_VERSION "2.1.2.2"
28+
#define SHORT_BUILD_VERSION "2.1.2.3"
2929
#endif
3030

3131
/**
@@ -41,10 +41,10 @@
4141
* here we define this default string as the date where the latest release
4242
* version was tagged.
4343
*/
44-
#define CUSTOM_BUILD_VERSION "1.5.4"
44+
#define CUSTOM_BUILD_VERSION "1.5.4"
4545

4646
#ifndef STRING_DISTRIBUTION_DATE
47-
#define STRING_DISTRIBUTION_DATE "2024-03-22"
47+
#define STRING_DISTRIBUTION_DATE "2024-05-29"
4848
#endif
4949

5050
/**
@@ -54,7 +54,7 @@
5454
* to alert users to major changes.
5555
*/
5656

57-
#define MARLIN_HEX_VERSION 02010202
57+
#define MARLIN_HEX_VERSION 02010203
5858
#ifndef REQUIRED_CONFIGURATION_H_VERSION
5959
#define REQUIRED_CONFIGURATION_H_VERSION MARLIN_HEX_VERSION
6060
#endif
@@ -94,10 +94,10 @@
9494
#define DEFAULT_MACHINE_UUID "b6153152-86fb-4cd8-bda7-91c6a04c467d" // PATCH: Knutwurst
9595
#endif
9696

97-
/**
98-
* The WEBSITE_URL is the location where users can get more information such as
99-
* documentation about a specific Marlin release. Displayed in the Info Menu.
100-
*/
97+
/**
98+
* The WEBSITE_URL is the location where users can get more information such as
99+
* documentation about a specific Marlin release. Displayed in the Info Menu.
100+
*/
101101
#ifndef WEBSITE_URL
102102
#define WEBSITE_URL "marlinfw.org"
103103
#endif

Marlin/src/lcd/language/language_en.h

+1
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ namespace Language_en {
567567
#else
568568
LSTR MSG_ATTACH_MEDIA = _UxGT("Attach ") MEDIA_TYPE_EN;
569569
#endif
570+
LSTR MSG_ATTACH_SD_MEDIA = _UxGT("Attach SD Card");
570571
LSTR MSG_CHANGE_MEDIA = _UxGT("Change ") MEDIA_TYPE_EN;
571572
LSTR MSG_RELEASE_MEDIA = _UxGT("Release ") MEDIA_TYPE_EN;
572573
LSTR MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed");

Marlin/src/lcd/menu/menu_main.cpp

+13-14
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,11 @@ void menu_configuration();
233233
#endif
234234

235235
void menu_main() {
236-
const bool busy = printingIsActive()
237-
#if HAS_MEDIA
238-
, card_detected = card.isMounted()
239-
, card_open = card_detected && card.isFileOpen()
240-
#endif
241-
;
236+
const bool busy = printingIsActive();
237+
#if HAS_MEDIA
238+
const bool card_detected = card.isMounted(),
239+
card_open = card_detected && card.isFileOpen();
240+
#endif
242241

243242
START_MENU();
244243
BACK_ITEM(MSG_INFO_SCREEN);
@@ -275,12 +274,12 @@ void menu_main() {
275274
else {
276275
#if ALL(HAS_MEDIA, MEDIA_MENU_AT_TOP)
277276
// BEGIN MEDIA MENU
278-
#if ENABLED(MENU_ADDAUTOSTART)
279-
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
280-
#endif
281-
282277
if (card_detected) {
283278
if (!card_open) {
279+
#if ENABLED(MENU_ADDAUTOSTART)
280+
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
281+
#endif
282+
284283
#if HAS_SD_DETECT
285284
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Change Media
286285
#if ENABLED(MULTI_VOLUME)
@@ -392,12 +391,12 @@ void menu_main() {
392391

393392
#if HAS_MEDIA && DISABLED(MEDIA_MENU_AT_TOP)
394393
// BEGIN MEDIA MENU
395-
#if ENABLED(MENU_ADDAUTOSTART)
396-
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
397-
#endif
398-
399394
if (card_detected) {
400395
if (!card_open) {
396+
#if ENABLED(MENU_ADDAUTOSTART)
397+
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
398+
#endif
399+
401400
#if HAS_SD_DETECT
402401
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Change Media
403402
#if ENABLED(MULTI_VOLUME)

Marlin/src/module/motion.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -2046,18 +2046,28 @@ void prepare_line_to_destination() {
20462046
do_homing_move(axis, -bump, TERN(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0), 0), false);
20472047

20482048
#if ENABLED(DETECT_BROKEN_ENDSTOP)
2049+
20492050
// Check for a broken endstop
20502051
EndstopEnum es;
20512052
switch (axis) {
20522053
#define _ESCASE(A) case A##_AXIS: es = A##_ENDSTOP; break;
20532054
MAIN_AXIS_MAP(_ESCASE)
20542055
default: break;
20552056
}
2057+
2058+
#if ENABLED(DUAL_X_CARRIAGE)
2059+
if (axis == X_AXIS && axis_home_dir > 0) {
2060+
es = X_MAX;
2061+
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("DUAL_X_CARRIAGE: Homing to X_MAX");
2062+
}
2063+
#endif
2064+
20562065
if (TEST(endstops.state(), es)) {
20572066
SERIAL_ECHO_MSG("Bad ", C(AXIS_CHAR(axis)), " Endstop?");
20582067
kill(GET_TEXT_F(MSG_KILL_HOMING_FAILED));
20592068
}
2060-
#endif
2069+
2070+
#endif // DETECT_BROKEN_ENDSTOP
20612071

20622072
#if ALL(HOMING_Z_WITH_PROBE, BLTOUCH)
20632073
if (axis == Z_AXIS && !bltouch.high_speed_mode && bltouch.deploy())

0 commit comments

Comments
 (0)