Skip to content

Commit 06acb0c

Browse files
committed
Merge branch 'bugfix-2.0.x' into 2.0.x-Sapphire-Pro
2 parents 1e44132 + e2eef12 commit 06acb0c

File tree

108 files changed

+3045
-778
lines changed

Some content is hidden

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

108 files changed

+3045
-778
lines changed

Marlin/Configuration.h

+17-5
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@
412412
#define TEMP_SENSOR_3 0
413413
#define TEMP_SENSOR_4 0
414414
#define TEMP_SENSOR_5 0
415+
#define TEMP_SENSOR_6 0
416+
#define TEMP_SENSOR_7 0
415417
#define TEMP_SENSOR_BED 11 // I'm using SSR. For Standard heater set to 1
416418
#define TEMP_SENSOR_PROBE 0
417419
#define TEMP_SENSOR_CHAMBER 0
@@ -441,6 +443,8 @@
441443
#define HEATER_3_MINTEMP 5
442444
#define HEATER_4_MINTEMP 5
443445
#define HEATER_5_MINTEMP 5
446+
#define HEATER_6_MINTEMP 5
447+
#define HEATER_7_MINTEMP 5
444448
#define BED_MINTEMP 5
445449

446450
// Above this temperature the heater will be switched off.
@@ -452,6 +456,8 @@
452456
#define HEATER_3_MAXTEMP 275
453457
#define HEATER_4_MAXTEMP 275
454458
#define HEATER_5_MAXTEMP 275
459+
#define HEATER_6_MAXTEMP 275
460+
#define HEATER_7_MAXTEMP 275
455461
#define BED_MAXTEMP 150
456462

457463
//===========================================================================
@@ -696,6 +702,8 @@
696702
//#define E3_DRIVER_TYPE A4988
697703
//#define E4_DRIVER_TYPE A4988
698704
//#define E5_DRIVER_TYPE A4988
705+
//#define E6_DRIVER_TYPE A4988
706+
//#define E7_DRIVER_TYPE A4988
699707

700708
// Enable this feature if all enabled endstop pins are interrupt-capable.
701709
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
@@ -925,6 +933,13 @@
925933
#define Z_PROBE_RETRACT_X X_MAX_POS
926934
#endif
927935

936+
// Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
937+
// When the pin is defined you can use M672 to set/reset the probe sensivity.
938+
//#define DUET_SMART_EFFECTOR
939+
#if ENABLED(DUET_SMART_EFFECTOR)
940+
#define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin
941+
#endif
942+
928943
//
929944
// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
930945
//
@@ -1062,6 +1077,8 @@
10621077
#define INVERT_E3_DIR false
10631078
#define INVERT_E4_DIR false
10641079
#define INVERT_E5_DIR false
1080+
#define INVERT_E6_DIR false
1081+
#define INVERT_E7_DIR false
10651082

10661083
// @section homing
10671084

@@ -1447,11 +1464,6 @@
14471464
#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
14481465
#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
14491466

1450-
//
1451-
// M100 Free Memory Watcher
1452-
//
1453-
//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
1454-
14551467
//
14561468
// G20/G21 Inch mode support
14571469
//

Marlin/Configuration_adv.h

+77-5
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@
7878
#define HOTEND5_BETA 3950 // Beta value
7979
#endif
8080

81+
#if TEMP_SENSOR_6 == 1000
82+
#define HOTEND6_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
83+
#define HOTEND6_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
84+
#define HOTEND6_BETA 3950 // Beta value
85+
#endif
86+
87+
#if TEMP_SENSOR_7 == 1000
88+
#define HOTEND7_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
89+
#define HOTEND7_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
90+
#define HOTEND7_BETA 3950 // Beta value
91+
#endif
92+
8193
#if TEMP_SENSOR_BED == 1000
8294
#define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
8395
#define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
@@ -185,8 +197,8 @@
185197
/**
186198
* Heated chamber watch settings (M141/M191).
187199
*/
188-
#define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
189-
#define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
200+
#define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
201+
#define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
190202
#endif
191203

192204
#if ENABLED(PIDTEMP)
@@ -1564,6 +1576,11 @@
15641576

15651577
// @section extras
15661578

1579+
//
1580+
// G60/G61 Position Save and Return
1581+
//
1582+
//#define SAVED_POSITIONS 1 // Each saved position slot costs 12 bytes
1583+
15671584
//
15681585
// G2/G3 Arc Support
15691586
//
@@ -1945,6 +1962,18 @@
19451962
#define E5_MICROSTEPS 16
19461963
#endif
19471964

