Skip to content

Commit 88e349f

Browse files
committed
Merge branch 'bugfix-2.1.x' into bugfix-2.1.x
2 parents 6ea123f + 81976c4 commit 88e349f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3553
-1043
lines changed

Marlin/Configuration.h

Lines changed: 89 additions & 89 deletions
Large diffs are not rendered by default.

Marlin/Configuration_adv.h

Lines changed: 64 additions & 64 deletions
Large diffs are not rendered by default.

Marlin/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 "2022-10-16"
44+
//#define STRING_DISTRIBUTION_DATE "2022-10-18"
4545

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

Marlin/_Bootscreen.h

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4+
*
5+
* Based on Sprinter and grbl.
6+
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
#pragma once
23+
24+
/**
25+
* Custom Boot Screen bitmap
26+
*
27+
* Place this file in the root with your configuration files
28+
* and enable SHOW_CUSTOM_BOOTSCREEN in Configuration.h.
29+
*
30+
* Use the Marlin Bitmap Converter to make your own:
31+
* https://marlinfw.org/tools/u8glib/converter.html
32+
*/
33+
34+
#define CUSTOM_BOOTSCREEN_TIMEOUT 1000
35+
#define CUSTOM_BOOTSCREEN_BMPWIDTH 81
36+
#define CUSTOM_BOOTSCREEN_INVERTED
37+
38+
const unsigned char custom_start_bmp[] PROGMEM = {
39+
B11111111,B11111111,B11111111,B11111111,B11101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
40+
B11111111,B11111111,B11111111,B11111111,B11101111,B11101111,B11111111,B11111111,B11111111,B11111111,B11111111,
41+
B11111111,B11111111,B11111111,B11111111,B11100111,B11011111,B11111111,B11111111,B11111111,B11111111,B11111111,
42+
B11111111,B11111111,B11111111,B11111111,B11100111,B11011111,B11111111,B11111111,B11111111,B11111111,B11111111,
43+
B11111111,B11111111,B11111111,B11111111,B11100011,B11011111,B11111111,B11111111,B11111111,B11111111,B11111111,
44+
B11111111,B11111111,B11111111,B11111111,B11110011,B11001111,B11111111,B11111111,B11111111,B11111111,B11111111,
45+
B11111111,B11111111,B11111111,B11100001,B11100001,B11001111,B11111111,B11111111,B11111111,B11111111,B11111111,
46+
B11111111,B11111110,B01111000,B00000000,B00000000,B00000011,B11011101,B11111111,B11111111,B11111111,B11111111,
47+
B11111110,B11111111,B10000000,B01111110,B00000000,B00000001,B11101110,B11111111,B11111111,B11111111,B11111111,
48+
B11111110,B01111101,B11001111,B11111100,B00000000,B00000000,B11110111,B01111111,B11111111,B11111111,B11111111,
49+
B11111111,B10001110,B00000110,B00000000,B00000000,B00000000,B01111011,B10111111,B11111111,B11111111,B11111111,
50+
B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111101,B11011111,B11111111,B11111111,B11111111,
51+
B11111111,B11111100,B00000001,B11111110,B00000000,B00000000,B00111110,B11100111,B11111111,B11111111,B11111111,
52+
B11111111,B11111111,B11111111,B11111100,B00000000,B00000011,B00011111,B01110011,B11111111,B11111111,B11111111,
53+
B11111111,B11111111,B11111111,B11111000,B00000000,B00000001,B10001111,B10000001,B11111111,B11111111,B11111111,
54+
B11111111,B11111111,B11111111,B11100000,B00000000,B00000000,B10000011,B11111001,B11111111,B11111111,B11111111,
55+
B11111111,B11111111,B11111111,B00000000,B11111100,B00000000,B00000000,B11110000,B11111111,B11111111,B11111111,
56+
B11111111,B11111111,B11100000,B00001111,B11111111,B11000000,B00000000,B00000000,B11111111,B11111111,B11111111,
57+
B11111111,B11111110,B00000011,B11111111,B11111111,B11000000,B00000000,B00000000,B11111111,B11111111,B11111111,
58+
B11111111,B11111111,B11111111,B11111111,B11111001,B00000000,B00000000,B00000000,B11111111,B11111111,B11111111,
59+
B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00000111,B11000000,B11111111,B11111111,B11111111,
60+
B11111111,B11111111,B11111111,B11111111,B11111111,B00000000,B00000111,B11100000,B11111111,B11111111,B11111111,
61+
B11111111,B11111111,B11111111,B11111111,B11111111,B11100000,B00000111,B11110001,B11111111,B11111111,B11111111,
62+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000111,B11111001,B11111111,B11111111,B11111111,
63+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B00000011,B11111001,B11111111,B11111111,B11111111,
64+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000011,B11111001,B11111111,B11111111,B11111111,
65+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11000011,B11111111,B11111111,B11111111,B11111111,
66+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11100001,B11111111,B11111111,B11111111,B11111111,
67+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,B10111111,B11111111,B11111111,B11111111,
68+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111011,B11111000,B00111111,B11111111,B11111111,B11111111,
69+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111001,B11111000,B00111111,B11111111,B11111111,B11111111,
70+
B11111111,B11111111,B11111111,B11111111,B11111111,B01111110,B11110000,B11111111,B11111111,B11111111,B11111111,
71+
B11111111,B11111111,B11111111,B11111111,B11111111,B10001110,B00000011,B11111111,B11111111,B11111111,B11111111,
72+
B11111111,B11111111,B11111111,B11111111,B11111111,B11100000,B00011111,B11111111,B11111111,B11111111,B11111111,
73+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
74+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
75+
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01111111,B11111111,B11111111,B11111111,
76+
B11111111,B00000000,B00000000,B01111111,B11111111,B11111111,B11111000,B01111111,B11111111,B11111111,B11111111,
77+
B11111111,B10000000,B00000000,B01111111,B11111111,B11111111,B11100000,B01111111,B11111111,B11111111,B11111111,
78+
B11111111,B11000011,B11111100,B11111111,B11111111,B11111111,B11111000,B11111111,B11111111,B11111111,B11111111,
79+
B11111111,B11000011,B11111100,B11111111,B11111111,B11111111,B11111000,B11111111,B11111111,B11111111,B11111111,
80+
B11111111,B10000111,B11111101,B11111111,B11111111,B11111111,B11110001,B11111111,B11111111,B11111111,B11111111,
81+
B11111111,B10000111,B11111111,B11111111,B11111111,B11111111,B11110001,B11111111,B11111111,B11111111,B11111111,
82+
B11111111,B00001111,B11100111,B11110011,B00001111,B11111100,B00100011,B11111100,B00111111,B11111111,B11111111,
83+
B11111111,B00001111,B11101111,B10000000,B00000111,B11110000,B00000011,B11110000,B00011110,B00000000,B01111111,
84+
B11111110,B00011111,B11001111,B10000001,B10000111,B11000111,B10000111,B11000111,B00001100,B00000000,B01111111,
85+
B11111110,B00000000,B00011111,B11000111,B11000111,B10001111,B11000111,B10011111,B00001111,B00001100,B11111111,
86+
B11111110,B00000000,B00011111,B10000111,B10001111,B00011111,B10001111,B00011111,B00001111,B00011111,B11111111,
87+
B11111100,B00111111,B10011111,B10001111,B10001111,B00011111,B10001110,B00000000,B00011110,B00111111,B11111111,
88+
B11111100,B01111111,B00111111,B00001111,B00011110,B00111111,B00011110,B00111111,B11111110,B00111111,B11111111,
89+
B11111000,B01111111,B11111111,B00011111,B00011100,B00111111,B00011100,B01111111,B11111100,B01111111,B11111111,
90+
B11111000,B11111111,B11111111,B00011110,B00011100,B01111110,B00011100,B01111111,B11111100,B01111111,B11111111,
91+
B11110000,B11111111,B11001110,B00111110,B00111100,B01111110,B00111100,B01111111,B10111000,B11111111,B11111111,
92+
B11110000,B11111111,B10011110,B00111100,B00111000,B01111100,B00111000,B01111110,B01111000,B11111111,B11111111,
93+
B11100001,B11111111,B00111100,B01111100,B01111000,B01111100,B01111000,B00111100,B11110001,B11111111,B11111111,
94+
B11100001,B11111000,B00111000,B01111000,B01111000,B00010000,B00011000,B00000001,B11110001,B11111111,B11111111,
95+
B00000000,B00000000,B01100000,B00100000,B00111100,B00000000,B01111100,B00000111,B10000000,B01111111,B11111111,
96+
B11111111,B11111111,B11111111,B11111111,B11111110,B00011111,B11111110,B00011111,B11111111,B11111111,B11111111
97+
};

