Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream changes from Marlin 2.1.2.3 #532

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* Advanced settings can be found in Configuration_adv.h
*/
#define CONFIGURATION_H_VERSION 02010202
#define CONFIGURATION_H_VERSION 02010203
#define ANYCUBIC_TOUCHSCREEN
#define KNUTWURST_SPECIAL_MENU
// #define ANYCUBIC_TFT_DEBUG
Expand Down Expand Up @@ -802,6 +802,7 @@
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif

/**
* Model Predictive Control for hotend
*
Expand Down Expand Up @@ -1851,8 +1852,6 @@

// Most probes should stay away from the edges of the bed, but
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
// #define PROBING_MARGIN 10

#if ENABLED(KNUTWURST_CHIRON)
#define PROBING_MARGIN 15
#else
Expand Down Expand Up @@ -4015,10 +4014,10 @@
#define SERVO_DELAY { 300 }

// Only power servos during movement, otherwise leave off to prevent jitter
// #define DEACTIVATE_SERVOS_AFTER_MOVE
//#define DEACTIVATE_SERVOS_AFTER_MOVE

// Edit servo angles with M281 and save to EEPROM with M500
// #define EDITABLE_SERVO_ANGLES
//#define EDITABLE_SERVO_ANGLES

// Disable servo with M282 to reduce power consumption, noise, and heat when not in use
// #define SERVO_DETACH_GCODE
//#define SERVO_DETACH_GCODE
8 changes: 4 additions & 4 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* Basic settings can be found in Configuration.h
*/
#define CONFIGURATION_ADV_H_VERSION 02010202
#define CONFIGURATION_ADV_H_VERSION 02010203

// @section develop

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

// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
Expand Down Expand Up @@ -4195,7 +4195,7 @@
* Extras for an ESP32-based motherboard with WIFISUPPORT
* These options don't apply to add-on WiFi modules based on ESP32 WiFi101.
*/
#if ENABLED(WIFISUPPORT)
#if ANY(WIFISUPPORT, ESP3D_WIFISUPPORT)
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery) using SPIFFS
//#define OTASUPPORT // Support over-the-air firmware updates
//#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host
Expand Down
4 changes: 2 additions & 2 deletions Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
//#define SHORT_BUILD_VERSION "2.1.2.2"
//#define SHORT_BUILD_VERSION "2.1.2.3"

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

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/core/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@
#define DEFER4(M) M EMPTY EMPTY EMPTY EMPTY()()()()

// Force define expansion
#define EVAL EVAL16
#define EVAL(V...) EVAL16(V)
#define EVAL4096(V...) EVAL2048(EVAL2048(V))
#define EVAL2048(V...) EVAL1024(EVAL1024(V))
#define EVAL1024(V...) EVAL512(EVAL512(V))
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ struct XYval {
// Length reduced to one dimension
FI constexpr T magnitude() const { return (T)sqrtf(x*x + y*y); }
// Pointer to the data as a simple array
FI operator T* () { return pos; }
explicit FI operator T* () { return pos; }
// If any element is true then it's true
FI constexpr operator bool() const { return x || y; }
// Smallest element
Expand Down Expand Up @@ -601,7 +601,7 @@ struct XYZval {
// Length reduced to one dimension
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); }
// Pointer to the data as a simple array
FI operator T* () { return pos; }
explicit FI operator T* () { return pos; }
// If any element is true then it's true
FI constexpr operator bool() const { return 0 NUM_AXIS_GANG(|| x, || y, || z, || i, || j, || k, || u, || v, || w); }
// Smallest element
Expand Down Expand Up @@ -749,7 +749,7 @@ struct XYZEval {
// Length reduced to one dimension
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)); }
// Pointer to the data as a simple array
FI operator T* () { return pos; }
explicit FI operator T* () { return pos; }
// If any element is true then it's true
FI constexpr operator bool() const { return 0 LOGICAL_AXIS_GANG(|| e, || x, || y, || z, || i, || j, || k, || u, || v, || w); }
// Smallest element
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/feature/powerloss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
#include "powerloss.h"
#include "../core/macros.h"

#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extui/ui_api.h"
#endif

bool PrintJobRecovery::enabled; // Initialized by settings.load()

MediaFile PrintJobRecovery::file;
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
#endif
#ifdef Y2_DRIVER_TYPE
#define HAS_Y2_STEPPER 1
#define HAS_DUAL_Y_STEPPERS 1
#endif

/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -2852,7 +2852,7 @@
#ifndef PROBE_OFFSET_YMAX
#define PROBE_OFFSET_YMAX 50
#endif
#if ALL(ENDSTOPPULLUPS, USE_Z_MIN_PROBE)
#if ALL(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN)
#define ENDSTOPPULLUP_ZMIN_PROBE
#endif
#ifndef XY_PROBE_FEEDRATE
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -3679,11 +3679,11 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
#if !(defined(WIFI_SSID) && defined(WIFI_PWD))
#error "ESP32 motherboard with WIFISUPPORT requires WIFI_SSID and WIFI_PWD."
#endif
#elif ENABLED(WIFI_CUSTOM_COMMAND)
#elif ENABLED(WIFI_CUSTOM_COMMAND) && NONE(ESP3D_WIFISUPPORT, WIFISUPPORT)
#error "WIFI_CUSTOM_COMMAND requires an ESP32 motherboard and WIFISUPPORT."
#elif ENABLED(OTASUPPORT)
#elif ENABLED(OTASUPPORT) && NONE(ESP3D_WIFISUPPORT, WIFISUPPORT)
#error "OTASUPPORT requires an ESP32 motherboard and WIFISUPPORT."
#elif defined(WIFI_SSID) || defined(WIFI_PWD)
#elif (defined(WIFI_SSID) || defined(WIFI_PWD)) && NONE(ESP3D_WIFISUPPORT, WIFISUPPORT)
#error "WIFI_SSID and WIFI_PWD only apply to ESP32 motherboard with WIFISUPPORT."
#endif

