Skip to content

Commit

Permalink
Merge 'bugfix-2.0.x' into pr/23463
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 11, 2022
2 parents 78cb32f + 476028d commit 7fd1d3b
Show file tree
Hide file tree
Showing 68 changed files with 2,002 additions and 1,226 deletions.
5 changes: 5 additions & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,11 @@
// Add an optimized binary file transfer mode, initiated with 'M28 B1'
//#define BINARY_FILE_TRANSFER

#if ENABLED(BINARY_FILE_TRANSFER)
// Include extra facilities (e.g., 'M20 F') supporting firmware upload via BINARY_FILE_TRANSFER
//#define CUSTOM_FIRMWARE_UPLOAD
#endif

/**
* Set this option to one of the following (or the board's defaults apply):
*
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2022-01-07"
//#define STRING_DISTRIBUTION_DATE "2022-01-11"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
107 changes: 48 additions & 59 deletions Marlin/src/core/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,6 @@
#define STR_X "X"
#define STR_Y "Y"
#define STR_Z "Z"
#define STR_I AXIS4_STR
#define STR_J AXIS5_STR
#define STR_K AXIS6_STR
#define STR_E "E"
#if IS_KINEMATIC
#define STR_A "A"
Expand All @@ -360,115 +357,107 @@
#define STR_Z3 "Z3"
#define STR_Z4 "Z4"

#define LCD_STR_A STR_A
#define LCD_STR_B STR_B
#define LCD_STR_C STR_C
#define LCD_STR_I STR_I
#define LCD_STR_J STR_J
#define LCD_STR_K STR_K
#define LCD_STR_E STR_E

// Extra Axis and Endstop Names
#if HAS_I_AXIS
#if AXIS4_NAME == 'A'
#define AXIS4_STR "A"
#define STR_I "A"
#define STR_I_MIN "a_min"
#define STR_I_MAX "a_max"
#elif AXIS4_NAME == 'B'
#define AXIS4_STR "B"
#define STR_I "B"
#define STR_I_MIN "b_min"
#define STR_I_MAX "b_max"
#elif AXIS4_NAME == 'C'
#define AXIS4_STR "C"
#define STR_I "C"
#define STR_I_MIN "c_min"
#define STR_I_MAX "c_max"
#elif AXIS4_NAME == 'U'
#define AXIS4_STR "U"
#define STR_I "U"
#define STR_I_MIN "u_min"
#define STR_I_MAX "u_max"
#elif AXIS4_NAME == 'V'
#define AXIS4_STR "V"
#define STR_I "V"
#define STR_I_MIN "v_min"
#define STR_I_MAX "v_max"
#elif AXIS4_NAME == 'W'
#define AXIS4_STR "W"
#define STR_I "W"
#define STR_I_MIN "w_min"
#define STR_I_MAX "w_max"
#else
#define AXIS4_STR "A"
#define STR_I "A"
#define STR_I_MIN "a_min"
#define STR_I_MAX "a_max"
#endif
#else
#define AXIS4_STR ""
#define STR_I ""
#endif

#if HAS_J_AXIS
#if AXIS5_NAME == 'A'
#define AXIS5_STR "A"
#define STR_J "A"
#define STR_J_MIN "a_min"
#define STR_J_MAX "a_max"
#elif AXIS5_NAME == 'B'
#define AXIS5_STR "B"
#define STR_J "B"
#define STR_J_MIN "b_min"
#define STR_J_MAX "b_max"
#elif AXIS5_NAME == 'C'
#define AXIS5_STR "C"
#define STR_J "C"
#define STR_J_MIN "c_min"
#define STR_J_MAX "c_max"
#elif AXIS5_NAME == 'U'
#define AXIS5_STR "U"
#define STR_J "U"
#define STR_J_MIN "u_min"
#define STR_J_MAX "u_max"
#elif AXIS5_NAME == 'V'
#define AXIS5_STR "V"
#define STR_J "V"
#define STR_J_MIN "v_min"
#define STR_J_MAX "v_max"
#elif AXIS5_NAME == 'W'
#define AXIS5_STR "W"
#define STR_J "W"
#define STR_J_MIN "w_min"
#define STR_J_MAX "w_max"
#else
#define AXIS5_STR "B"
#define STR_J "B"
#define STR_J_MIN "b_min"
#define STR_J_MAX "b_max"
#endif
#else
#define AXIS5_STR ""
#define STR_J ""
#endif

#if HAS_K_AXIS
#if AXIS6_NAME == 'A'
#define AXIS6_STR "A"
#define STR_K "A"
#define STR_K_MIN "a_min"
#define STR_K_MAX "a_max"
#elif AXIS6_NAME == 'B'
#define AXIS6_STR "B"
#define STR_K "B"
#define STR_K_MIN "b_min"
#define STR_K_MAX "b_max"
#elif AXIS6_NAME == 'C'
#define AXIS6_STR "C"
#define STR_K "C"
#define STR_K_MIN "c_min"
#define STR_K_MAX "c_max"
#elif AXIS6_NAME == 'U'
#define AXIS6_STR "U"
#define STR_K "U"
#define STR_K_MIN "u_min"
#define STR_K_MAX "u_max"
#elif AXIS6_NAME == 'V'
#define AXIS6_STR "V"
#define STR_K "V"
#define STR_K_MIN "v_min"
#define STR_K_MAX "v_max"
#elif AXIS6_NAME == 'W'
#define AXIS6_STR "W"
#define STR_K "W"
#define STR_K_MIN "w_min"
#define STR_K_MAX "w_max"
#else
#define AXIS6_STR "C"
#define STR_K "C"
#define STR_K_MIN "c_min"
#define STR_K_MAX "c_max"
#endif
#else
#define AXIS6_STR ""
#define STR_K ""
#endif

#if EITHER(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
Expand Down Expand Up @@ -519,34 +508,34 @@
*/
#if ENABLED(NUMBER_TOOLS_FROM_0)
#define LCD_FIRST_TOOL 0
#define LCD_STR_N0 "0"
#define LCD_STR_N1 "1"
#define LCD_STR_N2 "2"
#define LCD_STR_N3 "3"
#define LCD_STR_N4 "4"
#define LCD_STR_N5 "5"
#define LCD_STR_N6 "6"
#define LCD_STR_N7 "7"
#define STR_N0 "0"
#define STR_N1 "1"
#define STR_N2 "2"
#define STR_N3 "3"
#define STR_N4 "4"
#define STR_N5 "5"
#define STR_N6 "6"
#define STR_N7 "7"
#else
#define LCD_FIRST_TOOL 1
#define LCD_STR_N0 "1"
#define LCD_STR_N1 "2"
#define LCD_STR_N2 "3"
#define LCD_STR_N3 "4"
#define LCD_STR_N4 "5"
#define LCD_STR_N5 "6"
#define LCD_STR_N6 "7"
#define LCD_STR_N7 "8"
#define STR_N0 "1"
#define STR_N1 "2"
#define STR_N2 "3"
#define STR_N3 "4"
#define STR_N4 "5"
#define STR_N5 "6"
#define STR_N6 "7"
#define STR_N7 "8"
#endif

