Merge pull request #9323 from thinkyhead/bf1_simple_patches
[1.1.x] Optimize some strings, arc length calculation
This commit is contained in:
commit
e5c6448063
@ -117,7 +117,7 @@
|
|||||||
|
|
||||||
SERIAL_ECHOPGM("New position reads as ");
|
SERIAL_ECHOPGM("New position reads as ");
|
||||||
SERIAL_ECHO(get_position());
|
SERIAL_ECHO(get_position());
|
||||||
SERIAL_ECHOPGM("(");
|
SERIAL_CHAR('(');
|
||||||
SERIAL_ECHO(mm_from_count(get_position()));
|
SERIAL_ECHO(mm_from_count(get_position()));
|
||||||
SERIAL_ECHOLNPGM(")");
|
SERIAL_ECHOLNPGM(")");
|
||||||
#endif
|
#endif
|
||||||
|
@ -10029,7 +10029,7 @@ inline void gcode_M502() {
|
|||||||
|
|
||||||
if (!ijk) {
|
if (!ijk) {
|
||||||
SERIAL_ECHO_START();
|
SERIAL_ECHO_START();
|
||||||
SERIAL_ECHO(MSG_SKEW_FACTOR " XY: ");
|
SERIAL_ECHOPGM(MSG_SKEW_FACTOR " XY: ");
|
||||||
SERIAL_ECHO_F(planner.xy_skew_factor, 6);
|
SERIAL_ECHO_F(planner.xy_skew_factor, 6);
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
#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])
|
if (angular_travel == 0 && current_position[p_axis] == cart[p_axis] && current_position[q_axis] == cart[q_axis])
|
||||||
angular_travel = RADIANS(360);
|
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;
|
if (mm_of_travel < 0.001) return;
|
||||||
|
|
||||||
uint16_t segments = FLOOR(mm_of_travel / (MM_PER_ARC_SEGMENT));
|
uint16_t segments = FLOOR(mm_of_travel / (MM_PER_ARC_SEGMENT));
|
||||||
|
@ -2228,7 +2228,7 @@ void MarlinSettings::reset() {
|
|||||||
}
|
}
|
||||||
CONFIG_ECHO_START;
|
CONFIG_ECHO_START;
|
||||||
#if ENABLED(SKEW_CORRECTION_FOR_Z)
|
#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_ECHO_F(LINEAR_UNIT(planner.xy_skew_factor), 6);
|
||||||
SERIAL_ECHOPGM(" J");
|
SERIAL_ECHOPGM(" J");
|
||||||
SERIAL_ECHO_F(LINEAR_UNIT(planner.xz_skew_factor), 6);
|
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_ECHO_F(LINEAR_UNIT(planner.yz_skew_factor), 6);
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
#else
|
#else
|
||||||
SERIAL_ECHO(" M852 S");
|
SERIAL_ECHOPGM(" M852 S");
|
||||||
SERIAL_ECHO_F(LINEAR_UNIT(planner.xy_skew_factor), 6);
|
SERIAL_ECHO_F(LINEAR_UNIT(planner.xy_skew_factor), 6);
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
#endif
|
#endif
|
||||||
@ -2251,7 +2251,7 @@ void MarlinSettings::reset() {
|
|||||||
SERIAL_ECHOLNPGM("Stepper driver current:");
|
SERIAL_ECHOLNPGM("Stepper driver current:");
|
||||||
}
|
}
|
||||||
CONFIG_ECHO_START;
|
CONFIG_ECHO_START;
|
||||||
SERIAL_ECHO(" M906");
|
SERIAL_ECHOPGM(" M906");
|
||||||
#if ENABLED(X_IS_TMC2130) || ENABLED(X_IS_TMC2208)
|
#if ENABLED(X_IS_TMC2130) || ENABLED(X_IS_TMC2208)
|
||||||
SERIAL_ECHOPAIR(" X ", stepperX.getCurrent());
|
SERIAL_ECHOPAIR(" X ", stepperX.getCurrent());
|
||||||
#endif
|
#endif
|
||||||
@ -2297,7 +2297,7 @@ void MarlinSettings::reset() {
|
|||||||
SERIAL_ECHOLNPGM("Sensorless homing threshold:");
|
SERIAL_ECHOLNPGM("Sensorless homing threshold:");
|
||||||
}
|
}
|
||||||
CONFIG_ECHO_START;
|
CONFIG_ECHO_START;
|
||||||
SERIAL_ECHO(" M914");
|
SERIAL_ECHOPGM(" M914");
|
||||||
#if ENABLED(X_IS_TMC2130)
|
#if ENABLED(X_IS_TMC2130)
|
||||||
SERIAL_ECHOPAIR(" X", stepperX.sgt());
|
SERIAL_ECHOPAIR(" X", stepperX.sgt());
|
||||||
#endif
|
#endif
|
||||||
|
@ -282,7 +282,7 @@ void GCodeParser::unknown_command_error() {
|
|||||||
#else
|
#else
|
||||||
SERIAL_ECHOPAIR(" args: \"", command_args);
|
SERIAL_ECHOPAIR(" args: \"", command_args);
|
||||||
#endif
|
#endif
|
||||||
SERIAL_ECHOPGM("\"");
|
SERIAL_CHAR('"');
|
||||||
if (string_arg) {
|
if (string_arg) {
|
||||||
SERIAL_ECHOPGM(" string: \"");
|
SERIAL_ECHOPGM(" string: \"");
|
||||||
SERIAL_ECHO(string_arg);
|
SERIAL_ECHO(string_arg);
|
||||||
|
@ -362,7 +362,7 @@ void Planner::recalculate_trapezoids() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Recalculate the motion plan according to the following algorithm:
|
* Recalculate the motion plan according to the following algorithm:
|
||||||
*
|
*
|
||||||
* 1. Go over every block in reverse order...
|
* 1. Go over every block in reverse order...
|
||||||
@ -392,7 +392,6 @@ void Planner::recalculate() {
|
|||||||
recalculate_trapezoids();
|
recalculate_trapezoids();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if ENABLED(AUTOTEMP)
|
#if ENABLED(AUTOTEMP)
|
||||||
|
|
||||||
void Planner::getHighESpeed() {
|
void Planner::getHighESpeed() {
|
||||||
|
@ -140,7 +140,7 @@ void PrintCounter::showStats() {
|
|||||||
|
|
||||||
SERIAL_ECHOPGM("Filament used: ");
|
SERIAL_ECHOPGM("Filament used: ");
|
||||||
SERIAL_ECHO(this->data.filamentUsed / 1000);
|
SERIAL_ECHO(this->data.filamentUsed / 1000);
|
||||||
SERIAL_ECHOPGM("m");
|
SERIAL_CHAR('m');
|
||||||
|
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user