Skip to content

Commit c2ffe73

Browse files
committed
Merge branch 'bugfix-2.1.x' into mike-config
* bugfix-2.1.x: (51 commits) [cron] Bump distribution date (2023-10-15) ✨ Z_PROBE_ERROR_TOLERANCE (expose) (MarlinFirmware#26229) [cron] Bump distribution date (2023-10-13) 🧑‍💻 IA Creality optional code [cron] Bump distribution date (2023-10-12) 🔧 Misc. probe opts 📝 GCode => G-Code 🧑‍💻 FxdTiCtrl => FTMotion redux 🚸 Update FTDI Eve / CocoaPress UI (MarlinFirmware#26233) 🧑‍💻 FxdTiCtrl => FTMotion 📝 Macro comments [cron] Bump distribution date (2023-10-11) ✨ Nonlinear Extrusion Control (M592) (MarlinFirmware#26127) [cron] Bump distribution date (2023-10-10) 🐛 Fix tool-change E prime (MarlinFirmware#26237) ✨ FYSETC Cheetah v3.0 (MarlinFirmware#26314) 🔧 BTT_MINI_12864_V1 => BTT_MINI_12864 (MarlinFirmware#26160) 🔧 More angles for 2x Servo Switching Nozzle (MarlinFirmware#26303) [cron] Bump distribution date (2023-10-09) 🩹 Patches for MSC SD (MarlinFirmware#26332) ... # Conflicts: # .github/workflows/test-builds.yml
2 parents 3cc1af9 + caca563 commit c2ffe73

File tree

114 files changed

+2904
-1045
lines changed

Some content is hidden

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

114 files changed

+2904
-1045
lines changed

Marlin/Configuration.h

+29-27
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@
248248
#if ENABLED(SWITCHING_NOZZLE)
249249
#define SWITCHING_NOZZLE_SERVO_NR 0
250250
//#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
251-
#define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
251+
#define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // A pair of angles for { E0, E1 }.
252+
// For Dual Servo use two pairs: { { lower, raise }, { lower, raise } }
252253
#define SWITCHING_NOZZLE_SERVO_DWELL 2500 // Dwell time to wait for servo to make physical move
253254
#endif
254255

@@ -669,7 +670,7 @@
669670
//#define MPCTEMP // ** EXPERIMENTAL ** See https://marlinfw.org/docs/features/model_predictive_control.html
670671

671672
#define PID_MAX 255 // Limit hotend current while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
672-
#define PID_K1 0.95 // Smoothing factor within any PID loop
673+
#define PID_K1 0.95 // Smoothing factor within any PID loop
673674

674675
#if ENABLED(PIDTEMP)
675676
//#define PID_DEBUG // Print PID debug data to the serial port. Use 'M303 D' to toggle activation.
@@ -1423,6 +1424,15 @@
14231424
//#define TOUCH_MI_MANUAL_DEPLOY // For manual deploy (LCD menu)
14241425
#endif
14251426

1427+
/**
1428+
* Bed Distance Sensor
1429+
*
1430+
* Measures the distance from bed to nozzle with accuracy of 0.01mm.
1431+
* For information about this sensor https://github.com/markniu/Bed_Distance_sensor
1432+
* Uses I2C port, so it requires I2C library markyue/Panda_SoftMasterI2C.
1433+
*/
1434+
//#define BD_SENSOR
1435+
14261436
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
14271437
//#define SOLENOID_PROBE
14281438

@@ -1628,16 +1638,17 @@
16281638
* Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
16291639
* But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
16301640
*/
1631-
#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
1632-
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
1633-
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
1634-
//#define Z_AFTER_PROBING 5 // Z position after probing is done
1641+
#define Z_CLEARANCE_DEPLOY_PROBE 10 // (mm) Z Clearance for Deploy/Stow
1642+
#define Z_CLEARANCE_BETWEEN_PROBES 5 // (mm) Z Clearance between probe points
1643+
#define Z_CLEARANCE_MULTI_PROBE 5 // (mm) Z Clearance between multiple probes
1644+
#define Z_PROBE_ERROR_TOLERANCE 3 // (mm) Tolerance for early trigger (<= -probe.offset.z + ZPET)
1645+
//#define Z_AFTER_PROBING 5 // (mm) Z position after probing is done
16351646

1636-
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
1647+
#define Z_PROBE_LOW_POINT -2 // (mm) Farthest distance below the trigger-point to go before stopping
16371648

16381649
// For M851 give a range for adjusting the Z probe offset
1639-
#define Z_PROBE_OFFSET_RANGE_MIN -20
1640-
#define Z_PROBE_OFFSET_RANGE_MAX 20
1650+
#define Z_PROBE_OFFSET_RANGE_MIN -20 // (mm)
1651+
#define Z_PROBE_OFFSET_RANGE_MAX 20 // (mm)
16411652

16421653
// Enable the M48 repeatability test to test probe accuracy
16431654
#define Z_MIN_PROBE_REPEATABILITY_TEST
@@ -2001,6 +2012,12 @@
20012012
//#define AUTO_BED_LEVELING_UBL
20022013
//#define MESH_BED_LEVELING
20032014

2015+
/**
2016+
* Commands to execute at the end of G29 probing.
2017+
* Useful to retract or move the Z probe out of the way.
2018+
*/
2019+
//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
2020+
20042021
/**
20052022
* Normally G28 leaves leveling disabled on completion. Enable one of
20062023
* these options to restore the prior leveling state or to always enable
@@ -2018,15 +2035,6 @@
20182035
#define LEVELING_BED_TEMP 50
20192036
#endif
20202037

2021-
/**
2022-
* Bed Distance Sensor
2023-
*
2024-
* Measures the distance from bed to nozzle with accuracy of 0.01mm.
2025-
* For information about this sensor https://github.com/markniu/Bed_Distance_sensor
2026-
* Uses I2C port, so it requires I2C library markyue/Panda_SoftMasterI2C.
2027-
*/
2028-
//#define BD_SENSOR
2029-
20302038
/**
20312039
* Enable detailed logging of G28, G29, M48, etc.
20322040
* Turn on with the command 'M111 S32'.
@@ -2206,12 +2214,6 @@
22062214
#define BED_TRAMMING_LEVELING_ORDER { LF, RF, RB, LB }
22072215
#endif
22082216

2209-
/**
2210-
* Commands to execute at the end of G29 probing.
2211-
* Useful to retract or move the Z probe out of the way.
2212-
*/
2213-
//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
2214-
22152217
// @section homing
22162218

22172219
// The center of the bed is at (X=0, Y=0)
@@ -2992,10 +2994,10 @@
29922994
//#define FYSETC_GENERIC_12864_1_1 // Larger display with basic ON/OFF backlight.
29932995

29942996
//
2995-
// BigTreeTech Mini 12864 V1.0 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight.
2996-
// https://github.com/bigtreetech/MINI-12864/tree/master/mini12864_v1.0
2997+
// BigTreeTech Mini 12864 V1.0 / V2.0 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight.
2998+
// https://github.com/bigtreetech/MINI-12864
29972999
//
2998-
//#define BTT_MINI_12864_V1
3000+
//#define BTT_MINI_12864
29993001

30003002
//
30013003
// Factory display for Creality CR-10 / CR-7 / Ender-3

Marlin/Configuration_adv.h

+45-22
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@
304304
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
305305
*/
306306
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
307-
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
308-
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
307+
#define THERMAL_PROTECTION_PERIOD 40 // (seconds)
308+
#define THERMAL_PROTECTION_HYSTERESIS 4 // (°C)
309309

310310
//#define ADAPTIVE_FAN_SLOWING // Slow down the part-cooling fan if the temperature drops
311311
#if ENABLED(ADAPTIVE_FAN_SLOWING)
@@ -327,50 +327,50 @@
327327
* and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
328328
* below 2.
329329
*/
330-
#define WATCH_TEMP_PERIOD 40 // Seconds
331-
#define WATCH_TEMP_INCREASE 2 // Degrees Celsius
330+
#define WATCH_TEMP_PERIOD 40 // (seconds)
331+
#define WATCH_TEMP_INCREASE 2 // (°C)
332332
#endif
333333

334334
/**
335335
* Thermal Protection parameters for the bed are just as above for hotends.
336336
*/
337337
#if ENABLED(THERMAL_PROTECTION_BED)
338-
#define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
339-
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
338+
#define THERMAL_PROTECTION_BED_PERIOD 20 // (seconds)
339+
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // (°C)
340340

341341
/**
342342
* As described above, except for the bed (M140/M190/M303).
343343
*/
344-
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
345-
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
344+
#define WATCH_BED_TEMP_PERIOD 60 // (seconds)
345+
#define WATCH_BED_TEMP_INCREASE 2 // (°C)
346346
#endif
347347

348348
/**
349349
* Thermal Protection parameters for the heated chamber.
350350
*/
351351
#if ENABLED(THERMAL_PROTECTION_CHAMBER)
352-
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds
353-
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
352+
#define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // (seconds)
353+
#define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // (°C)
354354

355355
/**
356356
* Heated chamber watch settings (M141/M191).
357357
*/
358-
#define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
359-
#define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
358+
#define WATCH_CHAMBER_TEMP_PERIOD 60 // (seconds)
359+
#define WATCH_CHAMBER_TEMP_INCREASE 2 // (°C)
360360
#endif
361361

362362
/**
363363
* Thermal Protection parameters for the laser cooler.
364364
*/
365365
#if ENABLED(THERMAL_PROTECTION_COOLER)
366-
#define THERMAL_PROTECTION_COOLER_PERIOD 10 // Seconds
367-
#define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // Degrees Celsius
366+
#define THERMAL_PROTECTION_COOLER_PERIOD 10 // (seconds)
367+
#define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // (°C)
368368

369369
/**
370370
* Laser cooling watch settings (M143/M193).
371371
*/
372-
#define WATCH_COOLER_TEMP_PERIOD 60 // Seconds
373-
#define WATCH_COOLER_TEMP_INCREASE 3 // Degrees Celsius
372+
#define WATCH_COOLER_TEMP_PERIOD 60 // (seconds)
373+
#define WATCH_COOLER_TEMP_INCREASE 3 // (°C)
374374
#endif
375375

376376
#if ANY(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_BED, THERMAL_PROTECTION_CHAMBER, THERMAL_PROTECTION_COOLER)
@@ -564,6 +564,8 @@
564564
#define TEMP_SENSOR_AD8495_OFFSET 0.0
565565
#define TEMP_SENSOR_AD8495_GAIN 1.0
566566

567+
// @section fans
568+
567569
/**
568570
* Controller Fan
569571
* To cool down the stepper drivers and MOSFETs.
@@ -667,8 +669,6 @@
667669
//#define NUM_REDUNDANT_FANS 1 // Number of sequential fans to synchronize with Fan 0
668670
#endif
669671

670-
// @section extruder
671-
672672
/**
673673
* Extruder cooling fans
674674
*
@@ -745,6 +745,7 @@
745745
#define FANMUX2_PIN -1
746746

747747
/**
748+
* @section caselight
748749
* M355 Case Light on-off / brightness
749750
*/
750751
//#define CASE_LIGHT_ENABLE
@@ -767,7 +768,7 @@
767768
#endif
768769
#endif
769770

770-
// @section homing
771+
// @section endstops
771772

772773
// If you want endstops to stay on (by default) even when not homing
773774
// enable this option. Override at any time with M120, M121.
@@ -784,6 +785,8 @@
784785
//#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
785786
#endif
786787

788+
// @section idex
789+
787790
/**
788791
* Dual X Carriage
789792
*
@@ -833,6 +836,8 @@
833836
//#define EVENT_GCODE_IDEX_AFTER_MODECHANGE "G28X"
834837
#endif
835838

839+
// @section multi stepper
840+
836841
/**
837842
* Multi-Stepper / Multi-Endstop
838843
*
@@ -904,6 +909,8 @@
904909
//#define INVERT_E1_VS_E0_DIR // E direction signals are opposites
905910
#endif
906911

912+
// @section extruder
913+
907914
// Activate a solenoid on the active extruder with M380. Disable all with M381.
908915
// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
909916
//#define EXT_SOLENOID
@@ -2271,6 +2278,14 @@
22712278
//#define EXPERIMENTAL_I2S_LA // Allow I2S_STEPPER_STREAM to be used with LA. Performance degrades as the LA step rate reaches ~20kHz.
22722279
#endif
22732280

2281+
/**
2282+
* Nonlinear Extrusion Control
2283+
*
2284+
* Control extrusion rate based on instantaneous extruder velocity. Can be used to correct for
2285+
* underextrusion at high extruder speeds that are otherwise well-behaved (i.e., not skipping).
2286+
*/
2287+
//#define NONLINEAR_EXTRUSION
2288+
22742289
// @section leveling
22752290

22762291
/**
@@ -2354,6 +2369,8 @@
23542369

23552370
#endif
23562371

2372+
// @section probes
2373+
23572374
/**
23582375
* Thermal Probe Compensation
23592376
*
@@ -2416,7 +2433,7 @@
24162433

24172434
// Height above Z=0.0 to raise the nozzle. Lowering this can help the probe to heat faster.
24182435
// Note: The Z=0.0 offset is determined by the probe Z offset (e.g., as set with M851 Z).
2419-
#define PTC_PROBE_HEATING_OFFSET 0.5
2436+
#define PTC_PROBE_HEATING_OFFSET 0.5 // (mm)
24202437
#endif
24212438
#endif // PTC_PROBE || PTC_BED || PTC_HOTEND
24222439

@@ -2471,6 +2488,8 @@
24712488
#define G38_MINIMUM_MOVE 0.0275 // (mm) Minimum distance that will produce a move.
24722489
#endif
24732490

2491+
// @section motion
2492+
24742493
// Moves (or segments) with fewer steps than this will be joined with the next move
24752494
#define MIN_STEPS_PER_SEGMENT 6
24762495

@@ -2526,7 +2545,7 @@
25262545
//================================= Buffers =================================
25272546
//===========================================================================
25282547

2529-
// @section motion
2548+
// @section gcode
25302549

25312550
// The number of linear moves that can be in the planner at once.
25322551
#if ALL(HAS_MEDIA, DIRECT_STEPPING)
@@ -2614,7 +2633,7 @@
26142633
// Therefore some clients abort after 30 seconds in a timeout.
26152634
// Some other clients start sending commands while receiving a 'wait'.
26162635
// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
2617-
//#define NO_TIMEOUTS 1000 // Milliseconds
2636+
//#define NO_TIMEOUTS 1000 // (ms)
26182637

26192638
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
26202639
#define ADVANCED_OK
@@ -2646,6 +2665,8 @@
26462665
*/
26472666
//#define EXTRA_FAN_SPEED
26482667

2668+
// @section gcode
2669+
26492670
/**
26502671
* Firmware-based and LCD-controlled retract
26512672
*
@@ -2680,6 +2701,8 @@
26802701
#endif
26812702
#endif
26822703

2704+
// @section tool change
2705+
26832706
/**
26842707
* Universal tool change settings.
26852708
* Applies to all types of extruders except where explicitly noted.

Marlin/Version.h

+1-1
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 "2023-08-26"
44+
//#define STRING_DISTRIBUTION_DATE "2023-10-15"
4545

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

Marlin/src/HAL/STM32/msc_sd.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ class Sd2CardUSBMscHandler : public USBMscHandler {
7171
bool done = false;
7272
for (uint16_t rcount = SD_MULTIBLOCK_RETRY_CNT; !done && rcount--;) {
7373
uint8_t *cBuf = pBuf;
74-
sd2card->writeStart(blkAddr);
74+
sd2card->writeStart(blkAddr, blkLen);
7575
bool okay = true; // Assume success
76-
for (uint32 i = blkLen; i--;) {
76+
for (uint32_t i = blkLen; i--;) {
7777
hal.watchdog_refresh();
7878
if (!sd2card->writeData(cBuf)) { // Write. Did it fail?
7979
sd2card->writeStop(); // writeStop for new writeStart
@@ -103,7 +103,7 @@ class Sd2CardUSBMscHandler : public USBMscHandler {
103103
uint8_t *cBuf = pBuf;
104104
sd2card->readStart(blkAddr);
105105
bool okay = true; // Assume success
106-
for (uint32 i = blkLen; i--;) {
106+
for (uint32_t i = blkLen; i--;) {
107107
hal.watchdog_refresh();
108108
if (!sd2card->readData(cBuf)) { // Read. Did it fail?
109109
sd2card->readStop(); // readStop for new readStart

Marlin/src/HAL/STM32F1/MarlinSerial.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
// Copied from ~/.platformio/packages/framework-arduinoststm32-maple/STM32F1/system/libmaple/usart_private.h
3030
// Changed to handle Emergency Parser
31-
static inline __always_inline void my_usart_irq(ring_buffer *rb, ring_buffer *wb, usart_reg_map *regs, MSerialT &serial) {
31+
static __always_inline void my_usart_irq(ring_buffer *rb, ring_buffer *wb, usart_reg_map *regs, MSerialT &serial) {
3232
/* Handle RXNEIE and TXEIE interrupts.
3333
* RXNE signifies availability of a byte in DR.
3434
*
@@ -75,7 +75,7 @@ static inline __always_inline void my_usart_irq(ring_buffer *rb, ring_buffer *wb
7575
}
7676

7777
// Not every MarlinSerial port should handle emergency parsing.
78-
// It would not make sense to parse GCode from TMC responses, for example.
78+
// It would not make sense to parse G-Code from TMC responses, for example.
7979
constexpr bool serial_handles_emergency(int port) {
8080
return (false
8181
#ifdef SERIAL_PORT

Marlin/src/MarlinCore.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ void idle(const bool no_stepper_sleep/*=false*/) {
862862
TERN_(HAS_TFT_LVGL_UI, LV_TASK_HANDLER());
863863

864864
// Manage Fixed-time Motion Control
865-
TERN_(FT_MOTION, fxdTiCtrl.loop());
865+
TERN_(FT_MOTION, ftMotion.loop());
866866

867867
IDLE_DONE:
868868
TERN_(MARLIN_DEV_MODE, idle_depth--);
@@ -1632,7 +1632,7 @@ void setup() {
16321632
#endif
16331633

16341634
#if ENABLED(FT_MOTION)
1635-
SETUP_RUN(fxdTiCtrl.init());
1635+
SETUP_RUN(ftMotion.init());
16361636
#endif
16371637

16381638
marlin_state = MF_RUNNING;

0 commit comments

Comments
 (0)