Skip to content

Commit

Permalink
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ansonl authored Aug 4, 2023
2 parents 8d23b0f + 4e31fa6 commit ed78ff5
Show file tree
Hide file tree
Showing 341 changed files with 37,136 additions and 6,017 deletions.
28 changes: 27 additions & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1751,6 +1751,21 @@
//#define V_HOME_DIR -1
//#define W_HOME_DIR -1

/**
* Safety Stops
* If an axis has endstops on both ends the one specified above is used for
* homing, while the other can be used for things like SD_ABORT_ON_ENDSTOP_HIT.
*/
//#define X_SAFETY_STOP
//#define Y_SAFETY_STOP
//#define Z_SAFETY_STOP
//#define I_SAFETY_STOP
//#define J_SAFETY_STOP
//#define K_SAFETY_STOP
//#define U_SAFETY_STOP
//#define V_SAFETY_STOP
//#define W_SAFETY_STOP

// @section geometry

// The size of the printable area
Expand Down Expand Up @@ -3108,7 +3123,7 @@
* - Download https://github.com/InsanityAutomation/Marlin/raw/CrealityDwin_2.0/TM3D_Combined480272_Landscape_V7.7z
* - Copy the downloaded DWIN_SET folder to the SD card.
*
* E3S1PRO (T5UID1)
* E3S1PRO (T5L)
* - Download https://github.com/CrealityOfficial/Ender-3S1/archive/3S1_Plus_Screen.zip
* - Copy the downloaded DWIN_SET folder to the SD card.
*
Expand Down Expand Up @@ -3303,7 +3318,18 @@
*/
#define TFT_FONT NOTOSANS

/**
* TFT Theme for Color_UI. Choose one of the following or add a new one to 'Marlin/src/lcd/tft/themes' directory
*
* BLUE_MARLIN - Default theme with 'midnight blue' background
* BLACK_MARLIN - Theme with 'black' background
* ANET_BLACK - Theme used for Anet ET4/5
*/
#define TFT_THEME BLACK_MARLIN

//#define TFT_SHARED_IO // I/O is shared between TFT display and other devices. Disable async data transfer.

#define COMPACT_MARLIN_BOOT_LOGO // Use compressed data to save Flash space
#endif

#if ENABLED(TFT_LVGL_UI)
Expand Down
17 changes: 11 additions & 6 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,10 @@
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames

// Only one STATUS_HEAT_* option can be enabled
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
//#define STATUS_HEAT_POWER // Show heater output power as a vertical bar

// Frivolous Game Options
//#define MARLIN_BRICKOUT
Expand Down Expand Up @@ -2206,7 +2209,6 @@
*/
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
//#define INTEGRATED_BABYSTEPPING // Integration of babystepping into the Stepper ISR
//#define EP_BABYSTEPPING // M293/M294 babystepping with EMERGENCY_PARSER support
//#define BABYSTEP_WITHOUT_HOMING
//#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement)
Expand Down Expand Up @@ -3836,14 +3838,17 @@
//#define REPETIER_GCODE_M360 // Add commands originally from Repetier FW

/**
* Enable this option for a leaner build of Marlin that removes all
* workspace offsets, simplifying coordinate transformations, leveling, etc.
*
* - M206 and M428 are disabled.
* - G92 will revert to its behavior from Marlin 1.0.
* Enable this option for a leaner build of Marlin that removes
* workspace offsets to slightly optimize performance.
* G92 will revert to its behavior from Marlin 1.0.
*/
//#define NO_WORKSPACE_OFFSETS

/**
* Disable M206 and M428 if you don't need home offsets.
*/
//#define NO_HOME_OFFSETS

/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2023-07-06"
//#define STRING_DISTRIBUTION_DATE "2023-08-04"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
27 changes: 22 additions & 5 deletions Marlin/src/HAL/AVR/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,40 @@ void save_reset_reason() {
wdt_disable();
}

#include "registers.h"

MarlinHAL::MarlinHAL() {
TERN_(HAL_AVR_DIRTY_INIT, _ATmega_resetperipherals()); // Clean-wipe the device state.
}

void MarlinHAL::init() {
// Init Servo Pins
#define INIT_SERVO(N) OUT_WRITE(SERVO##N##_PIN, LOW)
#if HAS_SERVO_0
INIT_SERVO(0);
OUT_WRITE(SERVO0_PIN, LOW);
#endif
#if HAS_SERVO_1
INIT_SERVO(1);
OUT_WRITE(SERVO1_PIN, LOW);
#endif
#if HAS_SERVO_2
INIT_SERVO(2);
OUT_WRITE(SERVO2_PIN, LOW);
#endif
#if HAS_SERVO_3
INIT_SERVO(3);
OUT_WRITE(SERVO3_PIN, LOW);
#endif

init_pwm_timers(); // Init user timers to default frequency - 1000HZ

#if PIN_EXISTS(BEEPER) && ENABLED(HAL_AVR_DIRTY_INIT) && DISABLED(ATMEGA_NO_BEEPFIX)
// Make sure no alternative is locked onto the BEEPER.
// This fixes the issue where the ATmega is constantly beeping.
// Might disable other peripherals using the pin; to circumvent that please undefine one of the above things!
// The true culprit is the AVR ArduinoCore that enables peripherals redundantly.
// (USART1 on the GeeeTech GT2560)
// https://www.youtube.com/watch?v=jMgCvRXkexk
_ATmega_savePinAlternate(BEEPER_PIN);

OUT_WRITE(BEEPER_PIN, LOW);
#endif
}

void MarlinHAL::reboot() {
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/AVR/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class MarlinHAL {
public:

// Earliest possible init, before setup()
MarlinHAL() {}
MarlinHAL();

// Watchdog
static void watchdog_init() IF_DISABLED(USE_WATCHDOG, {});
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/AVR/endstop_interrupts.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void setup_endstop_interrupts() {
pciSetup(Z_MAX_PIN);
#endif
#endif
#if HAS_Z_MIN_PIN
#if USE_Z_MIN
#if (digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT)
_ATTACH(Z_MIN_PIN);
#else
Expand Down
14 changes: 7 additions & 7 deletions Marlin/src/HAL/AVR/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
* Check for common serial pin conflicts
*/
#define CHECK_SERIAL_PIN(N) ( \
X_STOP_PIN == N || Y_STOP_PIN == N || Z_STOP_PIN == N \
|| X_MIN_PIN == N || Y_MIN_PIN == N || Z_MIN_PIN == N \
|| X_MAX_PIN == N || Y_MAX_PIN == N || Z_MAX_PIN == N \
|| X_STEP_PIN == N || Y_STEP_PIN == N || Z_STEP_PIN == N \
|| X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
|| BTN_EN1 == N || BTN_EN2 == N \
X_STOP_PIN == N || Y_STOP_PIN == N || Z_STOP_PIN == N \
|| X_MIN_PIN == N || Y_MIN_PIN == N || Z_MIN_PIN == N \
|| X_MAX_PIN == N || Y_MAX_PIN == N || Z_MAX_PIN == N \
|| X_STEP_PIN == N || Y_STEP_PIN == N || Z_STEP_PIN == N \
|| X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
|| BTN_EN1 == N || BTN_EN2 == N || LCD_PINS_EN == N \
)
#if SERIAL_IN_USE(0)
// D0-D1. No known conflicts.
Expand Down
Loading

0 comments on commit ed78ff5

Please sign in to comment.