Marlin/_Statusscreen.h

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4+
*
5+
* Based on Sprinter and grbl.
6+
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
#pragma once
23+
24+
/**
25+
* Custom Status Screen bitmap
26+
*
27+
* Place this file in the root with your configuration files
28+
* and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h.
29+
*
30+
* Use the Marlin Bitmap Converter to make your own:
31+
* https://marlinfw.org/tools/u8glib/converter.html
32+
*/
33+
34+
//
35+
// Status Screen Logo bitmap
36+
//
37+
#define STATUS_LOGO_Y 8
38+
#define STATUS_LOGO_WIDTH 39
39+
40+
const unsigned char status_logo_bmp[] PROGMEM = {
41+
B11111000,B00000001,B10000000,B00000000,B00001100,
42+
B01001000,B00000000,B10000000,B00000000,B00010010,
43+
B01000011,B11000011,B10001100,B11010000,B00000010,
44+
B01110001,B00100100,B10010010,B01100111,B11001100,
45+
B01000001,B00100100,B10011110,B01000000,B00000010,
46+
B01001001,B00100100,B10010000,B01000000,B00010010,
47+
B11111011,B10110011,B11001110,B11100000,B00001100
48+
};
49+
50+
//
51+
// Use default bitmaps
52+
//
53+
#define STATUS_HOTEND_ANIM
54+
#define STATUS_BED_ANIM
55+
#define STATUS_HEATERS_XSPACE 20
56+
#if HOTENDS < 2
57+
#define STATUS_HEATERS_X 48
58+
#define STATUS_BED_X 72
59+
#else
60+
#define STATUS_HEATERS_X 40
61+
#define STATUS_BED_X 80
62+
#endif

