diff --git a/Marlin/I2CPositionEncoder.cpp b/Marlin/I2CPositionEncoder.cpp index 84334812f..6422b4f2f 100644 --- a/Marlin/I2CPositionEncoder.cpp +++ b/Marlin/I2CPositionEncoder.cpp @@ -117,7 +117,7 @@ SERIAL_ECHOPGM("New position reads as "); SERIAL_ECHO(get_position()); - SERIAL_ECHOPGM("("); + SERIAL_CHAR('('); SERIAL_ECHO(mm_from_count(get_position())); SERIAL_ECHOLNPGM(")"); #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 808da5842..135832c01 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -10029,7 +10029,7 @@ inline void gcode_M502() { if (!ijk) { SERIAL_ECHO_START(); - SERIAL_ECHO(MSG_SKEW_FACTOR " XY: "); + SERIAL_ECHOPGM(MSG_SKEW_FACTOR " XY: "); SERIAL_ECHO_F(planner.xy_skew_factor, 6); SERIAL_EOL(); #if ENABLED(SKEW_CORRECTION_FOR_Z) @@ -12880,7 +12880,8 @@ void prepare_move_to_destination() { if (angular_travel == 0 && current_position[p_axis] == cart[p_axis] && current_position[q_axis] == cart[q_axis]) angular_travel = RADIANS(360); - const float mm_of_travel = HYPOT(angular_travel * radius, FABS(linear_travel)); + const float flat_mm = radius * angular_travel, + mm_of_travel = linear_travel ? HYPOT(flat_mm, linear_travel) : flat_mm; if (mm_of_travel < 0.001) return; uint16_t segments = FLOOR(mm_of_travel / (MM_PER_ARC_SEGMENT)); diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 9fc000a53..2d3d5fbd9 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -2228,7 +2228,7 @@ void MarlinSettings::reset() { } CONFIG_ECHO_START; #if ENABLED(SKEW_CORRECTION_FOR_Z) - SERIAL_ECHO(" M852 I"); + SERIAL_ECHOPGM(" M852 I"); SERIAL_ECHO_F(LINEAR_UNIT(planner.xy_skew_factor), 6); SERIAL_ECHOPGM(" J"); SERIAL_ECHO_F(LINEAR_UNIT(planner.xz_skew_factor), 6); @@ -2236,7 +2236,7 @@ void MarlinSettings::reset() { SERIAL_ECHO_F(LINEAR_UNIT(planner.yz_skew_factor), 6); SERIAL_EOL(); #else - SERIAL_ECHO(" M852 S"); + SERIAL_ECHOPGM(" M852 S"); SERIAL_ECHO_F(LINEAR_UNIT(planner.xy_skew_factor), 6); SERIAL_EOL(); #endif @@ -2251,7 +2251,7 @@ void MarlinSettings::reset() { SERIAL_ECHOLNPGM("Stepper driver current:"); } CONFIG_ECHO_START; - SERIAL_ECHO(" M906"); + SERIAL_ECHOPGM(" M906"); #if ENABLED(X_IS_TMC2130) || ENABLED(X_IS_TMC2208) SERIAL_ECHOPAIR(" X ", stepperX.getCurrent()); #endif @@ -2297,7 +2297,7 @@ void MarlinSettings::reset() { SERIAL_ECHOLNPGM("Sensorless homing threshold:"); } CONFIG_ECHO_START; - SERIAL_ECHO(" M914"); + SERIAL_ECHOPGM(" M914"); #if ENABLED(X_IS_TMC2130) SERIAL_ECHOPAIR(" X", stepperX.sgt()); #endif diff --git a/Marlin/gcode.cpp b/Marlin/gcode.cpp index fd26aaea1..0fdd2bc9c 100644 --- a/Marlin/gcode.cpp +++ b/Marlin/gcode.cpp @@ -282,7 +282,7 @@ void GCodeParser::unknown_command_error() { #else SERIAL_ECHOPAIR(" args: \"", command_args); #endif - SERIAL_ECHOPGM("\""); + SERIAL_CHAR('"'); if (string_arg) { SERIAL_ECHOPGM(" string: \""); SERIAL_ECHO(string_arg); diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index adbf14250..7486e3bd5 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -362,7 +362,7 @@ void Planner::recalculate_trapezoids() { } } -/* +/** * Recalculate the motion plan according to the following algorithm: * * 1. Go over every block in reverse order... @@ -392,7 +392,6 @@ void Planner::recalculate() { recalculate_trapezoids(); } - #if ENABLED(AUTOTEMP) void Planner::getHighESpeed() { diff --git a/Marlin/printcounter.cpp b/Marlin/printcounter.cpp index 6edc0ac8c..794a1995e 100644 --- a/Marlin/printcounter.cpp +++ b/Marlin/printcounter.cpp @@ -140,7 +140,7 @@ void PrintCounter::showStats() { SERIAL_ECHOPGM("Filament used: "); SERIAL_ECHO(this->data.filamentUsed / 1000); - SERIAL_ECHOPGM("m"); + SERIAL_CHAR('m'); SERIAL_EOL(); }