Skip to content

Commit 1525c25

Browse files
committed
Merge commit 'dabf3939209fd8ea7f6a6327d764c16743aa22aa' into look_at_201
2 parents 016e4c0 + dabf393 commit 1525c25

Some content is hidden

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

51 files changed

+1578
-577
lines changed

Marlin/Configuration.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@
379379
* 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
380380
* 15 : 100k thermistor calibration for JGAurora A5 hotend
381381
* 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
382-
* 20 : Pt100 with circuit in the Ultimainboard V2.x
382+
* 20 : Pt100 with circuit in the Ultimainboard V2.x with 5v excitation (AVR)
383+
* 21 : Pt100 with circuit in the Ultimainboard V2.x with 3.3v excitation (STM32 \ LPC176x....)
383384
* 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x
384385
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
385386
* 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup

Marlin/Configuration_adv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@
819819
// probing on a screwhead or hollow washer, probe near the edges.
820820
//#define CALIBRATION_MEASURE_AT_TOP_EDGES
821821

822-
// Define pin which is read during calibration
822+
// Define the pin to read during calibration
823823
#ifndef CALIBRATION_PIN
824824
#define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
825825
#define CALIBRATION_PIN_INVERTING false // Set to true to invert the pin

Marlin/src/MarlinCore.cpp

+16-16
Original file line numberDiff line numberDiff line change
@@ -291,36 +291,36 @@ void quickstop_stepper() {
291291
}
292292

293293
void enable_e_steppers() {
294-
#define _ENA_E(N) enable_E##N();
294+
#define _ENA_E(N) ENABLE_AXIS_E##N();
295295
REPEAT(E_STEPPERS, _ENA_E)
296296
}
297297

298298
void enable_all_steppers() {
299299
#if ENABLED(AUTO_POWER_CONTROL)
300300
powerManager.power_on();
301301
#endif
302-
enable_X();
303-
enable_Y();
304-
enable_Z();
302+
ENABLE_AXIS_X();
303+
ENABLE_AXIS_Y();
304+
ENABLE_AXIS_Z();
305305
enable_e_steppers();
306306
}
307307

308308
void disable_e_steppers() {
309-
#define _DIS_E(N) disable_E##N();
309+
#define _DIS_E(N) DISABLE_AXIS_E##N();
310310
REPEAT(E_STEPPERS, _DIS_E)
311311
}
312312

313313
void disable_e_stepper(const uint8_t e) {
314-
#define _CASE_DIS_E(N) case N: disable_E##N(); break;
314+
#define _CASE_DIS_E(N) case N: DISABLE_AXIS_E##N(); break;
315315
switch (e) {
316316
REPEAT(EXTRUDERS, _CASE_DIS_E)
317317
}
318318
}
319319

320320
void disable_all_steppers() {
321-
disable_X();
322-
disable_Y();
323-
disable_Z();
321+
DISABLE_AXIS_X();
322+
DISABLE_AXIS_Y();
323+
DISABLE_AXIS_Z();
324324
disable_e_steppers();
325325
}
326326