#define LCD_STR_E0 "E" LCD_STR_N0
#define LCD_STR_E1 "E" LCD_STR_N1
#define LCD_STR_E2 "E" LCD_STR_N2
#define LCD_STR_E3 "E" LCD_STR_N3
#define LCD_STR_E4 "E" LCD_STR_N4
#define LCD_STR_E5 "E" LCD_STR_N5
#define LCD_STR_E6 "E" LCD_STR_N6
#define LCD_STR_E7 "E" LCD_STR_N7
#define STR_E0 STR_E STR_N0
#define STR_E1 STR_E STR_N1
#define STR_E2 STR_E STR_N2
#define STR_E3 STR_E STR_N3
#define STR_E4 STR_E STR_N4
#define STR_E5 STR_E STR_N5
#define STR_E6 STR_E STR_N6
#define STR_E7 STR_E STR_N7

// Include localized LCD Menu Messages

Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/core/serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ PGMSTR(X_LBL, "X:"); PGMSTR(Y_LBL, "Y:"); PGMSTR(Z_LBL, "Z:"); PGMST
PGMSTR(SP_A_STR, " A"); PGMSTR(SP_B_STR, " B"); PGMSTR(SP_C_STR, " C");
PGMSTR(SP_X_STR, " X"); PGMSTR(SP_Y_STR, " Y"); PGMSTR(SP_Z_STR, " Z"); PGMSTR(SP_E_STR, " E");
PGMSTR(SP_X_LBL, " X:"); PGMSTR(SP_Y_LBL, " Y:"); PGMSTR(SP_Z_LBL, " Z:"); PGMSTR(SP_E_LBL, " E:");
PGMSTR(I_STR, AXIS4_STR); PGMSTR(J_STR, AXIS5_STR); PGMSTR(K_STR, AXIS6_STR);
PGMSTR(I_LBL, AXIS4_STR ":"); PGMSTR(J_LBL, AXIS5_STR ":"); PGMSTR(K_LBL, AXIS6_STR ":");
PGMSTR(SP_I_STR, " " AXIS4_STR); PGMSTR(SP_J_STR, " " AXIS5_STR); PGMSTR(SP_K_STR, " " AXIS6_STR);
PGMSTR(SP_I_LBL, " " AXIS4_STR ":"); PGMSTR(SP_J_LBL, " " AXIS5_STR ":"); PGMSTR(SP_K_LBL, " " AXIS6_STR ":");
PGMSTR(I_STR, STR_I); PGMSTR(J_STR, STR_J); PGMSTR(K_STR, STR_K);
PGMSTR(I_LBL, STR_I ":"); PGMSTR(J_LBL, STR_J ":"); PGMSTR(K_LBL, STR_K ":");
PGMSTR(SP_I_STR, " " STR_I); PGMSTR(SP_J_STR, " " STR_J); PGMSTR(SP_K_STR, " " STR_K);
PGMSTR(SP_I_LBL, " " STR_I ":"); PGMSTR(SP_J_LBL, " " STR_J ":"); PGMSTR(SP_K_LBL, " " STR_K ":");