Marlin/src/HAL/AVR/fastio.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@ enum ClockSource2 : uint8_t {
293293

294294
#if HAS_MOTOR_CURRENT_PWM
295295
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
296-
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z || P == MOTOR_CURRENT_PWM_XY)
296+
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0 || P == MOTOR_CURRENT_PWM_E1 || P == MOTOR_CURRENT_PWM_Z || P == MOTOR_CURRENT_PWM_XY)
297297
#elif PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
298-
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_Z)
298+
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0 || P == MOTOR_CURRENT_PWM_E1 || P == MOTOR_CURRENT_PWM_Z)
299299
#else
300-
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E)
300+
#define PWM_CHK_MOTOR_CURRENT(P) (P == MOTOR_CURRENT_PWM_E || P == MOTOR_CURRENT_PWM_E0 || P == MOTOR_CURRENT_PWM_E1)
301301
#endif
302302
#else
303303
#define PWM_CHK_MOTOR_CURRENT(P) false

Marlin/src/HAL/AVR/inc/SanityCheck.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@
3737
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
3838
|| BTN_EN1 == N || BTN_EN2 == N \
3939
)
40-
#if CONF_SERIAL_IS(0)
40+
#if SERIAL_IN_USE(0)
4141
// D0-D1. No known conflicts.
4242
#endif
4343
#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__)
44-
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
44+
#if SERIAL_IN_USE(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
4545
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
4646
#endif
4747
#else
48-
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(10) || CHECK_SERIAL_PIN(11))
48+
#if SERIAL_IN_USE(1) && (CHECK_SERIAL_PIN(10) || CHECK_SERIAL_PIN(11))
4949
#error "Serial Port 1 pin D10 and/or D11 conflicts with another pin on the board."
5050
#endif
5151
#endif
52-
#if CONF_SERIAL_IS(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
52+
#if SERIAL_IN_USE(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
5353
#error "Serial Port 2 pin D16 and/or D17 conflicts with another pin on the board."
5454
#endif
55-
#if CONF_SERIAL_IS(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15))
55+
#if SERIAL_IN_USE(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15))
5656
#error "Serial Port 3 pin D14 and/or D15 conflicts with another pin on the board."
5757
#endif
5858
#undef CHECK_SERIAL_PIN