Expand Down
16 changes: 8 additions & 8 deletions Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Release version. Leave the Marlin version or apply a custom scheme.
*/
#ifndef SHORT_BUILD_VERSION
#define SHORT_BUILD_VERSION "2.1.2.2"
#define SHORT_BUILD_VERSION "2.1.2.3"
#endif

/**
Expand All @@ -41,10 +41,10 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define CUSTOM_BUILD_VERSION "1.5.4"
#define CUSTOM_BUILD_VERSION "1.5.4"

#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2024-03-22"
#define STRING_DISTRIBUTION_DATE "2024-05-29"
#endif

/**
Expand All @@ -54,7 +54,7 @@
* to alert users to major changes.
*/

#define MARLIN_HEX_VERSION 02010202
#define MARLIN_HEX_VERSION 02010203
#ifndef REQUIRED_CONFIGURATION_H_VERSION
#define REQUIRED_CONFIGURATION_H_VERSION MARLIN_HEX_VERSION
#endif
Expand Down Expand Up @@ -94,10 +94,10 @@
#define DEFAULT_MACHINE_UUID "b6153152-86fb-4cd8-bda7-91c6a04c467d" // PATCH: Knutwurst
#endif

/**
* The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release. Displayed in the Info Menu.
*/
/**
* The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release. Displayed in the Info Menu.
*/
#ifndef WEBSITE_URL
#define WEBSITE_URL "marlinfw.org"
#endif
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/lcd/language/language_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ namespace Language_en {
#else
LSTR MSG_ATTACH_MEDIA = _UxGT("Attach ") MEDIA_TYPE_EN;
#endif
LSTR MSG_ATTACH_SD_MEDIA = _UxGT("Attach SD Card");
LSTR MSG_CHANGE_MEDIA = _UxGT("Change ") MEDIA_TYPE_EN;
LSTR MSG_RELEASE_MEDIA = _UxGT("Release ") MEDIA_TYPE_EN;
LSTR MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed");
Expand Down
27 changes: 13 additions & 14 deletions Marlin/src/lcd/menu/menu_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,11 @@ void menu_configuration();
#endif

void menu_main() {
const bool busy = printingIsActive()
#if HAS_MEDIA
, card_detected = card.isMounted()
, card_open = card_detected && card.isFileOpen()
#endif
;
const bool busy = printingIsActive();
#if HAS_MEDIA
const bool card_detected = card.isMounted(),
card_open = card_detected && card.isFileOpen();
#endif

START_MENU();
BACK_ITEM(MSG_INFO_SCREEN);
Expand Down Expand Up @@ -275,12 +274,12 @@ void menu_main() {
else {
#if ALL(HAS_MEDIA, MEDIA_MENU_AT_TOP)
// BEGIN MEDIA MENU
#if ENABLED(MENU_ADDAUTOSTART)
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
#endif

if (card_detected) {
if (!card_open) {
#if ENABLED(MENU_ADDAUTOSTART)
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
#endif

#if HAS_SD_DETECT
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Change Media
#if ENABLED(MULTI_VOLUME)
Expand Down Expand Up @@ -392,12 +391,12 @@ void menu_main() {

#if HAS_MEDIA && DISABLED(MEDIA_MENU_AT_TOP)
// BEGIN MEDIA MENU
#if ENABLED(MENU_ADDAUTOSTART)
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
#endif

if (card_detected) {
if (!card_open) {
#if ENABLED(MENU_ADDAUTOSTART)
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
#endif

#if HAS_SD_DETECT
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Change Media
#if ENABLED(MULTI_VOLUME)
Expand Down
12 changes: 11 additions & 1 deletion Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2046,18 +2046,28 @@ void prepare_line_to_destination() {
do_homing_move(axis, -bump, TERN(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0), 0), false);

#if ENABLED(DETECT_BROKEN_ENDSTOP)

// Check for a broken endstop
EndstopEnum es;
switch (axis) {
#define _ESCASE(A) case A##_AXIS: es = A##_ENDSTOP; break;
MAIN_AXIS_MAP(_ESCASE)
default: break;
}

#if ENABLED(DUAL_X_CARRIAGE)
if (axis == X_AXIS && axis_home_dir > 0) {
es = X_MAX;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("DUAL_X_CARRIAGE: Homing to X_MAX");
}
#endif

if (TEST(endstops.state(), es)) {
SERIAL_ECHO_MSG("Bad ", C(AXIS_CHAR(axis)), " Endstop?");
kill(GET_TEXT_F(MSG_KILL_HOMING_FAILED));
}
#endif

#endif // DETECT_BROKEN_ENDSTOP

#if ALL(HOMING_Z_WITH_PROBE, BLTOUCH)
if (axis == Z_AXIS && !bltouch.high_speed_mode && bltouch.deploy())
Expand Down
Loading