@@ -461,13 +461,13 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
461461
if (!already_shutdown_steppers) {
462462
already_shutdown_steppers = true; // L6470 SPI will consume 99% of free time without this
463463
#if ENABLED(DISABLE_INACTIVE_X)
464-
disable_X();
464+
DISABLE_AXIS_X();
465465
#endif
466466
#if ENABLED(DISABLE_INACTIVE_Y)
467-
disable_Y();
467+
DISABLE_AXIS_Y();
468468
#endif
469469
#if ENABLED(DISABLE_INACTIVE_Z)
470-
disable_Z();
470+
DISABLE_AXIS_Z();
471471
#endif
472472
#if ENABLED(DISABLE_INACTIVE_E)
473473
disable_e_steppers();
@@ -542,19 +542,19 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
542542
#if ENABLED(SWITCHING_EXTRUDER)
543543
bool oldstatus;
544544
switch (active_extruder) {
545-
default: oldstatus = E0_ENABLE_READ(); enable_E0(); break;
545+
default: oldstatus = E0_ENABLE_READ(); ENABLE_AXIS_E0(); break;
546546
#if E_STEPPERS > 1
547-
case 2: case 3: oldstatus = E1_ENABLE_READ(); enable_E1(); break;
547+
case 2: case 3: oldstatus = E1_ENABLE_READ(); ENABLE_AXIS_E1(); break;
548548
#if E_STEPPERS > 2
549-
case 4: case 5: oldstatus = E2_ENABLE_READ(); enable_E2(); break;
549+
case 4: case 5: oldstatus = E2_ENABLE_READ(); ENABLE_AXIS_E2(); break;
550550
#endif // E_STEPPERS > 2
551551
#endif // E_STEPPERS > 1
552552
}
553553
#else // !SWITCHING_EXTRUDER
554554
bool oldstatus;
555555
switch (active_extruder) {
556556
default:
557-
#define _CASE_EN(N) case N: oldstatus = E##N##_ENABLE_READ(); enable_E##N(); break;
557+
#define _CASE_EN(N) case N: oldstatus = E##N##_ENABLE_READ(); ENABLE_AXIS_E##N(); break;
558558
REPEAT(E_STEPPERS, _CASE_EN);
559559
}
560560
#endif

Marlin/src/core/boards.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,10 @@
332332
//
333333
// Espressif ESP32 WiFi
334334
//
335-
#define BOARD_ESPRESSIF_ESP32 6000
335+
#define BOARD_ESPRESSIF_ESP32 6000 // Generic ESP32
336336
#define BOARD_MRR_ESPA 6001
337337
#define BOARD_MRR_ESPE 6002
338+
#define BOARD_E4D_BOX 6003 // E4d@BOX
338339

339340
//
340341
// Simulations

Marlin/src/core/macros.h

+17-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,23 @@
2929

3030
#define _AXIS(A) (A##_AXIS)
3131

32-
#define _XMIN_ 100
33-
#define _YMIN_ 200
34-
#define _ZMIN_ 300
35-
#define _XMAX_ 101
36-
#define _YMAX_ 201
37-
#define _ZMAX_ 301
32+
#define _XMIN_ 100
33+
#define _YMIN_ 200
34+
#define _ZMIN_ 300
35+
#define _XMAX_ 101
36+
#define _YMAX_ 201
37+
#define _ZMAX_ 301
38+
#define _XDIAG_ 102
39+
#define _YDIAG_ 202
40+
#define _ZDIAG_ 302
41+
#define _E0DIAG_ 400
42+
#define _E1DIAG_ 401
43+
#define _E2DIAG_ 402
44+
#define _E3DIAG_ 403
45+
#define _E4DIAG_ 404
46+
#define _E5DIAG_ 405
47+
#define _E6DIAG_ 406
48+
#define _E7DIAG_ 407
3849

3950
#define _FORCE_INLINE_ __attribute__((__always_inline__)) __inline__
4051
#define FORCE_INLINE __attribute__((always_inline)) inline

Marlin/src/feature/babystep.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void Babystep::add_steps(const AxisEnum axis, const int16_t distance) {
7878
#endif
7979

8080
#if ENABLED(BABYSTEP_ALWAYS_AVAILABLE)
81-
#define BSA_ENABLE(AXIS) do{ switch (AXIS) { case X_AXIS: enable_X(); break; case Y_AXIS: enable_Y(); break; case Z_AXIS: enable_Z(); break; default: break; } }while(0)
81+
#define BSA_ENABLE(AXIS) do{ switch (AXIS) { case X_AXIS: ENABLE_AXIS_X(); break; case Y_AXIS: ENABLE_AXIS_Y(); break; case Z_AXIS: ENABLE_AXIS_Z(); break; default: break; } }while(0)
8282
#else
8383
#define BSA_ENABLE(AXIS) NOOP
8484
#endif

Marlin/src/feature/binary_protocol.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class BinaryStream {
242242
uint8_t protocol() { return (meta >> 4) & 0xF; }
243243
uint8_t type() { return meta & 0xF; }
244244
void reset() { token = 0; sync = 0; meta = 0; size = 0; checksum = 0; }
245-
uint8_t data[1];
245+
uint8_t data[2];
246246
};
247247

248248
union Footer {

Marlin/src/feature/pause.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
564564
#endif
565565

566566
// Re-enable the heaters if they timed out
567-
HOTEND_LOOP() thermalManager.reset_heater_idle_timer(e);
567+
HOTEND_LOOP() thermalManager.reset_hotend_idle_timer(e);
568568

569569
// Wait for the heaters to reach the target temperatures
570570
ensure_safe_temperature();
@@ -633,7 +633,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
633633
bool nozzle_timed_out = false;
634634
HOTEND_LOOP() {
635635
nozzle_timed_out |= thermalManager.hotend_idle[e].timed_out;
636-
thermalManager.reset_heater_idle_timer(e);
636+
thermalManager.reset_hotend_idle_timer(e);
637637
}
638638

639639
if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) // Load the new filament

Marlin/src/feature/probe_temp_compensation.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ class ProbeTempComp {
4848
public:
4949

5050
static constexpr temp_calib_t cali_info_init[TSI_COUNT] = {
51-
{ 30, 10, 5, 30 + 10 * 5 }, // Probe
52-
{ 60, 10, 5, 60 + 10 * 5 }, // Bed
51+
{ 10, 5, 30, 30 + 10 * 5 }, // Probe
52+
{ 10, 5, 60, 60 + 10 * 5 }, // Bed
5353
#if ENABLED(USE_TEMP_EXT_COMPENSATION)
54-
{ 180, 5, 20, 180 + 5 * 20 } // Extruder
54+
{ 20, 5, 180, 180 + 5 * 20 } // Extruder
5555
#endif
5656
};
5757
static const temp_calib_t cali_info[TSI_COUNT];

Marlin/src/feature/prusa_MMU2/mmu2.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ void MMU2::tool_change(uint8_t index) {
448448

449449
if (index != extruder) {
450450

451-
disable_E0();
451+
DISABLE_AXIS_E0();
452452
ui.status_printf_P(0, GET_TEXT(MSG_MMU2_LOADING_FILAMENT), int(index + 1));
453453

454454
command(MMU_CMD_T0 + index);
@@ -459,7 +459,7 @@ void MMU2::tool_change(uint8_t index) {
459459
extruder = index; //filament change is finished
460460
active_extruder = 0;
461461

462-
enable_E0();
462+
ENABLE_AXIS_E0();
463463

464464
SERIAL_ECHO_START();
465465
SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, int(extruder));
@@ -497,13 +497,13 @@ void MMU2::tool_change(const char* special) {
497497
case 'x': {
498498
planner.synchronize();
499499
uint8_t index = mmu2_choose_filament();
500-
disable_E0();
500+
DISABLE_AXIS_E0();
501501
command(MMU_CMD_T0 + index);
502502
manage_response(true, true);
503503
command(MMU_CMD_C0);
504504
mmu_loop();
505505

506-
enable_E0();
506+
ENABLE_AXIS_E0();
507507
extruder = index;
508508
active_extruder = 0;
509509
} break;
@@ -697,7 +697,7 @@ void MMU2::filament_runout() {
697697

698698
LCD_MESSAGEPGM(MSG_MMU2_EJECTING_FILAMENT);
699699

700-
enable_E0();
700+
ENABLE_AXIS_E0();
701701
current_position.e -= MMU2_FILAMENTCHANGE_EJECT_FEED;
702702
line_to_current_position(2500 / 60);
703703
planner.synchronize();
@@ -731,7 +731,7 @@ void MMU2::filament_runout() {
731731

732732
BUZZ(200, 404);
733733

734-
disable_E0();
734+
DISABLE_AXIS_E0();
735735

736736
return true;
737737
}
@@ -776,7 +776,7 @@ void MMU2::filament_runout() {
776776
void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) {
777777

778778
planner.synchronize();
779-
enable_E0();
779+
ENABLE_AXIS_E0();
780780

781781
const E_Step* step = sequence;
782782

@@ -794,7 +794,7 @@ void MMU2::filament_runout() {
794794
step++;
795795
}
796796

797-
disable_E0();
797+
DISABLE_AXIS_E0();
798798
}
799799

800800
#endif // HAS_LCD_MENU && MMU2_MENUS

Marlin/src/gcode/calibrate/G33.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,6 @@ void GcodeSuite::G33() {
439439
_opposite_results = (_4p_calibration && !towers_set) || probe_points >= 3,
440440
_endstop_results = probe_points != 1 && probe_points != -1 && probe_points != 0,
441441
_angle_results = probe_points >= 3 && towers_set;
442-
static const char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h";
443442
int8_t iterations = 0;
444443
float test_precision,
445444
zero_std_dev = (verbose_level ? 999.0f : 0.0f), // 0.0 in dry-run mode : forced end
@@ -625,8 +624,7 @@ void GcodeSuite::G33() {
625624
sprintf_P(&mess[15], PSTR("%03i.x"), (int)LROUND(zero_std_dev_min));
626625
ui.set_status(mess);
627626
print_calibration_settings(_endstop_results, _angle_results);
628-
serialprintPGM(save_message);
629-
SERIAL_EOL();
627+
SERIAL_ECHOLNPGM("Save with M500 and/or copy to Configuration.h");
630628
}
631629
else { // !end iterations
632630
char mess[15];

Marlin/src/gcode/calibrate/G76_M871.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ void GcodeSuite::G76() {
256256

257257
// Initialize temperatures
258258
uint16_t target_bed = temp_comp.probe_calib_bed_temp,
259-
target_probe = temp_comp.cali_info_init[TSI_BED].start_temp;
259+
target_probe = temp_comp.cali_info_init[TSI_PROBE].start_temp;
260260
thermalManager.setTargetBed(target_bed);
261261
SERIAL_ECHOLNPGM("Waiting for bed and probe temperature.");
262262
while (fabs(thermalManager.degBed() - float(target_bed)) > 0.1f
@@ -332,13 +332,13 @@ void GcodeSuite::G76() {
332332
else
333333
SERIAL_ECHOLNPAIR_F("Measured: ", measured_z);
334334

335-
if (target_probe == temp_comp.cali_info_init[TSI_BED].start_temp)
335+
if (target_probe == temp_comp.cali_info_init[TSI_PROBE].start_temp)
336336
temp_comp.prepare_new_calibration(measured_z);
337337
else
338338
temp_comp.push_back_new_measurement(TSI_PROBE, measured_z);
339339

340-
target_probe += temp_comp.cali_info_init[TSI_BED].temp_res;
341-
if (target_probe > temp_comp.cali_info_init[TSI_BED].end_temp) break;
340+
target_probe += temp_comp.cali_info_init[TSI_PROBE].temp_res;
341+
if (target_probe > temp_comp.cali_info_init[TSI_PROBE].end_temp) break;
342342
}
343343

344344
SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index());

Marlin/src/gcode/calibrate/M48.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
*
5454
* This function requires the machine to be homed before invocation.
5555
*/
56+
57+
extern const char SP_Y_STR[];
58+
5659
void GcodeSuite::M48() {
5760

5861
if (axis_unhomed_error()) return;

Marlin/src/gcode/control/M17_M18_M84.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
*/
3535
void GcodeSuite::M17() {
3636
if (parser.seen("XYZE")) {
37-
if (parser.seen('X')) enable_X();
38-
if (parser.seen('Y')) enable_Y();
39-
if (parser.seen('Z')) enable_Z();
37+
if (parser.seen('X')) ENABLE_AXIS_X();
38+
if (parser.seen('Y')) ENABLE_AXIS_Y();
39+
if (parser.seen('Z')) ENABLE_AXIS_Z();
4040
#if HAS_E_STEPPER_ENABLE
4141
if (parser.seen('E')) enable_e_steppers();
4242
#endif
@@ -57,9 +57,9 @@ void GcodeSuite::M18_M84() {
5757
else {
5858
if (parser.seen("XYZE")) {
5959
planner.synchronize();
60-
if (parser.seen('X')) disable_X();
61-
if (parser.seen('Y')) disable_Y();
62-
if (parser.seen('Z')) disable_Z();
60+
if (parser.seen('X')) DISABLE_AXIS_X();
61+
if (parser.seen('Y')) DISABLE_AXIS_Y();
62+
if (parser.seen('Z')) DISABLE_AXIS_Z();
6363
#if HAS_E_STEPPER_ENABLE
6464
if (parser.seen('E')) disable_e_steppers();
6565
#endif

Marlin/src/gcode/feature/pause/G60.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void GcodeSuite::G60() {
4545
}
4646

4747
stored_position[slot] = current_position;
48-
SBI(saved_slots, slot);
48+
SBI(saved_slots[slot >> 3], slot & 0x07);
4949

5050
#if ENABLED(SAVED_POSITIONS_DEBUG)
5151
const xyze_pos_t &pos = stored_position[slot];

Marlin/src/gcode/feature/pause/G61.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#if SAVED_POSITIONS
2626

2727
#include "../../../core/language.h"
28-
#include "../../module/planner.h"
28+
#include "../../../module/planner.h"
2929
#include "../../gcode.h"
3030
#include "../../../module/motion.h"
3131

@@ -48,7 +48,7 @@ void GcodeSuite::G61(void) {
4848
#endif
4949

5050
// No saved position? No axes being restored?
51-
if (!TEST(saved_slots, slot) || !parser.seen("XYZ")) return;
51+
if (!TEST(saved_slots[slot >> 3], slot & 0x07) || !parser.seen("XYZ")) return;
5252

5353
// Apply any given feedrate over 0.0
5454
const float fr = parser.linearval('F');

0 commit comments

Comments
 (0)