🎨 Apply F() to G-code subcommands
This commit is contained in:
parent
433a27e475
commit
2b9ae0cc33
@ -281,8 +281,8 @@ bool unified_bed_leveling::sanity_check() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
process_subcommands_now_P(G28_STR); // Home
|
process_subcommands_now(FPSTR(G28_STR)); // Home
|
||||||
process_subcommands_now_P(PSTR(ALIGN_GCODE "\n" // Align multi z axis if available
|
process_subcommands_now(F(ALIGN_GCODE "\n" // Align multi z axis if available
|
||||||
PROBE_GCODE "\n" // Build mesh with available hardware
|
PROBE_GCODE "\n" // Build mesh with available hardware
|
||||||
"G29P3\nG29P3")); // Ensure mesh is complete by running smart fill twice
|
"G29P3\nG29P3")); // Ensure mesh is complete by running smart fill twice
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ bool unified_bed_leveling::sanity_check() {
|
|||||||
queue.inject(umw_gcode);
|
queue.inject(umw_gcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
process_subcommands_now_P(PSTR("G29A\nG29F10\n" // Set UBL Active & Fade 10
|
process_subcommands_now(F("G29A\nG29F10\n" // Set UBL Active & Fade 10
|
||||||
"M140S0\nM104S0\n" // Turn off heaters
|
"M140S0\nM104S0\n" // Turn off heaters
|
||||||
"M500")); // Store settings
|
"M500")); // Store settings
|
||||||
}
|
}
|
||||||
|
@ -656,7 +656,7 @@ void unified_bed_leveling::G29() {
|
|||||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
||||||
if (probe_deployed) {
|
if (probe_deployed) {
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
gcode.process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT));
|
gcode.process_subcommands_now(F(Z_PROBE_END_SCRIPT));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
UNUSED(probe_deployed);
|
UNUSED(probe_deployed);
|
||||||
|
@ -82,7 +82,7 @@ void Power::power_on() {
|
|||||||
TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY));
|
TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY));
|
||||||
|
|
||||||
#ifdef PSU_POWERUP_GCODE
|
#ifdef PSU_POWERUP_GCODE
|
||||||
GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWERUP_GCODE));
|
gcode.process_subcommands_now(F(PSU_POWERUP_GCODE));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ void Power::power_off() {
|
|||||||
if (!psu_on) return;
|
if (!psu_on) return;
|
||||||
|
|
||||||
#ifdef PSU_POWEROFF_GCODE
|
#ifdef PSU_POWEROFF_GCODE
|
||||||
GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE));
|
gcode.process_subcommands_now(F(PSU_POWEROFF_GCODE));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(PS_OFF_SOUND)
|
#if ENABLED(PS_OFF_SOUND)
|
||||||
|
@ -244,7 +244,7 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POW
|
|||||||
|
|
||||||
#if POWER_LOSS_RETRACT_LEN
|
#if POWER_LOSS_RETRACT_LEN
|
||||||
// Retract filament now
|
// Retract filament now
|
||||||
gcode.process_subcommands_now_P(PSTR("G1 F3000 E-" STRINGIFY(POWER_LOSS_RETRACT_LEN)));
|
gcode.process_subcommands_now(F("G1 F3000 E-" STRINGIFY(POWER_LOSS_RETRACT_LEN)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if POWER_LOSS_ZRAISE
|
#if POWER_LOSS_ZRAISE
|
||||||
@ -337,7 +337,7 @@ void PrintJobRecovery::resume() {
|
|||||||
|
|
||||||
#if HAS_LEVELING
|
#if HAS_LEVELING
|
||||||
// Make sure leveling is off before any G92 and G28
|
// Make sure leveling is off before any G92 and G28
|
||||||
gcode.process_subcommands_now_P(PSTR("M420 S0 Z0"));
|
gcode.process_subcommands_now(F("M420 S0 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_HEATED_BED
|
#if HAS_HEATED_BED
|
||||||
@ -373,7 +373,7 @@ void PrintJobRecovery::resume() {
|
|||||||
// establish the current position as best we can.
|
// establish the current position as best we can.
|
||||||
//
|
//
|
||||||
|
|
||||||
gcode.process_subcommands_now_P(PSTR("G92.9E0")); // Reset E to 0
|
gcode.process_subcommands_now(F("G92.9E0")); // Reset E to 0
|
||||||
|
|
||||||
#if Z_HOME_TO_MAX
|
#if Z_HOME_TO_MAX
|
||||||
|
|
||||||
@ -410,7 +410,7 @@ void PrintJobRecovery::resume() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Home XY with no Z raise, and also home Z here if Z isn't homing down below.
|
// Home XY with no Z raise, and also home Z here if Z isn't homing down below.
|
||||||
gcode.process_subcommands_now_P(PSTR("G28R0" TERN_(HOME_XY_ONLY, "XY"))); // No raise during G28
|
gcode.process_subcommands_now(F("G28R0" TERN_(HOME_XY_ONLY, "XY"))); // No raise during G28
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -513,7 +513,7 @@ void PrintJobRecovery::resume() {
|
|||||||
|
|
||||||
// Un-retract if there was a retract at outage
|
// Un-retract if there was a retract at outage
|
||||||
#if ENABLED(BACKUP_POWER_SUPPLY) && POWER_LOSS_RETRACT_LEN > 0
|
#if ENABLED(BACKUP_POWER_SUPPLY) && POWER_LOSS_RETRACT_LEN > 0
|
||||||
gcode.process_subcommands_now_P(PSTR("G1E" STRINGIFY(POWER_LOSS_RETRACT_LEN) "F3000"));
|
gcode.process_subcommands_now(F("G1E" STRINGIFY(POWER_LOSS_RETRACT_LEN) "F3000"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Additional purge on resume if configured
|
// Additional purge on resume if configured
|
||||||
@ -523,7 +523,7 @@ void PrintJobRecovery::resume() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||||
gcode.process_subcommands_now_P(PSTR("G12"));
|
gcode.process_subcommands_now(F("G12"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Move back over to the saved XY
|
// Move back over to the saved XY
|
||||||
|
@ -92,7 +92,7 @@ void GcodeSuite::G35() {
|
|||||||
TERN_(HAS_DUPLICATION_MODE, set_duplication_enabled(false));
|
TERN_(HAS_DUPLICATION_MODE, set_duplication_enabled(false));
|
||||||
|
|
||||||
// Home only Z axis when X and Y is trusted, otherwise all axes, if needed before this procedure
|
// Home only Z axis when X and Y is trusted, otherwise all axes, if needed before this procedure
|
||||||
if (!all_axes_trusted()) process_subcommands_now_P(PSTR("G28Z"));
|
if (!all_axes_trusted()) process_subcommands_now(F("G28Z"));
|
||||||
|
|
||||||
bool err_break = false;
|
bool err_break = false;
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ G29_TYPE GcodeSuite::G29() {
|
|||||||
|
|
||||||
// Send 'N' to force homing before G29 (internal only)
|
// Send 'N' to force homing before G29 (internal only)
|
||||||
if (parser.seen_test('N'))
|
if (parser.seen_test('N'))
|
||||||
process_subcommands_now_P(TERN(CAN_SET_LEVELING_AFTER_G28, PSTR("G28L0"), G28_STR));
|
process_subcommands_now(TERN(CAN_SET_LEVELING_AFTER_G28, F("G28L0"), FPSTR(G28_STR)));
|
||||||
|
|
||||||
// Don't allow auto-leveling without homing first
|
// Don't allow auto-leveling without homing first
|
||||||
if (homing_needed_error()) G29_RETURN(false);
|
if (homing_needed_error()) G29_RETURN(false);
|
||||||
@ -882,7 +882,7 @@ G29_TYPE GcodeSuite::G29() {
|
|||||||
#ifdef Z_PROBE_END_SCRIPT
|
#ifdef Z_PROBE_END_SCRIPT
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT));
|
process_subcommands_now(F(Z_PROBE_END_SCRIPT));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedLeveling());
|
TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedLeveling());
|
||||||
|
@ -47,7 +47,7 @@ void GcodeSuite::G34() {
|
|||||||
TemporaryGlobalEndstopsState unlock_z(false);
|
TemporaryGlobalEndstopsState unlock_z(false);
|
||||||
|
|
||||||
#ifdef GANTRY_CALIBRATION_COMMANDS_PRE
|
#ifdef GANTRY_CALIBRATION_COMMANDS_PRE
|
||||||
gcode.process_subcommands_now_P(PSTR(GANTRY_CALIBRATION_COMMANDS_PRE));
|
process_subcommands_now(F(GANTRY_CALIBRATION_COMMANDS_PRE));
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Sub Commands Processed");
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Sub Commands Processed");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ void GcodeSuite::G34() {
|
|||||||
|
|
||||||
#ifdef GANTRY_CALIBRATION_COMMANDS_POST
|
#ifdef GANTRY_CALIBRATION_COMMANDS_POST
|
||||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Running Post Commands");
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Running Post Commands");
|
||||||
gcode.process_subcommands_now_P(PSTR(GANTRY_CALIBRATION_COMMANDS_POST));
|
process_subcommands_now(F(GANTRY_CALIBRATION_COMMANDS_POST));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SET_SOFT_ENDSTOP_LOOSE(false);
|
SET_SOFT_ENDSTOP_LOOSE(false);
|
||||||
|
@ -433,7 +433,7 @@ void GcodeSuite::G34() {
|
|||||||
// After this operation the z position needs correction
|
// After this operation the z position needs correction
|
||||||
set_axis_never_homed(Z_AXIS);
|
set_axis_never_homed(Z_AXIS);
|
||||||
// Home Z after the alignment procedure
|
// Home Z after the alignment procedure
|
||||||
process_subcommands_now_P(PSTR("G28Z"));
|
process_subcommands_now(F("G28Z"));
|
||||||
#else
|
#else
|
||||||
// Use the probed height from the last iteration to determine the Z height.
|
// Use the probed height from the last iteration to determine the Z height.
|
||||||
// z_measured_min is used, because all steppers are aligned to z_measured_min.
|
// z_measured_min is used, because all steppers are aligned to z_measured_min.
|
||||||
|
@ -709,7 +709,7 @@ inline void calibrate_all() {
|
|||||||
void GcodeSuite::G425() {
|
void GcodeSuite::G425() {
|
||||||
|
|
||||||
#ifdef CALIBRATION_SCRIPT_PRE
|
#ifdef CALIBRATION_SCRIPT_PRE
|
||||||
GcodeSuite::process_subcommands_now_P(PSTR(CALIBRATION_SCRIPT_PRE));
|
process_subcommands_now(F(CALIBRATION_SCRIPT_PRE));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (homing_needed_error()) return;
|
if (homing_needed_error()) return;
|
||||||
@ -745,7 +745,7 @@ void GcodeSuite::G425() {
|
|||||||
SET_SOFT_ENDSTOP_LOOSE(false);
|
SET_SOFT_ENDSTOP_LOOSE(false);
|
||||||
|
|
||||||
#ifdef CALIBRATION_SCRIPT_POST
|
#ifdef CALIBRATION_SCRIPT_POST
|
||||||
GcodeSuite::process_subcommands_now_P(PSTR(CALIBRATION_SCRIPT_POST));
|
process_subcommands_now(F(CALIBRATION_SCRIPT_POST));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ void GcodeSuite::G76() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
process_subcommands_now_P(G28_STR);
|
process_subcommands_now(FPSTR(G28_STR));
|
||||||
}
|
}
|
||||||
|
|
||||||
remember_feedrate_scaling_off();
|
remember_feedrate_scaling_off();
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
set_duplication_enabled(false);
|
set_duplication_enabled(false);
|
||||||
|
|
||||||
#ifdef EVENT_GCODE_IDEX_AFTER_MODECHANGE
|
#ifdef EVENT_GCODE_IDEX_AFTER_MODECHANGE
|
||||||
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_IDEX_AFTER_MODECHANGE));
|
process_subcommands_now(F(EVENT_GCODE_IDEX_AFTER_MODECHANGE));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (!parser.seen('W')) // if no S or W parameter, the DXC mode gets reset to the user's default
|
else if (!parser.seen('W')) // if no S or W parameter, the DXC mode gets reset to the user's default
|
||||||
|
@ -138,10 +138,10 @@ void GcodeSuite::M916() {
|
|||||||
do {
|
do {
|
||||||
// turn the motor(s) both directions
|
// turn the motor(s) both directions
|
||||||
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate));
|
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate));
|
||||||
gcode.process_subcommands_now_P(gcode_string);
|
process_subcommands_now(gcode_string);
|
||||||
|
|
||||||
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_max), uint16_t(final_feedrate));
|
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_max), uint16_t(final_feedrate));
|
||||||
gcode.process_subcommands_now_P(gcode_string);
|
process_subcommands_now(gcode_string);
|
||||||
|
|
||||||
// get the status after the motors have stopped
|
// get the status after the motors have stopped
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
@ -266,10 +266,10 @@ void GcodeSuite::M917() {
|
|||||||
DEBUG_ECHOLNPGM(" OCD threshold : ", (OCD_TH_val + 1) * 375);
|
DEBUG_ECHOLNPGM(" OCD threshold : ", (OCD_TH_val + 1) * 375);
|
||||||
|
|
||||||
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate));
|
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate));
|
||||||
gcode.process_subcommands_now_P(gcode_string);
|
process_subcommands_now(gcode_string);
|
||||||
|
|
||||||
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_max), uint16_t(final_feedrate));
|
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_max), uint16_t(final_feedrate));
|
||||||
gcode.process_subcommands_now_P(gcode_string);
|
process_subcommands_now(gcode_string);
|
||||||
|
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
||||||
@ -308,7 +308,7 @@ void GcodeSuite::M917() {
|
|||||||
L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold);
|
L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold);
|
||||||
}
|
}
|
||||||
DEBUG_ECHOLNPGM(".");
|
DEBUG_ECHOLNPGM(".");
|
||||||
gcode.reset_stepper_timeout(); // keep steppers powered
|
reset_stepper_timeout(); // keep steppers powered
|
||||||
watchdog_refresh();
|
watchdog_refresh();
|
||||||
safe_delay(5000);
|
safe_delay(5000);
|
||||||
status_composite_temp = 0;
|
status_composite_temp = 0;
|
||||||
@ -615,10 +615,10 @@ void GcodeSuite::M918() {
|
|||||||
DEBUG_ECHOLNPGM("...feedrate = ", current_feedrate);
|
DEBUG_ECHOLNPGM("...feedrate = ", current_feedrate);
|
||||||
|
|
||||||
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(current_feedrate));
|
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(current_feedrate));
|
||||||
gcode.process_subcommands_now_P(gcode_string);
|
process_subcommands_now(gcode_string);
|
||||||
|
|
||||||
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_max), uint16_t(current_feedrate));
|
sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_max), uint16_t(current_feedrate));
|
||||||
gcode.process_subcommands_now_P(gcode_string);
|
process_subcommands_now(gcode_string);
|
||||||
|
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ void GcodeSuite::G12() {
|
|||||||
|
|
||||||
#ifdef WIPE_SEQUENCE_COMMANDS
|
#ifdef WIPE_SEQUENCE_COMMANDS
|
||||||
if (!parser.seen_any()) {
|
if (!parser.seen_any()) {
|
||||||
gcode.process_subcommands_now_P(PSTR(WIPE_SEQUENCE_COMMANDS));
|
process_subcommands_now(F(WIPE_SEQUENCE_COMMANDS));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -243,7 +243,7 @@ void GcodeSuite::dwell(millis_t time) {
|
|||||||
host_action(PSTR(ACTION_ON_G29_RECOVER));
|
host_action(PSTR(ACTION_ON_G29_RECOVER));
|
||||||
#endif
|
#endif
|
||||||
#ifdef G29_RECOVER_COMMANDS
|
#ifdef G29_RECOVER_COMMANDS
|
||||||
process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS));
|
process_subcommands_now(F(G29_RECOVER_COMMANDS));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ void GcodeSuite::dwell(millis_t time) {
|
|||||||
host_action(PSTR(ACTION_ON_G29_FAILURE));
|
host_action(PSTR(ACTION_ON_G29_FAILURE));
|
||||||
#endif
|
#endif
|
||||||
#ifdef G29_FAILURE_COMMANDS
|
#ifdef G29_FAILURE_COMMANDS
|
||||||
process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS));
|
process_subcommands_now(F(G29_FAILURE_COMMANDS));
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(G29_HALT_ON_FAILURE)
|
#if ENABLED(G29_HALT_ON_FAILURE)
|
||||||
#ifdef ACTION_ON_CANCEL
|
#ifdef ACTION_ON_CANCEL
|
||||||
@ -286,7 +286,7 @@ void GcodeSuite::dwell(millis_t time) {
|
|||||||
TERN_(HOST_PROMPT_SUPPORT, host_action_prompt_end());
|
TERN_(HOST_PROMPT_SUPPORT, host_action_prompt_end());
|
||||||
|
|
||||||
#ifdef G29_SUCCESS_COMMANDS
|
#ifdef G29_SUCCESS_COMMANDS
|
||||||
process_subcommands_now_P(PSTR(G29_SUCCESS_COMMANDS));
|
process_subcommands_now(F(G29_SUCCESS_COMMANDS));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1101,7 +1101,8 @@ void GcodeSuite::process_next_command() {
|
|||||||
* G-code "macros" to be called from within other G-code handlers.
|
* G-code "macros" to be called from within other G-code handlers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void GcodeSuite::process_subcommands_now_P(PGM_P pgcode) {
|
void GcodeSuite::process_subcommands_now(FSTR_P fgcode) {
|
||||||
|
PGM_P pgcode = FTOP(fgcode);
|
||||||
char * const saved_cmd = parser.command_ptr; // Save the parser state
|
char * const saved_cmd = parser.command_ptr; // Save the parser state
|
||||||
for (;;) {
|
for (;;) {
|
||||||
PGM_P const delim = strchr_P(pgcode, '\n'); // Get address of next newline
|
PGM_P const delim = strchr_P(pgcode, '\n'); // Get address of next newline
|
||||||
|
@ -397,11 +397,11 @@ public:
|
|||||||
static void process_next_command();
|
static void process_next_command();
|
||||||
|
|
||||||
// Execute G-code in-place, preserving current G-code parameters
|
// Execute G-code in-place, preserving current G-code parameters
|
||||||
static void process_subcommands_now_P(PGM_P pgcode);
|
static void process_subcommands_now(FSTR_P fgcode);
|
||||||
static void process_subcommands_now(char * gcode);
|
static void process_subcommands_now(char * gcode);
|
||||||
|
|
||||||
static inline void home_all_axes(const bool keep_leveling=false) {
|
static inline void home_all_axes(const bool keep_leveling=false) {
|
||||||
process_subcommands_now_P(keep_leveling ? G28_STR : TERN(CAN_SET_LEVELING_AFTER_G28, PSTR("G28L0"), G28_STR));
|
process_subcommands_now(keep_leveling ? FPSTR(G28_STR) : TERN(CAN_SET_LEVELING_AFTER_G28, F("G28L0"), FPSTR(G28_STR)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
|
#if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE)
|
||||||
|
@ -403,7 +403,7 @@ void GcodeSuite::G2_G3(const bool clockwise) {
|
|||||||
else {
|
else {
|
||||||
#if ENABLED(CNC_WORKSPACE_PLANES)
|
#if ENABLED(CNC_WORKSPACE_PLANES)
|
||||||
char achar, bchar;
|
char achar, bchar;
|
||||||
switch (gcode.workspace_plane) {
|
switch (workspace_plane) {
|
||||||
default:
|
default:
|
||||||
case GcodeSuite::PLANE_XY: achar = 'I'; bchar = 'J'; break;
|
case GcodeSuite::PLANE_XY: achar = 'I'; bchar = 'J'; break;
|
||||||
case GcodeSuite::PLANE_YZ: achar = 'J'; bchar = 'K'; break;
|
case GcodeSuite::PLANE_YZ: achar = 'J'; bchar = 'K'; break;
|
||||||
|
@ -693,8 +693,8 @@ void GCodeQueue::advance() {
|
|||||||
|
|
||||||
void GCodeQueue::report_buffer_statistics() {
|
void GCodeQueue::report_buffer_statistics() {
|
||||||
SERIAL_ECHOLNPGM("D576"
|
SERIAL_ECHOLNPGM("D576"
|
||||||
" P:", planner.moves_free(), " ", -queue.planner_buffer_underruns, " (", queue.max_planner_buffer_empty_duration, ")"
|
" P:", planner.moves_free(), " ", -planner_buffer_underruns, " (", max_planner_buffer_empty_duration, ")"
|
||||||
" B:", BUFSIZE - ring_buffer.length, " ", -queue.command_buffer_underruns, " (", queue.max_command_buffer_empty_duration, ")"
|
" B:", BUFSIZE - ring_buffer.length, " ", -command_buffer_underruns, " (", max_command_buffer_empty_duration, ")"
|
||||||
);
|
);
|
||||||
command_buffer_underruns = planner_buffer_underruns = 0;
|
command_buffer_underruns = planner_buffer_underruns = 0;
|
||||||
max_command_buffer_empty_duration = max_planner_buffer_empty_duration = 0;
|
max_command_buffer_empty_duration = max_planner_buffer_empty_duration = 0;
|
||||||
@ -717,8 +717,8 @@ void GCodeQueue::advance() {
|
|||||||
NOLESS(max_planner_buffer_empty_duration, planner_buffer_empty_duration); // if it's longer than the currently tracked max duration, replace it
|
NOLESS(max_planner_buffer_empty_duration, planner_buffer_empty_duration); // if it's longer than the currently tracked max duration, replace it
|
||||||
}
|
}
|
||||||
|
|
||||||
if (queue.auto_buffer_report_interval && ELAPSED(ms, queue.next_buffer_report_ms)) {
|
if (auto_buffer_report_interval && ELAPSED(ms, next_buffer_report_ms)) {
|
||||||
queue.next_buffer_report_ms = ms + 1000UL * queue.auto_buffer_report_interval;
|
next_buffer_report_ms = ms + 1000UL * auto_buffer_report_interval;
|
||||||
PORT_REDIRECT(SERIAL_BOTH);
|
PORT_REDIRECT(SERIAL_BOTH);
|
||||||
report_buffer_statistics();
|
report_buffer_statistics();
|
||||||
PORT_RESTORE();
|
PORT_RESTORE();
|
||||||
|
@ -78,10 +78,10 @@ void GcodeSuite::M1001() {
|
|||||||
|
|
||||||
// Report total print time
|
// Report total print time
|
||||||
const bool long_print = print_job_timer.duration() > 60;
|
const bool long_print = print_job_timer.duration() > 60;
|
||||||
if (long_print) gcode.process_subcommands_now_P(PSTR("M31"));
|
if (long_print) process_subcommands_now(F("M31"));
|
||||||
|
|
||||||
// Stop the print job timer
|
// Stop the print job timer
|
||||||
gcode.process_subcommands_now_P(PSTR("M77"));
|
process_subcommands_now(F("M77"));
|
||||||
|
|
||||||
// Set the progress bar "done" state
|
// Set the progress bar "done" state
|
||||||
TERN_(LCD_SET_PROGRESS_MANUALLY, ui.set_progress_done());
|
TERN_(LCD_SET_PROGRESS_MANUALLY, ui.set_progress_done());
|
||||||
@ -105,7 +105,7 @@ void GcodeSuite::M1001() {
|
|||||||
|
|
||||||
// Inject SD_FINISHED_RELEASECOMMAND, if any
|
// Inject SD_FINISHED_RELEASECOMMAND, if any
|
||||||
#ifdef SD_FINISHED_RELEASECOMMAND
|
#ifdef SD_FINISHED_RELEASECOMMAND
|
||||||
gcode.process_subcommands_now_P(PSTR(SD_FINISHED_RELEASECOMMAND));
|
process_subcommands_now(F(SD_FINISHED_RELEASECOMMAND));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onPrintFinished());
|
TERN_(EXTENSIBLE_UI, ExtUI::onPrintFinished());
|
||||||
|
@ -2181,7 +2181,7 @@ void SetMoveZto0() {
|
|||||||
dtostrf(Y_CENTER, 1, 1, str_2)
|
dtostrf(Y_CENTER, 1, 1, str_2)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
ui.set_status_P(PSTR("Now adjust Z Offset"));
|
ui.set_status_P(PSTR("Now adjust Z Offset"));
|
||||||
HMI_AudioFeedback(true);
|
HMI_AudioFeedback(true);
|
||||||
@ -2194,7 +2194,7 @@ void SetPID(celsius_t t, heater_id_t h) {
|
|||||||
dtostrf(X_CENTER, 1, 1, str_1),
|
dtostrf(X_CENTER, 1, 1, str_1),
|
||||||
dtostrf(Y_CENTER, 1, 1, str_2)
|
dtostrf(Y_CENTER, 1, 1, str_2)
|
||||||
);
|
);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
thermalManager.PID_autotune(t, h, HMI_data.PidCycles, true);
|
thermalManager.PID_autotune(t, h, HMI_data.PidCycles, true);
|
||||||
}
|
}
|
||||||
@ -2385,7 +2385,7 @@ void LevBed(uint8_t point) {
|
|||||||
|
|
||||||
#if HAS_ONESTEP_LEVELING
|
#if HAS_ONESTEP_LEVELING
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
gcode.process_subcommands_now_P(PSTR("M420S0\nG28O"));
|
gcode.process_subcommands_now(F("M420S0\nG28O"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
zval = probe.probe_at_point(xpos, ypos, PROBE_PT_STOW);
|
zval = probe.probe_at_point(xpos, ypos, PROBE_PT_STOW);
|
||||||
sprintf_P(cmd, PSTR(fmt),
|
sprintf_P(cmd, PSTR(fmt),
|
||||||
@ -2411,7 +2411,7 @@ void LevBedC () { LevBed(4); }
|
|||||||
|
|
||||||
void ManualMeshStart(){
|
void ManualMeshStart(){
|
||||||
ui.set_status_P(GET_TEXT(MSG_UBL_BUILD_MESH_MENU));
|
ui.set_status_P(GET_TEXT(MSG_UBL_BUILD_MESH_MENU));
|
||||||
gcode.process_subcommands_now_P(PSTR("G28 XYO\nG28 Z\nM211 S0\nG29S1"));
|
gcode.process_subcommands_now(F("G28 XYO\nG28 Z\nM211 S0\nG29S1"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
#ifdef MANUAL_PROBE_START_Z
|
#ifdef MANUAL_PROBE_START_Z
|
||||||
const uint8_t line = CurrentMenu->line(MMeshMoveZItem->pos);
|
const uint8_t line = CurrentMenu->line(MMeshMoveZItem->pos);
|
||||||
@ -2429,7 +2429,7 @@ void LevBedC () { LevBed(4); }
|
|||||||
void SetMMeshMoveZ() { SetPFloatOnClick(-1, 1, 2, planner.synchronize, LiveMeshMoveZ);}
|
void SetMMeshMoveZ() { SetPFloatOnClick(-1, 1, 2, planner.synchronize, LiveMeshMoveZ);}
|
||||||
|
|
||||||
void ManualMeshContinue(){
|
void ManualMeshContinue(){
|
||||||
gcode.process_subcommands_now_P(PSTR("G29S2"));
|
gcode.process_subcommands_now(F("G29S2"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
MMeshMoveZItem->draw(CurrentMenu->line(MMeshMoveZItem->pos));
|
MMeshMoveZItem->draw(CurrentMenu->line(MMeshMoveZItem->pos));
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ CrealityDWINClass CrealityDWIN;
|
|||||||
|
|
||||||
void manual_value_update(bool undefined=false) {
|
void manual_value_update(bool undefined=false) {
|
||||||
sprintf_P(cmd, PSTR("M421 I%i J%i Z%s %s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1), undefined ? "N" : "");
|
sprintf_P(cmd, PSTR("M421 I%i J%i Z%s %s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1), undefined ? "N" : "");
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ CrealityDWINClass CrealityDWIN;
|
|||||||
|
|
||||||
void manual_value_update() {
|
void manual_value_update() {
|
||||||
sprintf_P(cmd, PSTR("G29 I%i J%i Z%s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1));
|
sprintf_P(cmd, PSTR("G29 I%i J%i Z%s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,9 +283,9 @@ CrealityDWINClass CrealityDWIN;
|
|||||||
else {
|
else {
|
||||||
CrealityDWIN.Popup_Handler(MoveWait);
|
CrealityDWIN.Popup_Handler(MoveWait);
|
||||||
sprintf_P(cmd, PSTR("G0 F300 Z%s"), dtostrf(Z_CLEARANCE_BETWEEN_PROBES, 1, 3, str_1));
|
sprintf_P(cmd, PSTR("G0 F300 Z%s"), dtostrf(Z_CLEARANCE_BETWEEN_PROBES, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
sprintf_P(cmd, PSTR("G42 F4000 I%i J%i"), mesh_x, mesh_y);
|
sprintf_P(cmd, PSTR("G42 F4000 I%i J%i"), mesh_x, mesh_y);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
current_position.z = goto_mesh_value ? Z_VALUES_ARR[mesh_x][mesh_y] : Z_CLEARANCE_BETWEEN_PROBES;
|
current_position.z = goto_mesh_value ? Z_VALUES_ARR[mesh_x][mesh_y] : Z_CLEARANCE_BETWEEN_PROBES;
|
||||||
planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder);
|
planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder);
|
||||||
@ -1132,7 +1132,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
}
|
}
|
||||||
Popup_Handler(FilChange);
|
Popup_Handler(FilChange);
|
||||||
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1172,7 +1172,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_MoveX, F("Home X"));
|
Draw_Menu_Item(row, ICON_MoveX, F("Home X"));
|
||||||
else {
|
else {
|
||||||
Popup_Handler(Home);
|
Popup_Handler(Home);
|
||||||
gcode.process_subcommands_now_P(PSTR("G28 X"));
|
gcode.process_subcommands_now(F("G28 X"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1182,7 +1182,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_MoveY, F("Home Y"));
|
Draw_Menu_Item(row, ICON_MoveY, F("Home Y"));
|
||||||
else {
|
else {
|
||||||
Popup_Handler(Home);
|
Popup_Handler(Home);
|
||||||
gcode.process_subcommands_now_P(PSTR("G28 Y"));
|
gcode.process_subcommands_now(F("G28 Y"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1192,7 +1192,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_MoveZ, F("Home Z"));
|
Draw_Menu_Item(row, ICON_MoveZ, F("Home Z"));
|
||||||
else {
|
else {
|
||||||
Popup_Handler(Home);
|
Popup_Handler(Home);
|
||||||
gcode.process_subcommands_now_P(PSTR("G28 Z"));
|
gcode.process_subcommands_now(F("G28 Z"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1201,7 +1201,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (draw)
|
if (draw)
|
||||||
Draw_Menu_Item(row, ICON_SetHome, F("Set Home Position"));
|
Draw_Menu_Item(row, ICON_SetHome, F("Set Home Position"));
|
||||||
else {
|
else {
|
||||||
gcode.process_subcommands_now_P(PSTR("G92 X0 Y0 Z0"));
|
gcode.process_subcommands_now(F("G92 X0 Y0 Z0"));
|
||||||
AudioFeedback();
|
AudioFeedback();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1366,14 +1366,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (use_probe) {
|
if (use_probe) {
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Popup_Handler(ManualProbing);
|
Popup_Handler(ManualProbing);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1387,14 +1387,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (use_probe) {
|
if (use_probe) {
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Popup_Handler(ManualProbing);
|
Popup_Handler(ManualProbing);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1408,14 +1408,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (use_probe) {
|
if (use_probe) {
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Popup_Handler(ManualProbing);
|
Popup_Handler(ManualProbing);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1429,14 +1429,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (use_probe) {
|
if (use_probe) {
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Popup_Handler(ManualProbing);
|
Popup_Handler(ManualProbing);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1450,14 +1450,14 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (use_probe) {
|
if (use_probe) {
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(X_MAX_POS / 2.0f - probe.offset.x, 1, 3, str_1), dtostrf(Y_MAX_POS / 2.0f - probe.offset.y, 1, 3, str_2));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(X_MAX_POS / 2.0f - probe.offset.x, 1, 3, str_1), dtostrf(Y_MAX_POS / 2.0f - probe.offset.y, 1, 3, str_2));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Popup_Handler(ManualProbing);
|
Popup_Handler(ManualProbing);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1500,16 +1500,16 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_Homing, F("Home Z Axis"));
|
Draw_Menu_Item(row, ICON_Homing, F("Home Z Axis"));
|
||||||
else {
|
else {
|
||||||
Popup_Handler(Home);
|
Popup_Handler(Home);
|
||||||
gcode.process_subcommands_now_P(PSTR("G28 Z"));
|
gcode.process_subcommands_now(F("G28 Z"));
|
||||||
Popup_Handler(MoveWait);
|
Popup_Handler(MoveWait);
|
||||||
#if ENABLED(Z_SAFE_HOMING)
|
#if ENABLED(Z_SAFE_HOMING)
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2));
|
sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
#else
|
#else
|
||||||
gcode.process_subcommands_now_P(PSTR("G0 F4000 X117.5 Y117.5"));
|
gcode.process_subcommands_now(F("G0 F4000 X117.5 Y117.5"));
|
||||||
#endif
|
#endif
|
||||||
gcode.process_subcommands_now_P(PSTR("G0 F300 Z0"));
|
gcode.process_subcommands_now(F("G0 F300 Z0"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1529,11 +1529,11 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
#if ENABLED(Z_SAFE_HOMING)
|
#if ENABLED(Z_SAFE_HOMING)
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2));
|
sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
#else
|
#else
|
||||||
gcode.process_subcommands_now_P(PSTR("G0 F4000 X117.5 Y117.5"));
|
gcode.process_subcommands_now(F("G0 F4000 X117.5 Y117.5"));
|
||||||
#endif
|
#endif
|
||||||
gcode.process_subcommands_now_P(PSTR("G0 F300 Z0"));
|
gcode.process_subcommands_now(F("G0 F300 Z0"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1555,7 +1555,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
else {
|
else {
|
||||||
if (zoffsetvalue < MAX_Z_OFFSET) {
|
if (zoffsetvalue < MAX_Z_OFFSET) {
|
||||||
if (liveadjust) {
|
if (liveadjust) {
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z0.01"));
|
gcode.process_subcommands_now(F("M290 Z0.01"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
}
|
}
|
||||||
zoffsetvalue += 0.01;
|
zoffsetvalue += 0.01;
|
||||||
@ -1569,7 +1569,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
else {
|
else {
|
||||||
if (zoffsetvalue > MIN_Z_OFFSET) {
|
if (zoffsetvalue > MIN_Z_OFFSET) {
|
||||||
if (liveadjust) {
|
if (liveadjust) {
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01"));
|
gcode.process_subcommands_now(F("M290 Z-0.01"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
}
|
}
|
||||||
zoffsetvalue -= 0.01;
|
zoffsetvalue -= 0.01;
|
||||||
@ -1737,7 +1737,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
thermalManager.wait_for_hotend(0);
|
thermalManager.wait_for_hotend(0);
|
||||||
}
|
}
|
||||||
Popup_Handler(FilLoad);
|
Popup_Handler(FilLoad);
|
||||||
gcode.process_subcommands_now_P(PSTR("M701"));
|
gcode.process_subcommands_now(F("M701"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1756,7 +1756,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
thermalManager.wait_for_hotend(0);
|
thermalManager.wait_for_hotend(0);
|
||||||
}
|
}
|
||||||
Popup_Handler(FilLoad, true);
|
Popup_Handler(FilLoad, true);
|
||||||
gcode.process_subcommands_now_P(PSTR("M702"));
|
gcode.process_subcommands_now(F("M702"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -1775,7 +1775,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
}
|
}
|
||||||
Popup_Handler(FilChange);
|
Popup_Handler(FilChange);
|
||||||
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2032,7 +2032,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
else {
|
else {
|
||||||
Popup_Handler(PIDWait);
|
Popup_Handler(PIDWait);
|
||||||
sprintf_P(cmd, PSTR("M303 E0 C%i S%i U1"), PID_cycles, PID_e_temp);
|
sprintf_P(cmd, PSTR("M303 E0 C%i S%i U1"), PID_cycles, PID_e_temp);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -2099,7 +2099,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
else {
|
else {
|
||||||
Popup_Handler(PIDWait);
|
Popup_Handler(PIDWait);
|
||||||
sprintf_P(cmd, PSTR("M303 E-1 C%i S%i U1"), PID_cycles, PID_bed_temp);
|
sprintf_P(cmd, PSTR("M303 E-1 C%i S%i U1"), PID_cycles, PID_bed_temp);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -3045,7 +3045,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_StepY, F("M48 Probe Test"));
|
Draw_Menu_Item(row, ICON_StepY, F("M48 Probe Test"));
|
||||||
else {
|
else {
|
||||||
sprintf_P(cmd, PSTR("G28O\nM48 X%s Y%s P%i"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), testcount);
|
sprintf_P(cmd, PSTR("G28O\nM48 X%s Y%s P%i"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), testcount);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PROBE_TEST_COUNT:
|
case PROBE_TEST_COUNT:
|
||||||
@ -3157,11 +3157,12 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Popup_Handler(Home);
|
Popup_Handler(Home);
|
||||||
gcode.home_all_axes(true);
|
gcode.home_all_axes(true);
|
||||||
Popup_Handler(Level);
|
Popup_Handler(Level);
|
||||||
if (mesh_conf.tilt_grid > 1)
|
if (mesh_conf.tilt_grid > 1) {
|
||||||
sprintf_P(cmd, PSTR("G29 J%i"), mesh_conf.tilt_grid);
|
sprintf_P(cmd, PSTR("G29 J%i"), mesh_conf.tilt_grid);
|
||||||
|
gcode.process_subcommands_now(cmd);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
sprintf_P(cmd, PSTR("G29 J"));
|
gcode.process_subcommands_now(F("G29 J"));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
@ -3189,8 +3190,8 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
#endif
|
#endif
|
||||||
#if HAS_BED_PROBE
|
#if HAS_BED_PROBE
|
||||||
Popup_Handler(Level);
|
Popup_Handler(Level);
|
||||||
gcode.process_subcommands_now_P(PSTR("G29 P0\nG29 P1"));
|
gcode.process_subcommands_now(F("G29 P0\nG29 P1"));
|
||||||
gcode.process_subcommands_now_P(PSTR("G29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nM420 S1"));
|
gcode.process_subcommands_now(F("G29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nM420 S1"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Update_Status("Probed all reachable points");
|
Update_Status("Probed all reachable points");
|
||||||
Popup_Handler(SaveLevel);
|
Popup_Handler(SaveLevel);
|
||||||
@ -3205,7 +3206,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
#endif
|
#endif
|
||||||
#elif HAS_BED_PROBE
|
#elif HAS_BED_PROBE
|
||||||
Popup_Handler(Level);
|
Popup_Handler(Level);
|
||||||
gcode.process_subcommands_now_P(PSTR("G29"));
|
gcode.process_subcommands_now(F("G29"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Popup_Handler(SaveLevel);
|
Popup_Handler(SaveLevel);
|
||||||
#else
|
#else
|
||||||
@ -3213,7 +3214,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
set_bed_leveling_enabled(false);
|
set_bed_leveling_enabled(false);
|
||||||
gridpoint = 1;
|
gridpoint = 1;
|
||||||
Popup_Handler(MoveWait);
|
Popup_Handler(MoveWait);
|
||||||
gcode.process_subcommands_now_P(PSTR("G29"));
|
gcode.process_subcommands_now(F("G29"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Draw_Menu(ManualMesh);
|
Draw_Menu(ManualMesh);
|
||||||
#endif
|
#endif
|
||||||
@ -3296,7 +3297,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Popup_Handler(MeshSlot);
|
Popup_Handler(MeshSlot);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gcode.process_subcommands_now_P(PSTR("G29 L"));
|
gcode.process_subcommands_now(F("G29 L"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
AudioFeedback(true);
|
AudioFeedback(true);
|
||||||
}
|
}
|
||||||
@ -3309,7 +3310,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Popup_Handler(MeshSlot);
|
Popup_Handler(MeshSlot);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gcode.process_subcommands_now_P(PSTR("G29 S"));
|
gcode.process_subcommands_now(F("G29 S"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
AudioFeedback(true);
|
AudioFeedback(true);
|
||||||
}
|
}
|
||||||
@ -3405,7 +3406,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Convert Mesh to Plane"));
|
Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Convert Mesh to Plane"));
|
||||||
else {
|
else {
|
||||||
if (mesh_conf.create_plane_from_mesh()) break;
|
if (mesh_conf.create_plane_from_mesh()) break;
|
||||||
gcode.process_subcommands_now_P(PSTR("M420 S1"));
|
gcode.process_subcommands_now(F("M420 S1"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
AudioFeedback(true);
|
AudioFeedback(true);
|
||||||
}
|
}
|
||||||
@ -3513,7 +3514,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up"));
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up"));
|
||||||
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) {
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) {
|
||||||
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01;
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01;
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z0.01"));
|
gcode.process_subcommands_now(F("M290 Z0.01"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
current_position.z += 0.01f;
|
current_position.z += 0.01f;
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
@ -3525,7 +3526,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down"));
|
Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down"));
|
||||||
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) {
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) {
|
||||||
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01;
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01;
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01"));
|
gcode.process_subcommands_now(F("M290 Z-0.01"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
current_position.z -= 0.01f;
|
current_position.z -= 0.01f;
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
@ -3596,7 +3597,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
mesh_conf.manual_move();
|
mesh_conf.manual_move();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gcode.process_subcommands_now_P(PSTR("G29 S"));
|
gcode.process_subcommands_now(F("G29 S"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
AudioFeedback(true);
|
AudioFeedback(true);
|
||||||
Draw_Menu(Leveling, LEVELING_GET_MESH);
|
Draw_Menu(Leveling, LEVELING_GET_MESH);
|
||||||
@ -3634,7 +3635,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up"));
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up"));
|
||||||
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) {
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) {
|
||||||
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01;
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01;
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z0.01"));
|
gcode.process_subcommands_now(F("M290 Z0.01"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
current_position.z += 0.01f;
|
current_position.z += 0.01f;
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
@ -3646,7 +3647,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
Draw_Menu_Item(row, ICON_Axis, F("Microstep Down"));
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Down"));
|
||||||
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) {
|
else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) {
|
||||||
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01;
|
Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01;
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01"));
|
gcode.process_subcommands_now(F("M290 Z-0.01"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
current_position.z -= 0.01f;
|
current_position.z -= 0.01f;
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
@ -3673,7 +3674,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (draw)
|
if (draw)
|
||||||
Draw_Menu_Item(row, ICON_Back, F("Cancel"));
|
Draw_Menu_Item(row, ICON_Back, F("Cancel"));
|
||||||
else {
|
else {
|
||||||
gcode.process_subcommands_now_P(PSTR("G29 A"));
|
gcode.process_subcommands_now(F("G29 A"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
set_bed_leveling_enabled(level_state);
|
set_bed_leveling_enabled(level_state);
|
||||||
Draw_Menu(Leveling, LEVELING_GET_MESH);
|
Draw_Menu(Leveling, LEVELING_GET_MESH);
|
||||||
@ -3688,13 +3689,13 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
}
|
}
|
||||||
else if (gridpoint < GRID_MAX_POINTS) {
|
else if (gridpoint < GRID_MAX_POINTS) {
|
||||||
Popup_Handler(MoveWait);
|
Popup_Handler(MoveWait);
|
||||||
gcode.process_subcommands_now_P(PSTR("G29"));
|
gcode.process_subcommands_now(F("G29"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
gridpoint++;
|
gridpoint++;
|
||||||
Redraw_Menu();
|
Redraw_Menu();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gcode.process_subcommands_now_P(PSTR("G29"));
|
gcode.process_subcommands_now(F("G29"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
AudioFeedback(settings.save());
|
AudioFeedback(settings.save());
|
||||||
Draw_Menu(Leveling, LEVELING_GET_MESH);
|
Draw_Menu(Leveling, LEVELING_GET_MESH);
|
||||||
@ -3713,7 +3714,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (draw)
|
if (draw)
|
||||||
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up"));
|
Draw_Menu_Item(row, ICON_Axis, F("Microstep Up"));
|
||||||
else if (current_position.z < MAX_Z_OFFSET) {
|
else if (current_position.z < MAX_Z_OFFSET) {
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z0.01"));
|
gcode.process_subcommands_now(F("M290 Z0.01"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
current_position.z += 0.01f;
|
current_position.z += 0.01f;
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
@ -3724,7 +3725,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (draw)
|
if (draw)
|
||||||
Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down"));
|
Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down"));
|
||||||
else if (current_position.z > MIN_Z_OFFSET) {
|
else if (current_position.z > MIN_Z_OFFSET) {
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01"));
|
gcode.process_subcommands_now(F("M290 Z-0.01"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
current_position.z -= 0.01f;
|
current_position.z -= 0.01f;
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
@ -3845,7 +3846,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (draw)
|
if (draw)
|
||||||
Draw_Menu_Item(row, ICON_Axis, F("Z-Offset Up"));
|
Draw_Menu_Item(row, ICON_Axis, F("Z-Offset Up"));
|
||||||
else if (zoffsetvalue < MAX_Z_OFFSET) {
|
else if (zoffsetvalue < MAX_Z_OFFSET) {
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z0.01"));
|
gcode.process_subcommands_now(F("M290 Z0.01"));
|
||||||
zoffsetvalue += 0.01;
|
zoffsetvalue += 0.01;
|
||||||
Draw_Float(zoffsetvalue, row - 1, false, 100);
|
Draw_Float(zoffsetvalue, row - 1, false, 100);
|
||||||
}
|
}
|
||||||
@ -3854,7 +3855,7 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
if (draw)
|
if (draw)
|
||||||
Draw_Menu_Item(row, ICON_AxisD, F("Z-Offset Down"));
|
Draw_Menu_Item(row, ICON_AxisD, F("Z-Offset Down"));
|
||||||
else if (zoffsetvalue > MIN_Z_OFFSET) {
|
else if (zoffsetvalue > MIN_Z_OFFSET) {
|
||||||
gcode.process_subcommands_now_P(PSTR("M290 Z-0.01"));
|
gcode.process_subcommands_now(F("M290 Z-0.01"));
|
||||||
zoffsetvalue -= 0.01;
|
zoffsetvalue -= 0.01;
|
||||||
Draw_Float(zoffsetvalue, row - 2, false, 100);
|
Draw_Float(zoffsetvalue, row - 2, false, 100);
|
||||||
}
|
}
|
||||||
@ -3932,27 +3933,27 @@ void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/
|
|||||||
case Prepare:
|
case Prepare:
|
||||||
Popup_Handler(FilChange);
|
Popup_Handler(FilChange);
|
||||||
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
break;
|
break;
|
||||||
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
|
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
|
||||||
case ChangeFilament:
|
case ChangeFilament:
|
||||||
switch (last_selection) {
|
switch (last_selection) {
|
||||||
case CHANGEFIL_LOAD:
|
case CHANGEFIL_LOAD:
|
||||||
Popup_Handler(FilLoad);
|
Popup_Handler(FilLoad);
|
||||||
gcode.process_subcommands_now_P("M701");
|
gcode.process_subcommands_now(F("M701"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu(true, true, true);
|
Redraw_Menu(true, true, true);
|
||||||
break;
|
break;
|
||||||
case CHANGEFIL_UNLOAD:
|
case CHANGEFIL_UNLOAD:
|
||||||
Popup_Handler(FilLoad, true);
|
Popup_Handler(FilLoad, true);
|
||||||
gcode.process_subcommands_now_P("M702");
|
gcode.process_subcommands_now(F("M702"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
Redraw_Menu(true, true, true);
|
Redraw_Menu(true, true, true);
|
||||||
break;
|
break;
|
||||||
case CHANGEFIL_CHANGE:
|
case CHANGEFIL_CHANGE:
|
||||||
Popup_Handler(FilChange);
|
Popup_Handler(FilChange);
|
||||||
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -4291,7 +4292,7 @@ void CrealityDWINClass::Value_Control() {
|
|||||||
}
|
}
|
||||||
else if (active_menu == Tune && selection == TUNE_ZOFFSET) {
|
else if (active_menu == Tune && selection == TUNE_ZOFFSET) {
|
||||||
sprintf_P(cmd, PSTR("M290 Z%s"), dtostrf((tempvalue / valueunit - zoffsetvalue), 1, 3, str_1));
|
sprintf_P(cmd, PSTR("M290 Z%s"), dtostrf((tempvalue / valueunit - zoffsetvalue), 1, 3, str_1));
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki))
|
if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki))
|
||||||
tempvalue = scalePID_i(tempvalue);
|
tempvalue = scalePID_i(tempvalue);
|
||||||
@ -4490,11 +4491,11 @@ void CrealityDWINClass::Print_Screen_Control() {
|
|||||||
char cmnd[20];
|
char cmnd[20];
|
||||||
#if HAS_HEATED_BED
|
#if HAS_HEATED_BED
|
||||||
cmnd[sprintf_P(cmnd, PSTR("M140 S%i"), pausebed)] = '\0';
|
cmnd[sprintf_P(cmnd, PSTR("M140 S%i"), pausebed)] = '\0';
|
||||||
gcode.process_subcommands_now_P(PSTR(cmnd));
|
gcode.process_subcommands_now(cmnd);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_EXTRUDERS
|
#if HAS_EXTRUDERS
|
||||||
cmnd[sprintf_P(cmnd, PSTR("M109 S%i"), pausetemp)] = '\0';
|
cmnd[sprintf_P(cmnd, PSTR("M109 S%i"), pausetemp)] = '\0';
|
||||||
gcode.process_subcommands_now_P(PSTR(cmnd));
|
gcode.process_subcommands_now(cmnd);
|
||||||
#endif
|
#endif
|
||||||
TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan);
|
TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan);
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
@ -4619,7 +4620,7 @@ void CrealityDWINClass::Popup_Control() {
|
|||||||
}
|
}
|
||||||
Popup_Handler(FilChange);
|
Popup_Handler(FilChange);
|
||||||
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target);
|
||||||
gcode.process_subcommands_now_P(cmd);
|
gcode.process_subcommands_now(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -4642,7 +4643,7 @@ void CrealityDWINClass::Popup_Control() {
|
|||||||
case SaveLevel:
|
case SaveLevel:
|
||||||
if (selection == 0) {
|
if (selection == 0) {
|
||||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||||
gcode.process_subcommands_now_P(PSTR("G29 S"));
|
gcode.process_subcommands_now(F("G29 S"));
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
AudioFeedback(true);
|
AudioFeedback(true);
|
||||||
#else
|
#else
|
||||||
|
@ -262,7 +262,7 @@ void DGUSScreenHandler::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) {
|
|||||||
void DGUSScreenHandler::SDPrintingFinished() {
|
void DGUSScreenHandler::SDPrintingFinished() {
|
||||||
if (DGUSAutoTurnOff) {
|
if (DGUSAutoTurnOff) {
|
||||||
queue.exhaust();
|
queue.exhaust();
|
||||||
gcode.process_subcommands_now_P(PSTR("M81"));
|
gcode.process_subcommands_now(F("M81"));
|
||||||
}
|
}
|
||||||
GotoScreen(MKSLCD_SCREEN_PrintDone);
|
GotoScreen(MKSLCD_SCREEN_PrintDone);
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ void SpinnerDialogBox::enqueueAndWait(FSTR_P message, char *commands) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SpinnerDialogBox::onIdle() {
|
void SpinnerDialogBox::onIdle() {
|
||||||
if (mydata.auto_hide && !commandsInQueue() && TERN1(HOST_KEEPALIVE_FEATURE, GcodeSuite::busy_state == GcodeSuite::NOT_BUSY)) {
|
if (mydata.auto_hide && !commandsInQueue() && TERN1(HOST_KEEPALIVE_FEATURE, gcode.busy_state == gcode.NOT_BUSY)) {
|
||||||
mydata.auto_hide = false;
|
mydata.auto_hide = false;
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
@ -65,32 +65,32 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
|||||||
switch (obj->mks_obj_id) {
|
switch (obj->mks_obj_id) {
|
||||||
case ID_BABY_STEP_X_P:
|
case ID_BABY_STEP_X_P:
|
||||||
sprintf_P(baby_buf, PSTR("M290 X%s"), dtostrf(babystep_dist, 1, 3, str_1));
|
sprintf_P(baby_buf, PSTR("M290 X%s"), dtostrf(babystep_dist, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now_P(PSTR(baby_buf));
|
gcode.process_subcommands_now(F(baby_buf));
|
||||||
has_adjust_z = 1;
|
has_adjust_z = 1;
|
||||||
break;
|
break;
|
||||||
case ID_BABY_STEP_X_N:
|
case ID_BABY_STEP_X_N:
|
||||||
sprintf_P(baby_buf, PSTR("M290 X%s"), dtostrf(-babystep_dist, 1, 3, str_1));
|
sprintf_P(baby_buf, PSTR("M290 X%s"), dtostrf(-babystep_dist, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now_P(PSTR(baby_buf));
|
gcode.process_subcommands_now(F(baby_buf));
|
||||||
has_adjust_z = 1;
|
has_adjust_z = 1;
|
||||||
break;
|
break;
|
||||||
case ID_BABY_STEP_Y_P:
|
case ID_BABY_STEP_Y_P:
|
||||||
sprintf_P(baby_buf, PSTR("M290 Y%s"), dtostrf(babystep_dist, 1, 3, str_1));
|
sprintf_P(baby_buf, PSTR("M290 Y%s"), dtostrf(babystep_dist, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now_P(PSTR(baby_buf));
|
gcode.process_subcommands_now(F(baby_buf));
|
||||||
has_adjust_z = 1;
|
has_adjust_z = 1;
|
||||||
break;
|
break;
|
||||||
case ID_BABY_STEP_Y_N:
|
case ID_BABY_STEP_Y_N:
|
||||||
sprintf_P(baby_buf, PSTR("M290 Y%s"), dtostrf(-babystep_dist, 1, 3, str_1));
|
sprintf_P(baby_buf, PSTR("M290 Y%s"), dtostrf(-babystep_dist, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now_P(PSTR(baby_buf));
|
gcode.process_subcommands_now(F(baby_buf));
|
||||||
has_adjust_z = 1;
|
has_adjust_z = 1;
|
||||||
break;
|
break;
|
||||||
case ID_BABY_STEP_Z_P:
|
case ID_BABY_STEP_Z_P:
|
||||||
sprintf_P(baby_buf, PSTR("M290 Z%s"), dtostrf(babystep_dist, 1, 3, str_1));
|
sprintf_P(baby_buf, PSTR("M290 Z%s"), dtostrf(babystep_dist, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now_P(PSTR(baby_buf));
|
gcode.process_subcommands_now(F(baby_buf));
|
||||||
has_adjust_z = 1;
|
has_adjust_z = 1;
|
||||||
break;
|
break;
|
||||||
case ID_BABY_STEP_Z_N:
|
case ID_BABY_STEP_Z_N:
|
||||||
sprintf_P(baby_buf, PSTR("M290 Z%s"), dtostrf(-babystep_dist, 1, 3, str_1));
|
sprintf_P(baby_buf, PSTR("M290 Z%s"), dtostrf(-babystep_dist, 1, 3, str_1));
|
||||||
gcode.process_subcommands_now_P(PSTR(baby_buf));
|
gcode.process_subcommands_now(F(baby_buf));
|
||||||
has_adjust_z = 1;
|
has_adjust_z = 1;
|
||||||
break;
|
break;
|
||||||
case ID_BABY_STEP_DIST:
|
case ID_BABY_STEP_DIST:
|
||||||
|
@ -94,7 +94,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
|||||||
case ID_FILAMNT_RETURN:
|
case ID_FILAMNT_RETURN:
|
||||||
#if HAS_MULTI_EXTRUDER
|
#if HAS_MULTI_EXTRUDER
|
||||||
if (uiCfg.print_state != IDLE && uiCfg.print_state != REPRINTED)
|
if (uiCfg.print_state != IDLE && uiCfg.print_state != REPRINTED)
|
||||||
gcode.process_subcommands_now_P(uiCfg.extruderIndexBak == 1 ? PSTR("T1") : PSTR("T0"));
|
gcode.process_subcommands_now(uiCfg.extruderIndexBak == 1 ? F("T1") : F("T0"));
|
||||||
#endif
|
#endif
|
||||||
feedrate_mm_s = (float)uiCfg.moveSpeed_bak;
|
feedrate_mm_s = (float)uiCfg.moveSpeed_bak;
|
||||||
if (uiCfg.print_state == PAUSED)
|
if (uiCfg.print_state == PAUSED)
|
||||||
|
@ -404,7 +404,7 @@ static void set_value_confirm() {
|
|||||||
case z_sensitivity: TERN_(Z_SENSORLESS, stepperZ.homing_threshold(atoi(key_value))); break;
|
case z_sensitivity: TERN_(Z_SENSORLESS, stepperZ.homing_threshold(atoi(key_value))); break;
|
||||||
case z2_sensitivity: TERN_(Z2_SENSORLESS, stepperZ2.homing_threshold(atoi(key_value))); break;
|
case z2_sensitivity: TERN_(Z2_SENSORLESS, stepperZ2.homing_threshold(atoi(key_value))); break;
|
||||||
}
|
}
|
||||||
gcode.process_subcommands_now_P(PSTR("M500"));
|
gcode.process_subcommands_now(F("M500"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||||
|
@ -307,7 +307,7 @@ void setProBarRate() {
|
|||||||
|
|
||||||
#if HAS_SUICIDE
|
#if HAS_SUICIDE
|
||||||
if (gCfgItems.finish_power_off) {
|
if (gCfgItems.finish_power_off) {
|
||||||
gcode.process_subcommands_now_P(PSTR("M1001"));
|
gcode.process_subcommands_now(F("M1001"));
|
||||||
queue.inject_P(PSTR("M81"));
|
queue.inject_P(PSTR("M81"));
|
||||||
marlin_state = MF_RUNNING;
|
marlin_state = MF_RUNNING;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ void printer_state_polling() {
|
|||||||
uiCfg.waitEndMoves = 0;
|
uiCfg.waitEndMoves = 0;
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
||||||
gcode.process_subcommands_now_P(PSTR("M25"));
|
gcode.process_subcommands_now(F("M25"));
|
||||||
|
|
||||||
// save the position
|
// save the position
|
||||||
uiCfg.current_x_position_bak = current_position.x;
|
uiCfg.current_x_position_bak = current_position.x;
|
||||||
@ -93,7 +93,7 @@ void printer_state_polling() {
|
|||||||
sprintf_P(public_buf_m, PSTR("G1 Z%s"), dtostrf(uiCfg.current_z_position_bak, 1, 1, str_1));
|
sprintf_P(public_buf_m, PSTR("G1 Z%s"), dtostrf(uiCfg.current_z_position_bak, 1, 1, str_1));
|
||||||
gcode.process_subcommands_now(public_buf_m);
|
gcode.process_subcommands_now(public_buf_m);
|
||||||
}
|
}
|
||||||
gcode.process_subcommands_now_P(M24_STR);
|
gcode.process_subcommands_now(FPSTR(M24_STR));
|
||||||
uiCfg.print_state = WORKING;
|
uiCfg.print_state = WORKING;
|
||||||
start_print_time();
|
start_print_time();
|
||||||
|
|
||||||
|
@ -1310,17 +1310,17 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
|||||||
if (ENABLED(EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN) || !no_move) {
|
if (ENABLED(EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN) || !no_move) {
|
||||||
#ifdef EVENT_GCODE_TOOLCHANGE_T0
|
#ifdef EVENT_GCODE_TOOLCHANGE_T0
|
||||||
if (new_tool == 0)
|
if (new_tool == 0)
|
||||||
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_TOOLCHANGE_T0));
|
gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T0));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EVENT_GCODE_TOOLCHANGE_T1
|
#ifdef EVENT_GCODE_TOOLCHANGE_T1
|
||||||
if (new_tool == 1)
|
if (new_tool == 1)
|
||||||
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_TOOLCHANGE_T1));
|
gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T1));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EVENT_GCODE_AFTER_TOOLCHANGE
|
#ifdef EVENT_GCODE_AFTER_TOOLCHANGE
|
||||||
if (TERN1(DUAL_X_CARRIAGE, dual_x_carriage_mode == DXC_AUTO_PARK_MODE))
|
if (TERN1(DUAL_X_CARRIAGE, dual_x_carriage_mode == DXC_AUTO_PARK_MODE))
|
||||||
gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_AFTER_TOOLCHANGE));
|
gcode.process_subcommands_now(F(EVENT_GCODE_AFTER_TOOLCHANGE));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user