Skip to content

Commit

Permalink
Merge branch 'bugfix-2.1.x' into pr/25636
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 6, 2023
2 parents 47dadbe + 42a5ae8 commit 4494f7c
Show file tree
Hide file tree
Showing 10 changed files with 192 additions and 283 deletions.
20 changes: 0 additions & 20 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,6 @@
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)

/**
* *** VENDORS PLEASE READ ***
*
* Marlin allows you to add a custom boot image for Graphical LCDs.
* With this option Marlin will first show your custom screen followed
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
* respectfully request that you retain the unmodified Marlin boot screen.
*/

// Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION **
#define SHOW_BOOTSCREEN

// Show the bitmap in Marlin/_Bootscreen.h on startup.
//#define SHOW_CUSTOM_BOOTSCREEN

// Show the bitmap in Marlin/_Statusscreen.h on the status screen.
//#define CUSTOM_STATUS_SCREEN_IMAGE

// @section machine

// Choose the name from boards.h that matches your setup
Expand Down
33 changes: 25 additions & 8 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@

#endif // BLTOUCH

// @section extras
// @section calibration

/**
* Z Steppers Auto-Alignment
Expand Down Expand Up @@ -1508,19 +1508,36 @@
#endif // HAS_MARLINUI_MENU

#if HAS_DISPLAY
/**
* *** VENDORS PLEASE READ ***
*
* Marlin allows you to add a custom boot image for Graphical LCDs.
* With this option Marlin will first show your custom screen followed
* by the standard Marlin logo with version number and web URL.
*
* We encourage you to take advantage of this new feature and we also
* respectfully request that you retain the unmodified Marlin boot screen.
*/
#if ANY(HAS_MARLINUI_U8GLIB, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI)
#define SHOW_BOOTSCREEN // Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION **
#if ENABLED(SHOW_BOOTSCREEN)
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
#if EITHER(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI)
#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash)
#endif
//#define SHOW_CUSTOM_BOOTSCREEN // Show the bitmap in Marlin/_Bootscreen.h on startup.
#endif
#if HAS_MARLINUI_U8GLIB
//#define CUSTOM_STATUS_SCREEN_IMAGE // Show the bitmap in Marlin/_Statusscreen.h on the status screen.
#endif
#endif

//#define SOUND_MENU_ITEM // Add a mute option to the LCD menu
#define SOUND_ON_DEFAULT // Buzzer/speaker default enabled state
// The timeout to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000 // (ms)
#if ENABLED(SHOW_BOOTSCREEN)
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
#if EITHER(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI)
#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash)
#endif
#endif

// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/bedlevel/bdl/bdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void BDS_Leveling::process() {
#endif
}
else {
babystep.set_mm(Z_AXIS, 0); //if (old_cur_z <= cur_z) Z_DIR_WRITE(!INVERT_Z_DIR);
babystep.set_mm(Z_AXIS, 0); //if (old_cur_z <= cur_z) Z_DIR_WRITE(INVERT_DIR(Z, HIGH));
stepper.set_directions();
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/gcode/eeprom/M500-M504.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "../../inc/MarlinConfig.h"

#if ENABLED(CONFIGURATION_EMBEDDING)
#include "../../sd/SdBaseFile.h"
#include "../../sd/cardreader.h"
#include "../../mczip.h"
#endif

Expand Down Expand Up @@ -69,7 +69,7 @@ void GcodeSuite::M502() {
SdBaseFile file;
const uint16_t size = sizeof(mc_zip);
// Need to create the config size on the SD card
if (file.open("mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close())
if (file.open(card.getroot(), "mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close())
SERIAL_ECHO_MSG("Configuration saved as 'mc.zip'");
}
#endif
Expand Down
36 changes: 18 additions & 18 deletions Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1952,72 +1952,72 @@ void prepare_line_to_destination() {
case X_AXIS:
phasePerUStep = PHASE_PER_MICROSTEP(X);
phaseCurrent = stepperX.get_microstep_counter();
effectorBackoutDir = -X_HOME_DIR;
stepperBackoutDir = IF_DISABLED(INVERT_X_DIR, -)effectorBackoutDir;
effectorBackoutDir = -(X_HOME_DIR);
stepperBackoutDir = TERN_(INVERT_X_DIR, -)(-effectorBackoutDir);
break;
#endif
#ifdef Y_MICROSTEPS
case Y_AXIS:
phasePerUStep = PHASE_PER_MICROSTEP(Y);
phaseCurrent = stepperY.get_microstep_counter();
effectorBackoutDir = -Y_HOME_DIR;
stepperBackoutDir = IF_DISABLED(INVERT_Y_DIR, -)effectorBackoutDir;
effectorBackoutDir = -(Y_HOME_DIR);
stepperBackoutDir = TERN_(INVERT_Y_DIR, -)(-effectorBackoutDir);
break;
#endif
#ifdef Z_MICROSTEPS
case Z_AXIS:
phasePerUStep = PHASE_PER_MICROSTEP(Z);
phaseCurrent = stepperZ.get_microstep_counter();
effectorBackoutDir = -Z_HOME_DIR;
stepperBackoutDir = IF_DISABLED(INVERT_Z_DIR, -)effectorBackoutDir;
effectorBackoutDir = -(Z_HOME_DIR);
stepperBackoutDir = TERN_(INVERT_Z_DIR, -)(-effectorBackoutDir);
break;
#endif
#ifdef I_MICROSTEPS
case I_AXIS:
phasePerUStep = PHASE_PER_MICROSTEP(I);
phaseCurrent = stepperI.get_microstep_counter();
effectorBackoutDir = -I_HOME_DIR;
stepperBackoutDir = IF_DISABLED(INVERT_I_DIR, -)effectorBackoutDir;
effectorBackoutDir = -(I_HOME_DIR);
stepperBackoutDir = TERN_(INVERT_I_DIR, -)(-effectorBackoutDir);
break;
#endif
#ifdef J_MICROSTEPS
case J_AXIS:
phasePerUStep = PHASE_PER_MICROSTEP(J);
phaseCurrent = stepperJ.get_microstep_counter();
effectorBackoutDir = -J_HOME_DIR;
stepperBackoutDir = IF_DISABLED(INVERT_J_DIR, -)effectorBackoutDir;
effectorBackoutDir = -(J_HOME_DIR);
stepperBackoutDir = TERN_(INVERT_J_DIR, -)(-effectorBackoutDir);
break;
#endif
#ifdef K_MICROSTEPS
case K_AXIS:
phasePerUStep = PHASE_PER_MICROSTEP(K);
phaseCurrent = stepperK.get_microstep_counter();
effectorBackoutDir = -K_HOME_DIR;
stepperBackoutDir = IF_DISABLED(INVERT_K_DIR, -)effectorBackoutDir;
effectorBackoutDir = -(K_HOME_DIR);
stepperBackoutDir = TERN_(INVERT_K_DIR, -)(-effectorBackoutDir);
break;
#endif
#ifdef U_MICROSTEPS
case U_AXIS:
phasePerUStep = PHASE_PER_MICROSTEP(U);
phaseCurrent = stepperU.get_microstep_counter();
effectorBackoutDir = -U_HOME_DIR;
stepperBackoutDir = IF_DISABLED(INVERT_U_DIR, -)effectorBackoutDir;
effectorBackoutDir = -(U_HOME_DIR);
stepperBackoutDir = TERN_(INVERT_U_DIR, -)(-effectorBackoutDir);
break;
#endif
#ifdef V_MICROSTEPS
case V_AXIS:
phasePerUStep = PHASE_PER_MICROSTEP(V);
phaseCurrent = stepperV.get_microstep_counter();
effectorBackoutDir = -V_HOME_DIR;
stepperBackoutDir = IF_DISABLED(INVERT_V_DIR, -)effectorBackoutDir;
effectorBackoutDir = -(V_HOME_DIR);
stepperBackoutDir = TERN_(INVERT_V_DIR, -)(-effectorBackoutDir);
break;
#endif
#ifdef W_MICROSTEPS
case W_AXIS:
phasePerUStep = PHASE_PER_MICROSTEP(W);
phaseCurrent = stepperW.get_microstep_counter();
effectorBackoutDir = -W_HOME_DIR;
stepperBackoutDir = IF_DISABLED(INVERT_W_DIR, -)effectorBackoutDir;
effectorBackoutDir = -(W_HOME_DIR);
stepperBackoutDir = TERN_(INVERT_W_DIR, -)(-effectorBackoutDir);
break;
#endif
default: return;
Expand Down
Loading

0 comments on commit 4494f7c

Please sign in to comment.