Marlin/src/HAL/DUE/inc/SanityCheck.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
|| X_DIR_PIN == N || Y_DIR_PIN == N || Z_DIR_PIN == N \
3737
|| X_ENA_PIN == N || Y_ENA_PIN == N || Z_ENA_PIN == N \
3838
)
39-
#if CONF_SERIAL_IS(0) // D0-D1. No known conflicts.
39+
#if SERIAL_IN_USE(0) // D0-D1. No known conflicts.
4040
#endif
41-
#if CONF_SERIAL_IS(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
41+
#if SERIAL_IN_USE(1) && (CHECK_SERIAL_PIN(18) || CHECK_SERIAL_PIN(19))
4242
#error "Serial Port 1 pin D18 and/or D19 conflicts with another pin on the board."
4343
#endif
44-
#if CONF_SERIAL_IS(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
44+
#if SERIAL_IN_USE(2) && (CHECK_SERIAL_PIN(16) || CHECK_SERIAL_PIN(17))
4545
#error "Serial Port 2 pin D16 and/or D17 conflicts with another pin on the board."
4646
#endif
47-
#if CONF_SERIAL_IS(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15))
47+
#if SERIAL_IN_USE(3) && (CHECK_SERIAL_PIN(14) || CHECK_SERIAL_PIN(15))
4848
#error "Serial Port 3 pin D14 and/or D15 conflicts with another pin on the board."
4949
#endif
5050
#undef CHECK_SERIAL_PIN

Marlin/src/HAL/STM32/eeprom_flash.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
static_assert(IS_FLASH_SECTOR(FLASH_SECTOR), "FLASH_SECTOR is invalid");
9696
static_assert(IS_POWER_OF_2(FLASH_UNIT_SIZE), "FLASH_UNIT_SIZE should be a power of 2, please check your chip's spec sheet");
9797

98-
#endif
98+
#endif // FLASH_EEPROM_LEVELING
9999

100100
static bool eeprom_data_written = false;
101101

@@ -189,15 +189,15 @@ bool PersistentStore::access_finish() {
189189

190190
UNLOCK_FLASH();
191191

192-
uint32_t offset = 0;
193-
uint32_t address = SLOT_ADDRESS(current_slot);
194-
uint32_t address_end = address + MARLIN_EEPROM_SIZE;
195-
uint32_t data = 0;
192+
uint32_t offset = 0,
193+
address = SLOT_ADDRESS(current_slot),
194+
address_end = address + MARLIN_EEPROM_SIZE,
195+
data = 0;
196196

197197
bool success = true;
198198

199199
while (address < address_end) {
200-
memcpy(&data, ram_eeprom + offset, sizeof(uint32_t));
200+
memcpy(&data, ram_eeprom + offset, sizeof(data));
201201
status = HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, address, data);
202202
if (status == HAL_OK) {
203203
address += sizeof(uint32_t);
@@ -221,7 +221,8 @@ bool PersistentStore::access_finish() {
221221

222222
return success;
223223

224-
#else
224+
#else !FLASH_EEPROM_LEVELING
225+
225226
// The following was written for the STM32F4 but may work with other MCUs as well.
226227
// Most STM32F4 flash does not allow reading from flash during erase operations.
227228
// This takes about a second on a STM32F407 with a 128kB sector used as EEPROM.
@@ -235,7 +236,8 @@ bool PersistentStore::access_finish() {
235236
TERN_(HAS_PAUSE_SERVO_OUTPUT, RESUME_SERVO_OUTPUT());
236237

237238
eeprom_data_written = false;
238-
#endif
239+
240+
#endif // !FLASH_EEPROM_LEVELING
239241
}
240242

241243
return true;

Marlin/src/core/boards.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@
426426
#define BOARD_OPULO_LUMEN_REV4 4241 // Opulo Lumen PnP Controller REV4 (STM32F407VE / STM32F407VG)
427427
#define BOARD_FYSETC_SPIDER_KING407 4242 // FYSETC Spider King407 (STM32F407ZG)
428428
#define BOARD_MKS_SKIPR_V1 4243 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
429+
#define BOARD_TRONXY_V10 4244 // TRONXY V10 (STM32F446ZE)
429430

430431
//
431432
// ARM Cortex M7

0 commit comments

Comments
 (0)