Skip to content

Commit fa48fbb

Browse files
committed
Merge bugfix-2.0.x into 2.0.x
2 parents d6e767e + 8b2d55e commit fa48fbb

File tree

742 files changed

+4107
-3222
lines changed

Some content is hidden

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

742 files changed

+4107
-3222
lines changed

.github/workflows/test-builds.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,31 @@ jobs:
2929
- DUE
3030
- esp32
3131
- linux_native
32-
- megaatmega2560
32+
- mega2560
3333
- teensy31
3434
- teensy35
3535
- SAMD51_grandcentral_m4
3636

3737
# Extended AVR Environments
3838

3939
- FYSETC_F6_13
40-
- megaatmega1280
40+
- mega1280
4141
- rambo
42-
- sanguino_atmega1284p
43-
- sanguino_atmega644p
42+
- sanguino1284p
43+
- sanguino644p
4444

4545
# Extended STM32 Environments
4646

47-
- STM32F103RC_bigtree
48-
- STM32F103RC_bigtree_USB
49-
- STM32F103RE_bigtree
50-
- STM32F103RE_bigtree_USB
47+
- STM32F103RC_btt
48+
- STM32F103RC_btt_USB
49+
- STM32F103RE_btt
50+
- STM32F103RE_btt_USB
5151
- STM32F103RC_fysetc
5252
- jgaurora_a5s_a1
5353
- STM32F103VE_longer
5454
- STM32F407VE_black
5555
- BIGTREE_SKR_PRO
56+
- BIGTREE_GTR_V1_0
5657
- mks_robin
5758
- ARMED
5859
- FYSETC_S6

Marlin/Configuration.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* Advanced settings can be found in Configuration_adv.h
3737
*
3838
*/
39-
#define CONFIGURATION_H_VERSION 020004
39+
#define CONFIGURATION_H_VERSION 020005
4040

4141
//===========================================================================
4242
//============================= Getting Started =============================
@@ -925,6 +925,14 @@
925925
#define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin
926926
#endif
927927

928+
/**
929+
* Use StallGuard2 to probe the bed with the nozzle.
930+
* Requires stallGuard-capable Trinamic stepper drivers.
931+
* CAUTION: This can damage machines with Z lead screws.
932+
* Take extreme care when setting up this feature.
933+
*/
934+
//#define SENSORLESS_PROBING
935+
928936
//
929937
// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
930938
//

Marlin/Configuration_adv.h

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* Basic settings can be found in Configuration.h
3232
*
3333
*/
34-
#define CONFIGURATION_ADV_H_VERSION 020004
34+
#define CONFIGURATION_ADV_H_VERSION 020005
3535

3636
// @section temperature
3737

@@ -276,8 +276,10 @@
276276
#define AUTOTEMP_OLDWEIGHT 0.98
277277
#endif
278278

279-
// Show extra position information with 'M114 D'
280-
//#define M114_DETAIL
279+
// Extra options for the M114 "Current Position" report
280+
//#define M114_DETAIL // Use 'M114` for details to check planner calculations
281+
//#define M114_REALTIME // Real current position based on forward kinematics
282+
//#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed.
281283

282284
// Show Temperature ADC value
283285
// Enable for M105 to include ADC values read from temperature sensors.
@@ -716,6 +718,9 @@
716718
#define Z_STEPPER_ALIGN_ITERATIONS 5 // Number of iterations to apply during alignment
717719
#define Z_STEPPER_ALIGN_ACC 0.02 // Stop iterating early if the accuracy is better than this
718720
#define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done?
721+
// After G34, re-home Z (G28 Z) or just calculate it from the last probe heights?
722+
// Re-homing might be more precise in reproducing the actual 'G28 Z' homing height, especially on an uneven bed.
723+
#define HOME_AFTER_G34
719724
#endif
720725

721726
// @section motion
@@ -990,6 +995,10 @@
990995
// Show the E position (filament used) during printing
991996
//#define LCD_SHOW_E_TOTAL
992997

998+
#if ENABLED(SHOW_BOOTSCREEN)
999+
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
1000+
#endif
1001+
9931002
#if HAS_GRAPHICAL_LCD && HAS_PRINT_PROGRESS
9941003
//#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits
9951004
//#define SHOW_REMAINING_TIME // Display estimated time to completion
@@ -1012,12 +1021,9 @@
10121021

10131022
#if ENABLED(SDSUPPORT)
10141023

1015-
// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
1016-
// around this by connecting a push button or single throw switch to the pin defined
1017-
// as SD_DETECT_PIN in your board's pins definitions.
1018-
// This setting should be disabled unless you are using a push button, pulling the pin to ground.
1019-
// Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
1020-
#define SD_DETECT_INVERTED
1024+
// The standard SD detect circuit reads LOW when media is inserted and HIGH when empty.
1025+
// Enable this option and set to HIGH if your SD cards are incorrectly detected.
1026+
//#define SD_DETECT_STATE HIGH
10211027

