Merge pull request #9325 from thinkyhead/bf2_simple_patches
[2.0.x] Optimize some strings, arc length calculation
This commit is contained in:
commit
c19327f1bb
@ -116,7 +116,7 @@ void I2CPositionEncoder::update() {
|
||||
|
||||
SERIAL_ECHOPGM("New position reads as ");
|
||||
SERIAL_ECHO(get_position());
|
||||
SERIAL_ECHOPGM("(");
|
||||
SERIAL_CHAR('(');
|
||||
SERIAL_ECHO(mm_from_count(get_position()));
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
#endif
|
||||
|
@ -1732,7 +1732,7 @@
|
||||
d = t + normal.z * z1;
|
||||
SERIAL_ECHOPGM("D from 1st point: ");
|
||||
SERIAL_ECHO_F(d, 6);
|
||||
SERIAL_ECHO(" Z error: ");
|
||||
SERIAL_ECHOPGM(" Z error: ");
|
||||
SERIAL_ECHO_F(normal.z*z1-get_z_correction(UBL_PROBE_PT_1_X, UBL_PROBE_PT_1_Y),6);
|
||||
SERIAL_EOL();
|
||||
|
||||
@ -1741,7 +1741,7 @@
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOPGM("D from 2nd point: ");
|
||||
SERIAL_ECHO_F(d, 6);
|
||||
SERIAL_ECHO(" Z error: ");
|
||||
SERIAL_ECHOPGM(" Z error: ");
|
||||
SERIAL_ECHO_F(normal.z*z2-get_z_correction(UBL_PROBE_PT_2_X, UBL_PROBE_PT_2_Y),6);
|
||||
SERIAL_EOL();
|
||||
|
||||
@ -1749,7 +1749,7 @@
|
||||
d = t + normal.z * z3;
|
||||
SERIAL_ECHOPGM("D from 3rd point: ");
|
||||
SERIAL_ECHO_F(d, 6);
|
||||
SERIAL_ECHO(" Z error: ");
|
||||
SERIAL_ECHOPGM(" Z error: ");
|
||||
SERIAL_ECHO_F(normal.z*z3-get_z_correction(UBL_PROBE_PT_3_X, UBL_PROBE_PT_3_Y),6);
|
||||
SERIAL_EOL();
|
||||
|
||||
@ -1766,7 +1766,7 @@
|
||||
|
||||
SERIAL_ECHOPAIR(" Z error: (", Z_SAFE_HOMING_X_POINT );
|
||||
SERIAL_ECHOPAIR(",", Z_SAFE_HOMING_Y_POINT );
|
||||
SERIAL_ECHO(") = ");
|
||||
SERIAL_ECHOPGM(") = ");
|
||||
SERIAL_ECHO_F( get_z_correction(Z_SAFE_HOMING_X_POINT, Z_SAFE_HOMING_Y_POINT),6);
|
||||
SERIAL_EOL();
|
||||
*/
|
||||
|
@ -93,7 +93,7 @@ void GcodeSuite::M852() {
|
||||
|
||||
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)
|
||||
|
@ -86,7 +86,8 @@ void plan_arc(
|
||||
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));
|
||||
|
@ -286,13 +286,13 @@ void GCodeParser::unknown_command_error() {
|
||||
SERIAL_ECHO(codenum);
|
||||
SERIAL_ECHOLNPGM(")");
|
||||
#if ENABLED(FASTER_GCODE_PARSER)
|
||||
SERIAL_ECHO(" args: \"");
|
||||
SERIAL_ECHOPGM(" args: \"");
|
||||
for (char c = 'A'; c <= 'Z'; ++c)
|
||||
if (seen(c)) { SERIAL_CHAR(c); SERIAL_CHAR(' '); }
|
||||
#else
|
||||
SERIAL_ECHOPAIR(" args: \"", command_args);
|
||||
#endif
|
||||
SERIAL_ECHOPGM("\"");
|
||||
SERIAL_CHAR('"');
|
||||
if (string_arg) {
|
||||
SERIAL_ECHOPGM(" string: \"");
|
||||
SERIAL_ECHO(string_arg);
|
||||
|
@ -2266,7 +2266,7 @@ void MarlinSettings::reset(
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
||||
SERIAL_ECHO_P(port, " M852 I");
|
||||
SERIAL_ECHOPGM_P(port, " M852 I");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xy_skew_factor), 6);
|
||||
SERIAL_ECHOPGM_P(port, " J");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xz_skew_factor), 6);
|
||||
@ -2274,7 +2274,7 @@ void MarlinSettings::reset(
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.yz_skew_factor), 6);
|
||||
SERIAL_EOL_P(port);
|
||||
#else
|
||||
SERIAL_ECHO_P(port, " M852 S");
|
||||
SERIAL_ECHOPGM_P(port, " M852 S");
|
||||
SERIAL_ECHO_F_P(port, LINEAR_UNIT(planner.xy_skew_factor), 6);
|
||||
SERIAL_EOL_P(port);
|
||||
#endif
|
||||
@ -2289,7 +2289,7 @@ void MarlinSettings::reset(
|
||||
SERIAL_ECHOLNPGM_P(port, "Stepper driver current:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHO_P(port, " M906");
|
||||
SERIAL_ECHOPGM_P(port, " M906");
|
||||
#if ENABLED(X_IS_TMC2130) || ENABLED(X_IS_TMC2208)
|
||||
SERIAL_ECHOPAIR_P(port, " X ", stepperX.getCurrent());
|
||||
#endif
|
||||
@ -2335,7 +2335,7 @@ void MarlinSettings::reset(
|
||||
SERIAL_ECHOLNPGM_P(port, "Sensorless homing threshold:");
|
||||
}
|
||||
CONFIG_ECHO_START;
|
||||
SERIAL_ECHO_P(port, " M914");
|
||||
SERIAL_ECHOPGM_P(port, " M914");
|
||||
#if ENABLED(X_IS_TMC2130)
|
||||
SERIAL_ECHOPAIR_P(port, " X", stepperX.sgt());
|
||||
#endif
|
||||
|
@ -373,7 +373,7 @@ void Planner::recalculate_trapezoids() {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Recalculate the motion plan according to the following algorithm:
|
||||
*
|
||||
* 1. Go over every block in reverse order...
|
||||
@ -403,7 +403,6 @@ void Planner::recalculate() {
|
||||
recalculate_trapezoids();
|
||||
}
|
||||
|
||||
|
||||
#if ENABLED(AUTOTEMP)
|
||||
|
||||
void Planner::getHighESpeed() {
|
||||
|
@ -144,7 +144,7 @@ void PrintCounter::showStats() {
|
||||
|
||||
SERIAL_ECHOPGM("Filament used: ");
|
||||
SERIAL_ECHO(this->data.filamentUsed / 1000);
|
||||
SERIAL_ECHOPGM("m");
|
||||
SERIAL_CHAR('m');
|
||||
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user