🎨 Apply F() to G-code subcommands
This commit is contained in:
committed by
Scott Lahteine
parent
433a27e475
commit
2b9ae0cc33
@ -281,10 +281,10 @@ bool unified_bed_leveling::sanity_check() {
|
||||
}
|
||||
#endif
|
||||
|
||||
process_subcommands_now_P(G28_STR); // Home
|
||||
process_subcommands_now_P(PSTR(ALIGN_GCODE "\n" // Align multi z axis if available
|
||||
PROBE_GCODE "\n" // Build mesh with available hardware
|
||||
"G29P3\nG29P3")); // Ensure mesh is complete by running smart fill twice
|
||||
process_subcommands_now(FPSTR(G28_STR)); // Home
|
||||
process_subcommands_now(F(ALIGN_GCODE "\n" // Align multi z axis if available
|
||||
PROBE_GCODE "\n" // Build mesh with available hardware
|
||||
"G29P3\nG29P3")); // Ensure mesh is complete by running smart fill twice
|
||||
|
||||
if (parser.seenval('S')) {
|
||||
char umw_gcode[32];
|
||||
@ -292,9 +292,9 @@ bool unified_bed_leveling::sanity_check() {
|
||||
queue.inject(umw_gcode);
|
||||
}
|
||||
|
||||
process_subcommands_now_P(PSTR("G29A\nG29F10\n" // Set UBL Active & Fade 10
|
||||
"M140S0\nM104S0\n" // Turn off heaters
|
||||
"M500")); // Store settings
|
||||
process_subcommands_now(F("G29A\nG29F10\n" // Set UBL Active & Fade 10
|
||||
"M140S0\nM104S0\n" // Turn off heaters
|
||||
"M500")); // Store settings
|
||||
}
|
||||
|
||||
#endif // UBL_MESH_WIZARD
|
||||
|
@ -656,7 +656,7 @@ void unified_bed_leveling::G29() {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT);
|
||||
if (probe_deployed) {
|
||||
planner.synchronize();
|
||||
gcode.process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT));
|
||||
gcode.process_subcommands_now(F(Z_PROBE_END_SCRIPT));
|
||||
}
|
||||
#else
|
||||
UNUSED(probe_deployed);
|
||||
|
@ -82,7 +82,7 @@ void Power::power_on() {
|
||||
TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY));
|
||||
|
||||
#ifdef PSU_POWERUP_GCODE
|
||||
GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWERUP_GCODE));
|
||||
gcode.process_subcommands_now(F(PSU_POWERUP_GCODE));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ void Power::power_off() {
|
||||
if (!psu_on) return;
|
||||
|
||||
#ifdef PSU_POWEROFF_GCODE
|
||||
GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE));
|
||||
gcode.process_subcommands_now(F(PSU_POWEROFF_GCODE));
|
||||
#endif
|
||||
|
||||
#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
|
||||
// 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
|
||||
|
||||
#if POWER_LOSS_ZRAISE
|
||||
@ -337,7 +337,7 @@ void PrintJobRecovery::resume() {
|
||||
|
||||
#if HAS_LEVELING
|
||||
// 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
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
@ -373,7 +373,7 @@ void PrintJobRecovery::resume() {
|
||||
// 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
|
||||
|
||||
@ -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.
|
||||
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
|
||||
|
||||
@ -513,7 +513,7 @@ void PrintJobRecovery::resume() {
|
||||
|
||||
// Un-retract if there was a retract at outage
|
||||
#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
|
||||
|
||||
// Additional purge on resume if configured
|
||||
@ -523,7 +523,7 @@ void PrintJobRecovery::resume() {
|
||||
#endif
|
||||
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
gcode.process_subcommands_now_P(PSTR("G12"));
|
||||
gcode.process_subcommands_now(F("G12"));
|
||||
#endif
|
||||
|
||||
// Move back over to the saved XY
|
||||
|
Reference in New Issue
Block a user