// Hook Meatpack if it's enabled on the first leaf
#if ENABLED(MEATPACK_ON_SERIAL_PORT_1)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct IF<true, L, R> { typedef L type; };
#define LOGICAL_AXIS_ELEM(O) LOGICAL_AXIS_LIST(O.e, O.x, O.y, O.z, O.i, O.j, O.k)
#define LOGICAL_AXIS_DECL(T,V) LOGICAL_AXIS_LIST(T e=V, T x=V, T y=V, T z=V, T i=V, T j=V, T k=V)

#define LOGICAL_AXES_STRING LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR)
#define LOGICAL_AXES_STRING LOGICAL_AXIS_GANG("E", "X", "Y", "Z", STR_I, STR_J, STR_K)

#if HAS_EXTRUDERS
#define LIST_ITEM_E(N) , N
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/gcode/calibrate/G28.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,17 +293,17 @@ void GcodeSuite::G28() {
#if HAS_CURRENT_HOME(I)
const int16_t tmc_save_current_I = stepperI.getMilliamps();
stepperI.rms_current(I_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(F(AXIS4_STR), tmc_save_current_I, I_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(F(STR_I), tmc_save_current_I, I_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(J)
const int16_t tmc_save_current_J = stepperJ.getMilliamps();
stepperJ.rms_current(J_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(F(AXIS5_STR), tmc_save_current_J, J_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(F(STR_J), tmc_save_current_J, J_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(K)
const int16_t tmc_save_current_K = stepperK.getMilliamps();
stepperK.rms_current(K_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(F(AXIS6_STR), tmc_save_current_K, K_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(F(STR_K), tmc_save_current_K, K_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(Z) && ENABLED(DELTA)
const int16_t tmc_save_current_Z = stepperZ.getMilliamps();
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/gcode/calibrate/G34.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ void GcodeSuite::G34() {
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Final Z Move");
do_blocking_move_to_z(zgrind, MMM_TO_MMS(GANTRY_CALIBRATION_FEEDRATE));

// Back off end plate, back to normal motion range
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Backoff");
do_blocking_move_to_z(zpounce, MMM_TO_MMS(GANTRY_CALIBRATION_FEEDRATE));

#if _REDUCE_CURRENT
// Reset current to original values
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Restore Current");
Expand Down Expand Up @@ -146,6 +142,10 @@ void GcodeSuite::G34() {
#endif
#endif

// Back off end plate, back to normal motion range
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Backoff");
do_blocking_move_to_z(zpounce, MMM_TO_MMS(GANTRY_CALIBRATION_FEEDRATE));

#ifdef GANTRY_CALIBRATION_COMMANDS_POST
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Running Post Commands");
process_subcommands_now(F(GANTRY_CALIBRATION_COMMANDS_POST));
Expand Down
9 changes: 6 additions & 3 deletions Marlin/src/gcode/feature/pause/G60.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ void GcodeSuite::G60() {
SBI(saved_slots[slot >> 3], slot & 0x07);

#if ENABLED(SAVED_POSITIONS_DEBUG)
{
DEBUG_ECHOPGM(STR_SAVED_POS " S", slot);
const xyze_pos_t &pos = stored_position[slot];
DEBUG_ECHOLNPAIR_F_P(
LIST_N(DOUBLE(LOGICAL_AXES), SP_E_STR, pos.e,
PSTR(" : X"), pos.x, SP_Y_STR, pos.y, SP_Z_STR, pos.z,
SP_I_STR, pos.i, SP_J_STR, pos.j, SP_K_STR, pos.k)
LIST_N(DOUBLE(LINEAR_AXES), PSTR(" : X"), pos.x, SP_Y_STR, pos.y, SP_Z_STR, pos.z, SP_I_STR, pos.i, SP_J_STR, pos.j, SP_K_STR, pos.k)
#if HAS_EXTRUDERS
, SP_E_STR, pos.e
#endif
);
}
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/feature/pause/G61.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void GcodeSuite::G61(void) {
SYNC_E(stored_position[slot].e);
}
else {
if (parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) {
if (parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", STR_I, STR_J, STR_K))) {
DEBUG_ECHOPGM(STR_RESTORING_POS " S", slot);
LOOP_LINEAR_AXES(i) {
destination[i] = parser.seen(AXIS_CHAR(i))
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/motion/G0_G1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) {
if (MIN_AUTORETRACT <= MAX_AUTORETRACT) {
// When M209 Autoretract is enabled, convert E-only moves to firmware retract/recover moves
if (fwretract.autoretract_enabled && parser.seen_test('E')
&& !parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))
&& !parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", STR_I, STR_J, STR_K))
) {
const float echange = destination.e - current_position.e;
// Is this a retract or recover move?
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/gcode/motion/M290.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void GcodeSuite::M290() {
}
#endif

if (!parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR)) || parser.seen('R')) {
if (!parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", STR_I, STR_J, STR_K)) || parser.seen('R')) {
SERIAL_ECHO_START();

#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
Expand Down
8 changes: 7 additions & 1 deletion Marlin/src/gcode/sd/M20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@
void GcodeSuite::M20() {
if (card.flag.mounted) {
SERIAL_ECHOLNPGM(STR_BEGIN_FILE_LIST);
card.ls(TERN_(LONG_FILENAME_HOST_SUPPORT, parser.boolval('L')));
card.ls(
TERN_(CUSTOM_FIRMWARE_UPLOAD, parser.boolval('F'))
#if BOTH(CUSTOM_FIRMWARE_UPLOAD, LONG_FILENAME_HOST_SUPPORT)
,
#endif
TERN_(LONG_FILENAME_HOST_SUPPORT, parser.boolval('L'))
);
SERIAL_ECHOLNPGM(STR_END_FILE_LIST);
}
else
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2022-01-07"
#define STRING_DISTRIBUTION_DATE "2022-01-11"
#endif

/**
Expand Down
Loading

0 comments on commit 7fd1d3b

Please sign in to comment.