10221028
#define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
10231029
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
@@ -1039,9 +1045,13 @@
10391045
* during SD printing. If the recovery file is found at boot time, present
10401046
* an option on the LCD screen to continue the print from the last-known
10411047
* point in the file.
1048+
*
1049+
* If the machine reboots when resuming a print you may need to replace or
1050+
* reformat the SD card. (Bad sectors delay startup triggering the watchdog.)
10421051
*/
10431052
//#define POWER_LOSS_RECOVERY
10441053
#if ENABLED(POWER_LOSS_RECOVERY)
1054+
#define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
10451055
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
10461056
//#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
10471057
//#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
@@ -1221,10 +1231,6 @@
12211231
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
12221232
//#define USE_SMALL_INFOFONT
12231233

1224-
// Enable this option and reduce the value to optimize screen updates.
1225-
// The normal delay is 10µs. Use the lowest value that still gives a reliable display.
1226-
//#define DOGM_SPI_DELAY_US 5
1227-
12281234
// Swap the CW/CCW indicators in the graphics overlay
12291235
//#define OVERLAY_GFX_REVERSE
12301236

@@ -1241,6 +1247,10 @@
12411247
* This will prevent position updates from being displayed.
12421248
*/
12431249
#if ENABLED(U8GLIB_ST7920)
1250+
// Enable this option and reduce the value to optimize screen updates.
1251+
// The normal delay is 10µs. Use the lowest value that still gives a reliable display.
1252+
//#define DOGM_SPI_DELAY_US 5
1253+
12441254
//#define LIGHTWEIGHT_UI
12451255
#if ENABLED(LIGHTWEIGHT_UI)
12461256
#define STATUS_EXPIRE_SECONDS 20
@@ -1278,24 +1288,23 @@
12781288
// Additional options for DGUS / DWIN displays
12791289
//
12801290
#if HAS_DGUS_LCD
1281-
#define DGUS_SERIAL_PORT 2
1291+
#define DGUS_SERIAL_PORT 3
12821292
#define DGUS_BAUDRATE 115200
12831293

12841294
#define DGUS_RX_BUFFER_SIZE 128
12851295
#define DGUS_TX_BUFFER_SIZE 48
12861296
//#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS // Fix Rx overrun situation (Currently only for AVR)
12871297

12881298
#define DGUS_UPDATE_INTERVAL_MS 500 // (ms) Interval between automatic screen updates
1289-
#define BOOTSCREEN_TIMEOUT 3000 // (ms) Duration to display the boot screen
12901299

12911300
#if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
12921301
#define DGUS_PRINT_FILENAME // Display the filename during printing
12931302
#define DGUS_PREHEAT_UI // Display a preheat screen during heatup
12941303

12951304
#if ENABLED(DGUS_LCD_UI_FYSETC)
1296-
//#define DUGS_UI_MOVE_DIS_OPTION // Disabled by default for UI_FYSETC
1305+
//#define DGUS_UI_MOVE_DIS_OPTION // Disabled by default for UI_FYSETC
12971306
#else
1298-
#define DUGS_UI_MOVE_DIS_OPTION // Enabled by default for UI_HIPRECY
1307+
#define DGUS_UI_MOVE_DIS_OPTION // Enabled by default for UI_HIPRECY
12991308
#endif
13001309

13011310
#define DGUS_FILAMENT_LOADUNLOAD
@@ -1578,7 +1587,7 @@
15781587
#if ENABLED(PROBE_TEMP_COMPENSATION)
15791588
// Max temperature that can be reached by heated bed.
15801589
// This is required only for the calibration process.
1581-
#define PTC_MAX_BED_TEMP 110
1590+
#define PTC_MAX_BED_TEMP BED_MAXTEMP
15821591

15831592
// Park position to wait for probe cooldown
15841593
#define PTC_PARK_POS_X 0.0F
@@ -2015,7 +2024,7 @@
20152024
* TMCStepper library is required to use TMC stepper drivers.
20162025
* https://github.com/teemuatlut/TMCStepper
20172026
*/
2018-
#if HAS_TRINAMIC
2027+
#if HAS_TRINAMIC_CONFIG
20192028

20202029
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
20212030
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
@@ -2302,14 +2311,6 @@
23022311
*/
23032312
//#define SENSORLESS_HOMING // StallGuard capable drivers only
23042313

2305-
/**
2306-
* Use StallGuard2 to probe the bed with the nozzle.
2307-
*
2308-
* CAUTION: This could cause damage to machines that use a lead screw or threaded rod
2309-
* to move the Z axis. Take extreme care when attempting to enable this feature.
2310-
*/
2311-
//#define SENSORLESS_PROBING // StallGuard capable drivers only
2312-
23132314
#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
23142315
// TMC2209: 0...255. TMC2130: -64...63
23152316
#define X_STALL_SENSITIVITY 8
@@ -2345,7 +2346,7 @@
23452346
*/
23462347
#define TMC_ADV() { }
23472348

