Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x
This commit is contained in:
commit
35323bd946
22 changed files with 215 additions and 91 deletions
|
|
@ -678,15 +678,15 @@
|
||||||
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
|
||||||
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
|
||||||
*/
|
*/
|
||||||
//#define X_DRIVER_TYPE A4988
|
#define X_DRIVER_TYPE A4988
|
||||||
//#define Y_DRIVER_TYPE A4988
|
#define Y_DRIVER_TYPE A4988
|
||||||
//#define Z_DRIVER_TYPE A4988
|
#define Z_DRIVER_TYPE A4988
|
||||||
//#define X2_DRIVER_TYPE A4988
|
//#define X2_DRIVER_TYPE A4988
|
||||||
//#define Y2_DRIVER_TYPE A4988
|
//#define Y2_DRIVER_TYPE A4988
|
||||||
//#define Z2_DRIVER_TYPE A4988
|
//#define Z2_DRIVER_TYPE A4988
|
||||||
//#define Z3_DRIVER_TYPE A4988
|
//#define Z3_DRIVER_TYPE A4988
|
||||||
//#define Z4_DRIVER_TYPE A4988
|
//#define Z4_DRIVER_TYPE A4988
|
||||||
//#define E0_DRIVER_TYPE A4988
|
#define E0_DRIVER_TYPE A4988
|
||||||
//#define E1_DRIVER_TYPE A4988
|
//#define E1_DRIVER_TYPE A4988
|
||||||
//#define E2_DRIVER_TYPE A4988
|
//#define E2_DRIVER_TYPE A4988
|
||||||
//#define E3_DRIVER_TYPE A4988
|
//#define E3_DRIVER_TYPE A4988
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
#elif WITHIN(SERIAL_PORT_2, 0, 8)
|
#elif WITHIN(SERIAL_PORT_2, 0, 8)
|
||||||
#define MYSERIAL1 MSERIAL(SERIAL_PORT_2)
|
#define MYSERIAL1 MSERIAL(SERIAL_PORT_2)
|
||||||
#else
|
#else
|
||||||
#error "SERIAL_PORT_2 must be from -1 to 8. Please update your configuration."
|
#error "SERIAL_PORT_2 must be from -2 to 8. Please update your configuration."
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,12 +113,20 @@ void host_action(PGM_P const pstr, const bool eol) {
|
||||||
void host_action_prompt_button(PGM_P const pstr) { host_action_prompt_plus(PSTR("button"), pstr); }
|
void host_action_prompt_button(PGM_P const pstr) { host_action_prompt_plus(PSTR("button"), pstr); }
|
||||||
void host_action_prompt_end() { host_action_prompt(PSTR("end")); }
|
void host_action_prompt_end() { host_action_prompt(PSTR("end")); }
|
||||||
void host_action_prompt_show() { host_action_prompt(PSTR("show")); }
|
void host_action_prompt_show() { host_action_prompt(PSTR("show")); }
|
||||||
void host_prompt_do(const PromptReason reason, PGM_P const pstr, PGM_P const btn1/*=nullptr*/, PGM_P const btn2/*=nullptr*/) {
|
|
||||||
host_action_prompt_begin(reason, pstr);
|
void _host_prompt_show(PGM_P const btn1/*=nullptr*/, PGM_P const btn2/*=nullptr*/) {
|
||||||
if (btn1) host_action_prompt_button(btn1);
|
if (btn1) host_action_prompt_button(btn1);
|
||||||
if (btn2) host_action_prompt_button(btn2);
|
if (btn2) host_action_prompt_button(btn2);
|
||||||
host_action_prompt_show();
|
host_action_prompt_show();
|
||||||
}
|
}
|
||||||
|
void host_prompt_do(const PromptReason reason, PGM_P const pstr, PGM_P const btn1/*=nullptr*/, PGM_P const btn2/*=nullptr*/) {
|
||||||
|
host_action_prompt_begin(reason, pstr);
|
||||||
|
_host_prompt_show(btn1, btn2);
|
||||||
|
}
|
||||||
|
void host_prompt_do(const PromptReason reason, PGM_P const pstr, const char extra_char, PGM_P const btn1/*=nullptr*/, PGM_P const btn2/*=nullptr*/) {
|
||||||
|
host_action_prompt_begin(reason, pstr, extra_char);
|
||||||
|
_host_prompt_show(btn1, btn2);
|
||||||
|
}
|
||||||
|
|
||||||
void filament_load_host_prompt() {
|
void filament_load_host_prompt() {
|
||||||
const bool disable_to_continue = TERN0(HAS_FILAMENT_SENSOR, runout.filament_ran_out);
|
const bool disable_to_continue = TERN0(HAS_FILAMENT_SENSOR, runout.filament_ran_out);
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ void host_action(PGM_P const pstr, const bool eol=true);
|
||||||
void host_action_prompt_end();
|
void host_action_prompt_end();
|
||||||
void host_action_prompt_show();
|
void host_action_prompt_show();
|
||||||
void host_prompt_do(const PromptReason reason, PGM_P const pstr, PGM_P const btn1=nullptr, PGM_P const btn2=nullptr);
|
void host_prompt_do(const PromptReason reason, PGM_P const pstr, PGM_P const btn1=nullptr, PGM_P const btn2=nullptr);
|
||||||
|
void host_prompt_do(const PromptReason reason, PGM_P const pstr, const char extra_char, PGM_P const btn1=nullptr, PGM_P const btn2=nullptr);
|
||||||
inline void host_prompt_open(const PromptReason reason, PGM_P const pstr, PGM_P const btn1=nullptr, PGM_P const btn2=nullptr) {
|
inline void host_prompt_open(const PromptReason reason, PGM_P const pstr, PGM_P const btn1=nullptr, PGM_P const btn2=nullptr) {
|
||||||
if (host_prompt_reason == PROMPT_NOT_DEFINED) host_prompt_do(reason, pstr, btn1, btn2);
|
if (host_prompt_reason == PROMPT_NOT_DEFINED) host_prompt_do(reason, pstr, btn1, btn2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,17 +199,18 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
||||||
first_impatient_beep(max_beep_count);
|
first_impatient_beep(max_beep_count);
|
||||||
|
|
||||||
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
KEEPALIVE_STATE(PAUSED_FOR_USER);
|
||||||
|
|
||||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||||
const char tool = '0'
|
const char tool = '0'
|
||||||
#if NUM_RUNOUT_SENSORS > 1
|
#if NUM_RUNOUT_SENSORS > 1
|
||||||
+ active_extruder
|
+ active_extruder
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
host_action_prompt_begin(PROMPT_USER_CONTINUE, PSTR("Load Filament T"), tool);
|
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Load Filament T"), tool, CONTINUE_STR);
|
||||||
host_action_prompt_button(CONTINUE_STR);
|
|
||||||
host_action_prompt_show();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Load Filament")));
|
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Load Filament")));
|
||||||
|
|
||||||
while (wait_for_user) {
|
while (wait_for_user) {
|
||||||
impatient_beep(max_beep_count);
|
impatient_beep(max_beep_count);
|
||||||
idle_no_sleep();
|
idle_no_sleep();
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,9 @@ bool FilamentMonitorBase::enabled = true,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||||
//#define DEBUG_TOOLCHANGE_MIGRATION_FEATURE
|
|
||||||
#include "../module/tool_change.h"
|
#include "../module/tool_change.h"
|
||||||
|
#define DEBUG_OUT ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||||
|
#include "../core/debug_out.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||||
|
|
@ -74,15 +75,11 @@ void event_filament_runout() {
|
||||||
|
|
||||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||||
if (migration.in_progress) {
|
if (migration.in_progress) {
|
||||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
DEBUG_ECHOLNPGM("Migration Already In Progress");
|
||||||
SERIAL_ECHOLN("Migration Already In Progress");
|
|
||||||
#endif
|
|
||||||
return; // Action already in progress. Purge triggered repeated runout.
|
return; // Action already in progress. Purge triggered repeated runout.
|
||||||
}
|
}
|
||||||
if (migration.automode) {
|
if (migration.automode) {
|
||||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
DEBUG_ECHOLNPGM("Migration Starting");
|
||||||
SERIAL_ECHOLN("Migration Starting");
|
|
||||||
#endif
|
|
||||||
if (extruder_migration()) return;
|
if (extruder_migration()) return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -109,9 +106,7 @@ void event_filament_runout() {
|
||||||
if (run_runout_script
|
if (run_runout_script
|
||||||
&& ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
|
&& ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
|
||||||
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
|
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
|| TERN0(ADVANCED_PAUSE_FEATURE, strstr(FILAMENT_RUNOUT_SCRIPT, "M25"))
|
||||||
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M25")
|
|
||||||
#endif
|
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
host_action_paused(false);
|
host_action_paused(false);
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,13 @@
|
||||||
* position and waits, resuming with a button click or M108.
|
* position and waits, resuming with a button click or M108.
|
||||||
* Without PARK_HEAD_ON_PAUSE the M125 command does nothing.
|
* Without PARK_HEAD_ON_PAUSE the M125 command does nothing.
|
||||||
*
|
*
|
||||||
* L = override retract length
|
* L<linear> = Override retract Length
|
||||||
* X = override X
|
* X<pos> = Override park position X
|
||||||
* Y = override Y
|
* Y<pos> = Override park position Y
|
||||||
* Z = override Z raise
|
* Z<linear> = Override Z raise
|
||||||
|
*
|
||||||
|
* With an LCD menu:
|
||||||
|
* P<bool> = Always show a prompt and await a response
|
||||||
*/
|
*/
|
||||||
void GcodeSuite::M125() {
|
void GcodeSuite::M125() {
|
||||||
// Initial retract before move to filament change position
|
// Initial retract before move to filament change position
|
||||||
|
|
@ -75,7 +78,8 @@ void GcodeSuite::M125() {
|
||||||
|
|
||||||
TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT));
|
TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT));
|
||||||
|
|
||||||
const bool show_lcd = TERN0(HAS_LCD_MENU, parser.seenval('P'));
|
// If possible, show an LCD prompt with the 'P' flag
|
||||||
|
const bool show_lcd = TERN0(HAS_LCD_MENU, parser.boolval('P'));
|
||||||
|
|
||||||
if (pause_print(retract, park_point, 0, show_lcd)) {
|
if (pause_print(retract, park_point, 0, show_lcd)) {
|
||||||
TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true));
|
TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true));
|
||||||
|
|
|
||||||
|
|
@ -754,8 +754,8 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||||
case 511: M511(); break; // M511: Unlock Printer
|
case 511: M511(); break; // M511: Unlock Printer
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(PASSWORD_CHANGE_GCODE)
|
#if ENABLED(PASSWORD_CHANGE_GCODE)
|
||||||
case 512: M512(); break;
|
case 512: M512(); break; // M512: Set/Change/Remove Password
|
||||||
#endif // M512: Set/Change/Remove Password
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
persistentStore.access_finish();
|
persistentStore.access_finish();
|
||||||
#else
|
#else
|
||||||
SERIAL_ECHOLN("NO EEPROM");
|
SERIAL_ECHOLNPGM("NO EEPROM");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
persistentStore.access_finish();
|
persistentStore.access_finish();
|
||||||
#else
|
#else
|
||||||
SERIAL_ECHOLN("NO EEPROM");
|
SERIAL_ECHOLNPGM("NO EEPROM");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
|
|
@ -173,8 +173,8 @@
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case 100: { // D100 Disable heaters and attempt a hard hang (Watchdog Test)
|
case 100: { // D100 Disable heaters and attempt a hard hang (Watchdog Test)
|
||||||
SERIAL_ECHOLN("Disabling heaters and attempting to trigger Watchdog");
|
SERIAL_ECHOLNPGM("Disabling heaters and attempting to trigger Watchdog");
|
||||||
SERIAL_ECHOLN("(USE_WATCHDOG " TERN(USE_WATCHDOG, "ENABLED", "DISABLED") ")");
|
SERIAL_ECHOLNPGM("(USE_WATCHDOG " TERN(USE_WATCHDOG, "ENABLED", "DISABLED") ")");
|
||||||
thermalManager.disable_all_heaters();
|
thermalManager.disable_all_heaters();
|
||||||
delay(1000); // Allow time to print
|
delay(1000); // Allow time to print
|
||||||
DISABLE_ISRS();
|
DISABLE_ISRS();
|
||||||
|
|
@ -183,7 +183,7 @@
|
||||||
// watchdog does not work.
|
// watchdog does not work.
|
||||||
DELAY_US(10000000);
|
DELAY_US(10000000);
|
||||||
ENABLE_ISRS();
|
ENABLE_ISRS();
|
||||||
SERIAL_ECHOLN("FAILURE: Watchdog did not trigger board reset.");
|
SERIAL_ECHOLNPGM("FAILURE: Watchdog did not trigger board reset.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,9 @@ void GcodeSuite::M118() {
|
||||||
if (WITHIN(port, 0, NUM_SERIAL))
|
if (WITHIN(port, 0, NUM_SERIAL))
|
||||||
serial_port_index = (
|
serial_port_index = (
|
||||||
port == 0 ? SERIAL_BOTH
|
port == 0 ? SERIAL_BOTH
|
||||||
: port == 1 ? SERIAL_PORT
|
: port == 1 ? 0
|
||||||
#ifdef SERIAL_PORT_2
|
#if HAS_MULTI_SERIAL
|
||||||
: port == 2 ? SERIAL_PORT_2
|
: port == 2 ? 1
|
||||||
#endif
|
#endif
|
||||||
: SERIAL_PORT
|
: SERIAL_PORT
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,6 @@
|
||||||
|
|
||||||
#include "../MarlinCore.h"
|
#include "../MarlinCore.h"
|
||||||
|
|
||||||
#if HAS_MULTI_SERIAL
|
|
||||||
#include "queue.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Must be declared for allocation and to satisfy the linker
|
// Must be declared for allocation and to satisfy the linker
|
||||||
// Zero values need no initialization.
|
// Zero values need no initialization.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -755,19 +755,7 @@
|
||||||
#define GRID_LOOP(A,B) LOOP_L_N(A, GRID_MAX_POINTS_X) LOOP_L_N(B, GRID_MAX_POINTS_Y)
|
#define GRID_LOOP(A,B) LOOP_L_N(A, GRID_MAX_POINTS_X) LOOP_L_N(B, GRID_MAX_POINTS_Y)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef INVERT_X_DIR
|
// Slim menu optimizations
|
||||||
#define INVERT_X_DIR false
|
|
||||||
#endif
|
|
||||||
#ifndef INVERT_Y_DIR
|
|
||||||
#define INVERT_Y_DIR false
|
|
||||||
#endif
|
|
||||||
#ifndef INVERT_Z_DIR
|
|
||||||
#define INVERT_Z_DIR false
|
|
||||||
#endif
|
|
||||||
#ifndef INVERT_E_DIR
|
|
||||||
#define INVERT_E_DIR false
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(SLIM_LCD_MENUS)
|
#if ENABLED(SLIM_LCD_MENUS)
|
||||||
#define BOOT_MARLIN_LOGO_SMALL
|
#define BOOT_MARLIN_LOGO_SMALL
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -786,14 +774,105 @@
|
||||||
#define HAS_CLASSIC_E_JERK 1
|
#define HAS_CLASSIC_E_JERK 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SPI_SPEED
|
|
||||||
#define SPI_SPEED SPI_FULL_SPEED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SERIAL_PORT == -1 || SERIAL_PORT_2 == -1
|
#if SERIAL_PORT == -1 || SERIAL_PORT_2 == -1
|
||||||
#define HAS_USB_SERIAL 1
|
#define HAS_USB_SERIAL 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Fallback Stepper Driver types
|
||||||
|
#ifndef X_DRIVER_TYPE
|
||||||
|
#define X_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#ifndef Y_DRIVER_TYPE
|
||||||
|
#define Y_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#ifndef Z_DRIVER_TYPE
|
||||||
|
#define Z_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if NONE(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
|
||||||
|
#undef X2_DRIVER_TYPE
|
||||||
|
#elif !defined(X2_DRIVER_TYPE)
|
||||||
|
#define X2_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if DISABLED(Y_DUAL_STEPPER_DRIVERS)
|
||||||
|
#undef Y2_DRIVER_TYPE
|
||||||
|
#elif !defined(Y2_DRIVER_TYPE)
|
||||||
|
#define Y2_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if NUM_Z_STEPPER_DRIVERS < 2
|
||||||
|
#undef Z2_DRIVER_TYPE
|
||||||
|
#elif !defined(Z2_DRIVER_TYPE)
|
||||||
|
#define Z2_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if NUM_Z_STEPPER_DRIVERS < 3
|
||||||
|
#undef Z3_DRIVER_TYPE
|
||||||
|
#elif !defined(Z3_DRIVER_TYPE)
|
||||||
|
#define Z3_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if NUM_Z_STEPPER_DRIVERS < 4
|
||||||
|
#undef Z4_DRIVER_TYPE
|
||||||
|
#elif !defined(Z4_DRIVER_TYPE)
|
||||||
|
#define Z4_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if E_STEPPERS < 1
|
||||||
|
#undef E0_DRIVER_TYPE
|
||||||
|
#elif !defined(E0_DRIVER_TYPE)
|
||||||
|
#define E0_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if E_STEPPERS < 2
|
||||||
|
#undef E1_DRIVER_TYPE
|
||||||
|
#elif !defined(E1_DRIVER_TYPE)
|
||||||
|
#define E1_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if E_STEPPERS < 3
|
||||||
|
#undef E2_DRIVER_TYPE
|
||||||
|
#elif !defined(E2_DRIVER_TYPE)
|
||||||
|
#define E2_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if E_STEPPERS < 4
|
||||||
|
#undef E3_DRIVER_TYPE
|
||||||
|
#elif !defined(E3_DRIVER_TYPE)
|
||||||
|
#define E3_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if E_STEPPERS < 5
|
||||||
|
#undef E4_DRIVER_TYPE
|
||||||
|
#elif !defined(E4_DRIVER_TYPE)
|
||||||
|
#define E4_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if E_STEPPERS < 6
|
||||||
|
#undef E5_DRIVER_TYPE
|
||||||
|
#elif !defined(E5_DRIVER_TYPE)
|
||||||
|
#define E5_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if E_STEPPERS < 7
|
||||||
|
#undef E6_DRIVER_TYPE
|
||||||
|
#elif !defined(E6_DRIVER_TYPE)
|
||||||
|
#define E6_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
#if E_STEPPERS < 8
|
||||||
|
#undef E7_DRIVER_TYPE
|
||||||
|
#elif !defined(E7_DRIVER_TYPE)
|
||||||
|
#define E7_DRIVER_TYPE A4988
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Fallback axis inverting
|
||||||
|
#ifndef INVERT_X_DIR
|
||||||
|
#define INVERT_X_DIR false
|
||||||
|
#endif
|
||||||
|
#ifndef INVERT_Y_DIR
|
||||||
|
#define INVERT_Y_DIR false
|
||||||
|
#endif
|
||||||
|
#ifndef INVERT_Z_DIR
|
||||||
|
#define INVERT_Z_DIR false
|
||||||
|
#endif
|
||||||
|
#ifndef INVERT_E_DIR
|
||||||
|
#define INVERT_E_DIR false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Fallback SPI Speed
|
||||||
|
#ifndef SPI_SPEED
|
||||||
|
#define SPI_SPEED SPI_FULL_SPEED
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This setting is also used by M109 when trying to calculate
|
* This setting is also used by M109 when trying to calculate
|
||||||
* a ballpark safe margin to prevent wait-forever situation.
|
* a ballpark safe margin to prevent wait-forever situation.
|
||||||
|
|
|
||||||
|
|
@ -3179,5 +3179,59 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sanity check for valid stepper driver types
|
||||||
|
*/
|
||||||
|
#define _BAD_DRIVER(A) (defined(A##_DRIVER_TYPE) && !_DRIVER_ID(A##_DRIVER_TYPE))
|
||||||
|
#if _BAD_DRIVER(X)
|
||||||
|
#error "X_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(Y)
|
||||||
|
#error "Y_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(Z)
|
||||||
|
#error "Z_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(X2)
|
||||||
|
#error "X2_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(Y2)
|
||||||
|
#error "Y2_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(Z2)
|
||||||
|
#error "Z2_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(Z3)
|
||||||
|
#error "Z3_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(Z4)
|
||||||
|
#error "Z4_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(E0)
|
||||||
|
#error "E0_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(E1)
|
||||||
|
#error "E1_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(E2)
|
||||||
|
#error "E2_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(E3)
|
||||||
|
#error "E3_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(E4)
|
||||||
|
#error "E4_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(E5)
|
||||||
|
#error "E5_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(E6)
|
||||||
|
#error "E6_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#if _BAD_DRIVER(E7)
|
||||||
|
#error "E7_DRIVER_TYPE is not recognized."
|
||||||
|
#endif
|
||||||
|
#undef _BAD_DRIVER
|
||||||
|
|
||||||
// Misc. Cleanup
|
// Misc. Cleanup
|
||||||
#undef _TEST_PWM
|
#undef _TEST_PWM
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
* version was tagged.
|
* version was tagged.
|
||||||
*/
|
*/
|
||||||
#ifndef STRING_DISTRIBUTION_DATE
|
#ifndef STRING_DISTRIBUTION_DATE
|
||||||
#define STRING_DISTRIBUTION_DATE "2020-10-18"
|
#define STRING_DISTRIBUTION_DATE "2020-10-20"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ namespace Anycubic {
|
||||||
void ChironTFT::SendtoTFTLN(PGM_P str = nullptr) {
|
void ChironTFT::SendtoTFTLN(PGM_P str = nullptr) {
|
||||||
if (str != nullptr) {
|
if (str != nullptr) {
|
||||||
#if ACDEBUG(AC_SOME)
|
#if ACDEBUG(AC_SOME)
|
||||||
SERIAL_ECHO("> ");
|
SERIAL_ECHOPGM("> ");
|
||||||
#endif
|
#endif
|
||||||
SendtoTFT(str);
|
SendtoTFT(str);
|
||||||
#if ACDEBUG(AC_SOME)
|
#if ACDEBUG(AC_SOME)
|
||||||
|
|
|
||||||
|
|
@ -189,12 +189,12 @@ void Touch::touch(touch_control_t *control) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (calibration_state == CALIBRATION_SUCCESS) {
|
if (calibration_state == CALIBRATION_SUCCESS) {
|
||||||
SERIAL_ECHOLN("Touch screen calibration completed");
|
SERIAL_ECHOLNPGM("Touch screen calibration completed");
|
||||||
SERIAL_ECHOLNPAIR("TOUCH_CALIBRATION_X ", calibration.x);
|
SERIAL_ECHOLNPAIR("TOUCH_CALIBRATION_X ", calibration.x);
|
||||||
SERIAL_ECHOLNPAIR("TOUCH_CALIBRATION_Y ", calibration.y);
|
SERIAL_ECHOLNPAIR("TOUCH_CALIBRATION_Y ", calibration.y);
|
||||||
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_X ", calibration.offset_x);
|
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_X ", calibration.offset_x);
|
||||||
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_Y ", calibration.offset_y);
|
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_Y ", calibration.offset_y);
|
||||||
SERIAL_ECHO("TOUCH_ORIENTATION "); if (calibration.orientation == TOUCH_LANDSCAPE) SERIAL_ECHOLN("TOUCH_LANDSCAPE"); else SERIAL_ECHOLN("TOUCH_PORTRAIT");
|
SERIAL_ECHOPGM("TOUCH_ORIENTATION "); if (calibration.orientation == TOUCH_LANDSCAPE) SERIAL_ECHOLNPGM("TOUCH_LANDSCAPE"); else SERIAL_ECHOLNPGM("TOUCH_PORTRAIT");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
|
|
|
||||||
|
|
@ -2296,7 +2296,7 @@ void MarlinSettings::postprocess() {
|
||||||
|
|
||||||
#if ENABLED(EEPROM_CHITCHAT) && DISABLED(DISABLE_M503)
|
#if ENABLED(EEPROM_CHITCHAT) && DISABLED(DISABLE_M503)
|
||||||
// Report the EEPROM settings
|
// Report the EEPROM settings
|
||||||
if (!validating && (DISABLED(EEPROM_BOOT_SILENT) || IsRunning())) report();
|
if (!validating && TERN1(EEPROM_BOOT_SILENT, IsRunning())) report();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EEPROM_FINISH();
|
EEPROM_FINISH();
|
||||||
|
|
|
||||||
|
|
@ -1209,25 +1209,22 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||||
|
|
||||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||||
|
|
||||||
|
#define DEBUG_OUT ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||||
|
#include "../core/debug_out.h"
|
||||||
|
|
||||||
bool extruder_migration() {
|
bool extruder_migration() {
|
||||||
|
|
||||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||||
if (thermalManager.targetTooColdToExtrude(active_extruder)) {
|
if (thermalManager.targetTooColdToExtrude(active_extruder)) {
|
||||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
DEBUG_ECHOLNPGM("Migration Source Too Cold");
|
||||||
SERIAL_ECHOLN("Migration Source Too Cold");
|
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// No auto-migration or specified target?
|
// No auto-migration or specified target?
|
||||||
if (!migration.target && active_extruder >= migration.last) {
|
if (!migration.target && active_extruder >= migration.last) {
|
||||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
DEBUG_ECHO_MSG("No Migration Target");
|
||||||
SERIAL_ECHO_MSG("No Migration Target");
|
DEBUG_ECHO_MSG("Target: ", migration.target, " Last: ", migration.last, " Active: ", active_extruder);
|
||||||
SERIAL_ECHO_MSG("Target: ", migration.target,
|
|
||||||
" Last: ", migration.last,
|
|
||||||
" Active: ", active_extruder);
|
|
||||||
#endif
|
|
||||||
migration.automode = false;
|
migration.automode = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1237,9 +1234,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||||
uint8_t migration_extruder = active_extruder;
|
uint8_t migration_extruder = active_extruder;
|
||||||
|
|
||||||
if (migration.target) {
|
if (migration.target) {
|
||||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
DEBUG_ECHOLNPGM("Migration using fixed target");
|
||||||
SERIAL_ECHOLN("Migration using fixed target");
|
|
||||||
#endif
|
|
||||||
// Specified target ok?
|
// Specified target ok?
|
||||||
const int16_t t = migration.target - 1;
|
const int16_t t = migration.target - 1;
|
||||||
if (t != active_extruder) migration_extruder = t;
|
if (t != active_extruder) migration_extruder = t;
|
||||||
|
|
@ -1248,16 +1243,12 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||||
migration_extruder++;
|
migration_extruder++;
|
||||||
|
|
||||||
if (migration_extruder == active_extruder) {
|
if (migration_extruder == active_extruder) {
|
||||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
DEBUG_ECHOLNPGM("Migration source matches active");
|
||||||
SERIAL_ECHOLN("Migration source matches active");
|
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Migration begins
|
// Migration begins
|
||||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
DEBUG_ECHOLNPGM("Beginning migration");
|
||||||
SERIAL_ECHOLN("Beginning migration");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
migration.in_progress = true; // Prevent runout script
|
migration.in_progress = true; // Prevent runout script
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
@ -1303,9 +1294,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||||
|
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
planner.set_e_position_mm(current_position.e); // New extruder primed and ready
|
planner.set_e_position_mm(current_position.e); // New extruder primed and ready
|
||||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
DEBUG_ECHOLNPGM("Migration Complete");
|
||||||
SERIAL_ECHOLN("Migration Complete");
|
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@
|
||||||
#include "../inc/MarlinConfigPre.h"
|
#include "../inc/MarlinConfigPre.h"
|
||||||
#include "../core/types.h"
|
#include "../core/types.h"
|
||||||
|
|
||||||
|
//#define DEBUG_TOOLCHANGE_MIGRATION_FEATURE
|
||||||
|
|
||||||
#if HAS_MULTI_EXTRUDER
|
#if HAS_MULTI_EXTRUDER
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,6 @@
|
||||||
//#define MARLIN_EEPROM_SIZE 0x1000UL // 4KB
|
//#define MARLIN_EEPROM_SIZE 0x1000UL // 4KB
|
||||||
//#define MARLIN_EEPROM_SIZE (EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE) * 2UL)
|
//#define MARLIN_EEPROM_SIZE (EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE) * 2UL)
|
||||||
|
|
||||||
//#define EEPROM_CHITCHAT
|
|
||||||
//#define DEBUG_EEPROM_READWRITE
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Limit Switches
|
// Limit Switches
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -112,11 +112,10 @@ exec_test $1 $2 "Teensy 3.5/3.6 COREXZ"
|
||||||
#
|
#
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_TEENSY35_36
|
opt_set MOTHERBOARD BOARD_TEENSY35_36
|
||||||
opt_enable Z_MULTI_ENDSTOPS
|
|
||||||
opt_set NUM_Z_STEPPER_DRIVERS 2
|
opt_set NUM_Z_STEPPER_DRIVERS 2
|
||||||
|
opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
|
||||||
pins_set ramps/RAMPS X_MAX_PIN -1
|
pins_set ramps/RAMPS X_MAX_PIN -1
|
||||||
opt_add Z2_MAX_PIN 2
|
opt_add Z2_MAX_PIN 2
|
||||||
opt_enable USE_XMAX_PLUG
|
|
||||||
exec_test $1 $2 "Dual Z with Dual Z endstops"
|
exec_test $1 $2 "Dual Z with Dual Z endstops"
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ exec_test $1 $2 "Sled Z Probe with Linear leveling"
|
||||||
# exec_test $1 $2 "...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES"
|
# exec_test $1 $2 "...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test MAGNETIC_PARKING_EXTRUDER with LCD
|
# Test MAGNETIC_PARKING_EXTRUDER with no LCD
|
||||||
#
|
#
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_TEENSY41
|
opt_set MOTHERBOARD BOARD_TEENSY41
|
||||||
|
|
@ -113,11 +113,10 @@ exec_test $1 $2 "Teensy 4.0/4.1 COREXZ"
|
||||||
#
|
#
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_TEENSY41
|
opt_set MOTHERBOARD BOARD_TEENSY41
|
||||||
opt_enable Z_MULTI_ENDSTOPS
|
opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
|
||||||
opt_set NUM_Z_STEPPER_DRIVERS 2
|
opt_set NUM_Z_STEPPER_DRIVERS 2
|
||||||
pins_set ramps/RAMPS X_MAX_PIN -1
|
pins_set ramps/RAMPS X_MAX_PIN -1
|
||||||
opt_add Z2_MAX_PIN 2
|
opt_add Z2_MAX_PIN 2
|
||||||
opt_enable USE_XMAX_PLUG
|
|
||||||
exec_test $1 $2 "Dual Z with Dual Z endstops"
|
exec_test $1 $2 "Dual Z with Dual Z endstops"
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue