Use PGM serial strings
This commit is contained in:
parent
ea80b2c8fc
commit
21ce39aa9b
|
@ -40,8 +40,9 @@ bool FilamentMonitorBase::enabled = true,
|
|||
#endif
|
||||
|
||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||
//#define DEBUG_TOOLCHANGE_MIGRATION_FEATURE
|
||||
#include "../module/tool_change.h"
|
||||
#define DEBUG_OUT ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
#include "../core/debug_out.h"
|
||||
#endif
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
|
@ -74,15 +75,11 @@ void event_filament_runout() {
|
|||
|
||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||
if (migration.in_progress) {
|
||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOLN("Migration Already In Progress");
|
||||
#endif
|
||||
DEBUG_ECHOLNPGM("Migration Already In Progress");
|
||||
return; // Action already in progress. Purge triggered repeated runout.
|
||||
}
|
||||
if (migration.automode) {
|
||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOLN("Migration Starting");
|
||||
#endif
|
||||
DEBUG_ECHOLNPGM("Migration Starting");
|
||||
if (extruder_migration()) return;
|
||||
}
|
||||
#endif
|
||||
|
@ -109,9 +106,7 @@ void event_filament_runout() {
|
|||
if (run_runout_script
|
||||
&& ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
|
||||
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M25")
|
||||
#endif
|
||||
|| TERN0(ADVANCED_PAUSE_FEATURE, strstr(FILAMENT_RUNOUT_SCRIPT, "M25"))
|
||||
)
|
||||
) {
|
||||
host_action_paused(false);
|
||||
|
|
|
@ -754,8 +754,8 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
|||
case 511: M511(); break; // M511: Unlock Printer
|
||||
#endif
|
||||
#if ENABLED(PASSWORD_CHANGE_GCODE)
|
||||
case 512: M512(); break;
|
||||
#endif // M512: Set/Change/Remove Password
|
||||
case 512: M512(); break; // M512: Set/Change/Remove Password
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
|
|
@ -294,7 +294,7 @@ namespace Anycubic {
|
|||
void ChironTFT::SendtoTFTLN(PGM_P str = nullptr) {
|
||||
if (str != nullptr) {
|
||||
#if ACDEBUG(AC_SOME)
|
||||
SERIAL_ECHO("> ");
|
||||
SERIAL_ECHOPGM("> ");
|
||||
#endif
|
||||
SendtoTFT(str);
|
||||
#if ACDEBUG(AC_SOME)
|
||||
|
|
|
@ -189,12 +189,12 @@ void Touch::touch(touch_control_t *control) {
|
|||
}
|
||||
|
||||
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_Y ", calibration.y);
|
||||
SERIAL_ECHOLNPAIR("TOUCH_OFFSET_X ", calibration.offset_x);
|
||||
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;
|
||||
default: break;
|
||||
|
|
|
@ -1209,25 +1209,22 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
|||
|
||||
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
|
||||
|
||||
#define DEBUG_OUT ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
#include "../core/debug_out.h"
|
||||
|
||||
bool extruder_migration() {
|
||||
|
||||
#if ENABLED(PREVENT_COLD_EXTRUSION)
|
||||
if (thermalManager.targetTooColdToExtrude(active_extruder)) {
|
||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOLN("Migration Source Too Cold");
|
||||
#endif
|
||||
DEBUG_ECHOLNPGM("Migration Source Too Cold");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// No auto-migration or specified target?
|
||||
if (!migration.target && active_extruder >= migration.last) {
|
||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHO_MSG("No Migration Target");
|
||||
SERIAL_ECHO_MSG("Target: ", migration.target,
|
||||
" Last: ", migration.last,
|
||||
" Active: ", active_extruder);
|
||||
#endif
|
||||
DEBUG_ECHO_MSG("No Migration Target");
|
||||
DEBUG_ECHO_MSG("Target: ", migration.target, " Last: ", migration.last, " Active: ", active_extruder);
|
||||
migration.automode = 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;
|
||||
|
||||
if (migration.target) {
|
||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOLN("Migration using fixed target");
|
||||
#endif
|
||||
DEBUG_ECHOLNPGM("Migration using fixed target");
|
||||
// Specified target ok?
|
||||
const int16_t t = migration.target - 1;
|
||||
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++;
|
||||
|
||||
if (migration_extruder == active_extruder) {
|
||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOLN("Migration source matches active");
|
||||
#endif
|
||||
DEBUG_ECHOLNPGM("Migration source matches active");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Migration begins
|
||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOLN("Beginning migration");
|
||||
#endif
|
||||
DEBUG_ECHOLNPGM("Beginning migration");
|
||||
|
||||
migration.in_progress = true; // Prevent runout script
|
||||
planner.synchronize();
|
||||
|
@ -1303,9 +1294,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
|||
|
||||
planner.synchronize();
|
||||
planner.set_e_position_mm(current_position.e); // New extruder primed and ready
|
||||
#if ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
|
||||
SERIAL_ECHOLN("Migration Complete");
|
||||
#endif
|
||||
DEBUG_ECHOLNPGM("Migration Complete");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include "../inc/MarlinConfigPre.h"
|
||||
#include "../core/types.h"
|
||||
|
||||
//#define DEBUG_TOOLCHANGE_MIGRATION_FEATURE
|
||||
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Reference in a new issue