1965+
#if AXIS_DRIVER_TYPE_E6(TMC26X)
1966+
#define E6_MAX_CURRENT 1000
1967+
#define E6_SENSE_RESISTOR 91
1968+
#define E6_MICROSTEPS 16
1969+
#endif
1970+
1971+
#if AXIS_DRIVER_TYPE_E7(TMC26X)
1972+
#define E7_MAX_CURRENT 1000
1973+
#define E7_SENSE_RESISTOR 91
1974+
#define E7_MICROSTEPS 16
1975+
#endif
1976+
19481977
#endif // TMC26X
19491978

19501979
// @section tmc_smart
@@ -2076,6 +2105,20 @@
20762105
#define E5_CHAIN_POS -1
20772106
#endif
20782107

2108+
#if AXIS_IS_TMC(E6)
2109+
#define E6_CURRENT 800
2110+
#define E6_MICROSTEPS 16
2111+
#define E6_RSENSE 0.11
2112+
#define E6_CHAIN_POS -1
2113+
#endif
2114+
2115+
#if AXIS_IS_TMC(E7)
2116+
#define E7_CURRENT 800
2117+
#define E7_MICROSTEPS 16
2118+
#define E7_RSENSE 0.11
2119+
#define E7_CHAIN_POS -1
2120+
#endif
2121+
20792122
/**
20802123
* Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
20812124
* The default pins can be found in your board's pins file.
@@ -2093,6 +2136,8 @@
20932136
//#define E3_CS_PIN -1
20942137
//#define E4_CS_PIN -1
20952138
//#define E5_CS_PIN -1
2139+
//#define E6_CS_PIN -1
2140+
//#define E7_CS_PIN -1
20962141

20972142
/**
20982143
* Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
@@ -2130,6 +2175,8 @@
21302175
#define E3_SLAVE_ADDRESS 0
21312176
#define E4_SLAVE_ADDRESS 0
21322177
#define E5_SLAVE_ADDRESS 0
2178+
#define E6_SLAVE_ADDRESS 0
2179+
#define E7_SLAVE_ADDRESS 0
21332180

21342181
/**
21352182
* Software enable
@@ -2206,6 +2253,8 @@
22062253
#define E3_HYBRID_THRESHOLD 30
22072254
#define E4_HYBRID_THRESHOLD 30
22082255
#define E5_HYBRID_THRESHOLD 30
2256+
#define E6_HYBRID_THRESHOLD 30
2257+
#define E7_HYBRID_THRESHOLD 30
22092258

22102259
/**
22112260
* Use StallGuard2 to home / probe X, Y, Z.
@@ -2428,6 +2477,24 @@
24282477
#define E5_SLEW_RATE 1
24292478
#endif
24302479

2480+
#if AXIS_IS_L64XX(E6)
2481+
#define E6_MICROSTEPS 128
2482+
#define E6_OVERCURRENT 2000
2483+
#define E6_STALLCURRENT 1500
2484+
#define E6_MAX_VOLTAGE 127
2485+
#define E6_CHAIN_POS -1
2486+
#define E6_SLEW_RATE 1
2487+
#endif
2488+
2489+
#if AXIS_IS_L64XX(E7)
2490+
#define E7_MICROSTEPS 128
2491+
#define E7_OVERCURRENT 2000
2492+
#define E7_STALLCURRENT 1500
2493+
#define E7_MAX_VOLTAGE 127
2494+
#define E7_CHAIN_POS -1
2495+
#define E7_SLEW_RATE 1
2496+
#endif
2497+
24312498
/**
24322499
* Monitor L6470 drivers for error conditions like over temperature and over current.
24332500
* In the case of over temperature Marlin can decrease the drive until the error condition clears.
@@ -3013,9 +3080,14 @@
30133080

30143081
// @section develop
30153082

3016-
/**
3017-
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
3018-
*/
3083+
//
3084+
// M100 Free Memory Watcher to debug memory usage
3085+
//
3086+
//#define M100_FREE_MEMORY_WATCHER
3087+
3088+
//
3089+
// M43 - display pin status, toggle pins, watch pins, watch endstops & toggle LED, test servo probe
3090+
//
30193091
//#define PINS_DEBUGGING
30203092

30213093
// Enable Marlin dev mode which adds some special commands

Marlin/src/HAL/HAL_AVR/fastio.h

+15-4
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,25 @@ enum ClockSource2 : char {
279279
*/
280280

281281
// Determine which harware PWMs are already in use
282+
#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN)
282283
#if PIN_EXISTS(CONTROLLER_FAN)
283-
#define PWM_CHK_FAN_B(P) (P == CONTROLLER_FAN_PIN || P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN)
284+
#define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN)
284285
#else
285-
#define PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN)
286+
#define PWM_CHK_FAN_B(P) _PWM_CHK_FAN_B(P)
286287
#endif
287288

288-
#if ANY_PIN(FAN, FAN1, FAN2)
289-
#if PIN_EXISTS(FAN2)
289+
#if ANY_PIN(FAN, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7)
290+
#if PIN_EXISTS(FAN7)
291+
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN || P == FAN6_PIN || P == FAN7_PIN)
292+
#elif PIN_EXISTS(FAN6)
293+
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN || P == FAN6_PIN)
294+
#elif PIN_EXISTS(FAN5)
295+
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN || P == FAN5_PIN)
296+
#elif PIN_EXISTS(FAN4)
297+
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN || P == FAN4_PIN)
298+
#elif PIN_EXISTS(FAN3)
299+
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN || P == FAN3_PIN)
300+
#elif PIN_EXISTS(FAN2)
290301
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN || P == FAN2_PIN)
291302
#elif PIN_EXISTS(FAN1)
292303
#define PWM_CHK_FAN_A(P) (P == FAN0_PIN || P == FAN1_PIN)

Marlin/src/HAL/HAL_AVR/pinsDebug.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ static void err_is_interrupt() { SERIAL_ECHOPGM(" compare interrupt enabled"
231231
static void err_prob_interrupt() { SERIAL_ECHOPGM(" overflow interrupt enabled"); }
232232
static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin"); SERIAL_ECHO_SP(14); }
233233

234-
void com_print(uint8_t N, uint8_t Z) {
234+
inline void com_print(const uint8_t N, const uint8_t Z) {
235235
const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
236236
SERIAL_ECHOPGM(" COM");
237-
SERIAL_CHAR('0' + N, 'A' + Z);
237+
SERIAL_CHAR('0' + N, Z);
238238
SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03));
239239
}
240240

Marlin/src/HAL/HAL_ESP32/HAL.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ void HAL_idletask() {
111111
#if BOTH(WIFISUPPORT, OTASUPPORT)
112112
OTA_handle();
113113
#endif
114+
#if ENABLED(ESP3D_WIFISUPPORT)
115+
esp3dlib.idletask();
116+
#endif
114117
}
115118

116119
void HAL_clear_reset_source() { }

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

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
#error "TEMP_4_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
4747
#elif _OLD_TEMP_PIN(TEMP_5)
4848
#error "TEMP_5_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
49+
#elif _OLD_TEMP_PIN(TEMP_6)
50+
#error "TEMP_6_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
51+
#elif _OLD_TEMP_PIN(TEMP_7)
52+
#error "TEMP_7_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
4953
#endif
5054
#undef _OLD_TEMP_PIN
5155

Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#endif
3737

3838
#include "digipot_mcp4451_I2C_routines.h"
39-
#include "i2c_util.h"
4039

4140
// These two routines are exact copies of the lpc17xx_i2c.c routines. Couldn't link to
4241
// to the lpc17xx_i2c.c routines so had to copy them into this file & rename them.

Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.h

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <lpc17xx_i2c.h>
3434
#include <lpc17xx_pinsel.h>
3535
#include <lpc17xx_libcfg_default.h>
36+
#include "i2c_util.h"
3637

3738
uint8_t digipot_mcp4451_start(uint8_t sla);
3839
uint8_t digipot_mcp4451_send_byte(uint8_t data);

Marlin/src/HAL/HAL_LPC1768/include/i2c_util.h

+8
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@
4545
#include <lpc17xx_pinsel.h>
4646
#include <lpc17xx_libcfg_default.h>
4747

48+
#ifdef __cplusplus
49+
extern "C" {
50+
#endif
51+
4852
void configure_i2c(const uint8_t clock_option);
53+
54+
#ifdef __cplusplus
55+
}
56+
#endif

Marlin/src/HAL/HAL_LPC1768/watchdog.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,4 @@ bool watchdog_timed_out() { return TEST(WDT_ReadTimeOutFlag(), 0); }
6868
void watchdog_clear_timeout_flag() { WDT_ClrTimeOutFlag(); }
6969

7070
#endif // USE_WATCHDOG
71-
7271
#endif // TARGET_LPC1768

0 commit comments

Comments
 (0)