2348-
#endif // HAS_TRINAMIC
2349+
#endif // HAS_TRINAMIC_CONFIG
23492350

23502351
// @section L64XX
23512352

@@ -2991,7 +2992,7 @@
29912992
#define MAX7219_LOAD_PIN 44
29922993

29932994
//#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
2994-
#define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
2995+
#define MAX7219_INIT_TEST 2 // Test pattern at startup: 0=none, 1=sweep, 2=spiral
29952996
#define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
29962997
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
29972998
// connector at: right=0 bottom=-90 top=90 left=180
File renamed without changes.
File renamed without changes.

Marlin/src/HAL/HAL_AVR/HAL_SPI.cpp renamed to Marlin/src/HAL/AVR/HAL_SPI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void spiBegin() {
197197
// output pin high - like sending 0xFF
198198
WRITE(MOSI_PIN, HIGH);
199199

200-
for (uint8_t i = 0; i < 8; i++) {
200+
LOOP_L_N(i, 8) {
201201
WRITE(SCK_PIN, HIGH);
202202

203203
nop; // adjust so SCK is nice
@@ -224,7 +224,7 @@ void spiBegin() {
224224
void spiSend(uint8_t data) {
225225
// no interrupts during byte send - about 8µs
226226
cli();
227-
for (uint8_t i = 0; i < 8; i++) {
227+
LOOP_L_N(i, 8) {
228228
WRITE(SCK_PIN, LOW);
229229
WRITE(MOSI_PIN, data & 0x80);
230230
data <<= 1;

Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp renamed to Marlin/src/HAL/AVR/MarlinSerial.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
// A SW memory barrier, to ensure GCC does not overoptimize loops
5656
#define sw_barrier() asm volatile("": : :"memory");
5757

58-
#include "../../feature/emergency_parser.h"
58+
#include "../../feature/e_parser.h"
5959

6060
// "Atomically" read the RX head index value without disabling interrupts:
6161
// This MUST be called with RX interrupts enabled, and CAN'T be called
@@ -682,7 +682,7 @@
682682

683683
// Round correctly so that print(1.999, 2) prints as "2.00"
684684
double rounding = 0.5;
685-
for (uint8_t i = 0; i < digits; ++i) rounding *= 0.1;
685+
LOOP_L_N(i, digits) rounding *= 0.1;
686686
number += rounding;
687687

688688
// Extract the integer part of the number and print it

Marlin/src/HAL/HAL_AVR/MarlinSerial.h renamed to Marlin/src/HAL/AVR/MarlinSerial.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
* Templatized 01 October 2018 by Eduardo José Tagle to allow multiple instances
3232
*/
3333

34-
#include "../shared/MarlinSerial.h"
35-
3634
#include <WString.h>
3735

36+
#include "../../inc/MarlinConfigPre.h"
37+
3838
#ifndef SERIAL_PORT
3939
#define SERIAL_PORT 0
4040
#endif
@@ -261,12 +261,12 @@
261261
static constexpr int PORT = serial;
262262
static constexpr unsigned int RX_SIZE = RX_BUFFER_SIZE;
263263
static constexpr unsigned int TX_SIZE = TX_BUFFER_SIZE;
264-
static constexpr bool XONOFF = bSERIAL_XON_XOFF;
265-
static constexpr bool EMERGENCYPARSER = bEMERGENCY_PARSER;
266-
static constexpr bool DROPPED_RX = bSERIAL_STATS_DROPPED_RX;
267-
static constexpr bool RX_OVERRUNS = bSERIAL_STATS_RX_BUFFER_OVERRUNS;
268-
static constexpr bool RX_FRAMING_ERRORS = bSERIAL_STATS_RX_FRAMING_ERRORS;
269-
static constexpr bool MAX_RX_QUEUED = bSERIAL_STATS_MAX_RX_QUEUED;
264+
static constexpr bool XONOFF = ENABLED(SERIAL_XON_XOFF);
265+
static constexpr bool EMERGENCYPARSER = ENABLED(EMERGENCY_PARSER);
266+
static constexpr bool DROPPED_RX = ENABLED(SERIAL_STATS_DROPPED_RX);
267+
static constexpr bool RX_OVERRUNS = ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS);
268+
static constexpr bool RX_FRAMING_ERRORS = ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS);
269+
static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED);
270270
};
271271
extern MarlinSerial<MarlinSerialCfg<SERIAL_PORT>> customizedSerial1;
272272

@@ -304,7 +304,7 @@
304304
static constexpr bool XONOFF = false;
305305
static constexpr bool EMERGENCYPARSER = false;
306306
static constexpr bool DROPPED_RX = false;
307-
static constexpr bool RX_OVERRUNS = bDGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS;
307+
static constexpr bool RX_OVERRUNS = HAS_DGUS_LCD && ENABLED(DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS);
308308
static constexpr bool RX_FRAMING_ERRORS = false;
309309
static constexpr bool MAX_RX_QUEUED = false;
310310
};
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)