Merge pull request #4936 from thinkyhead/rc_more_debug_homing

Put max_jerk vars in array, clean up jerk code
This commit is contained in:
Scott Lahteine 2016-10-02 06:54:54 -05:00 committed by GitHub
commit 6abfc96165
55 changed files with 211 additions and 170 deletions

View file

@ -498,7 +498,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -5548,11 +5548,11 @@ inline void gcode_M92() {
float value = code_value_per_axis_unit(i);
if (value < 20.0) {
float factor = planner.axis_steps_per_mm[i] / value; // increase e constants if M92 E14 is given for netfab.
planner.max_e_jerk *= factor;
planner.max_feedrate_mm_s[i] *= factor;
planner.max_acceleration_steps_per_s2[i] *= factor;
planner.max_jerk[E_AXIS] *= factor;
planner.max_feedrate_mm_s[E_AXIS] *= factor;
planner.max_acceleration_steps_per_s2[E_AXIS] *= factor;
}
planner.axis_steps_per_mm[i] = value;
planner.axis_steps_per_mm[E_AXIS] = value;
}
else {
planner.axis_steps_per_mm[i] = code_value_per_axis_unit(i);
@ -5788,9 +5788,10 @@ inline void gcode_M205() {
if (code_seen('S')) planner.min_feedrate_mm_s = code_value_linear_units();
if (code_seen('T')) planner.min_travel_feedrate_mm_s = code_value_linear_units();
if (code_seen('B')) planner.min_segment_time = code_value_millis();
if (code_seen('X')) planner.max_xy_jerk = code_value_linear_units();
if (code_seen('Z')) planner.max_z_jerk = code_value_axis_units(Z_AXIS);
if (code_seen('E')) planner.max_e_jerk = code_value_axis_units(E_AXIS);
if (code_seen('X')) planner.max_jerk[X_AXIS] = code_value_axis_units(X_AXIS);
if (code_seen('Y')) planner.max_jerk[Y_AXIS] = code_value_axis_units(Y_AXIS);
if (code_seen('Z')) planner.max_jerk[Z_AXIS] = code_value_axis_units(Z_AXIS);
if (code_seen('E')) planner.max_jerk[E_AXIS] = code_value_axis_units(E_AXIS);
}
/**

View file

@ -91,6 +91,8 @@
#error "SERVO_ENDSTOP_ANGLES is deprecated. Use Z_SERVO_ANGLES instead."
#elif defined(X_ENDSTOP_SERVO_NR) || defined(Y_ENDSTOP_SERVO_NR)
#error "X_ENDSTOP_SERVO_NR and Y_ENDSTOP_SERVO_NR are deprecated and should be removed."
#elif defined(DEFAULT_XYJERK)
#error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead."
#elif defined(XY_TRAVEL_SPEED)
#error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead."
#elif defined(PROBE_SERVO_DEACTIVATION_DELAY)

View file

@ -36,7 +36,7 @@
*
*/
#define EEPROM_VERSION "V25"
#define EEPROM_VERSION "V26"
// Change EEPROM version if these are changed:
#define EEPROM_OFFSET 100
@ -57,69 +57,70 @@
* 166 M205 S planner.min_feedrate_mm_s (float)
* 170 M205 T planner.min_travel_feedrate_mm_s (float)
* 174 M205 B planner.min_segment_time (ulong)
* 178 M205 X planner.max_xy_jerk (float)
* 182 M205 Z planner.max_z_jerk (float)
* 186 M205 E planner.max_e_jerk (float)
* 190 M206 XYZ home_offset (float x3)
* 178 M205 X planner.max_jerk[X_AXIS] (float)
* 182 M205 Y planner.max_jerk[Y_AXIS] (float)
* 186 M205 Z planner.max_jerk[Z_AXIS] (float)
* 190 M205 E planner.max_jerk[E_AXIS] (float)
* 194 M206 XYZ home_offset (float x3)
*
* Mesh bed leveling:
* 202 M420 S status (uint8)
* 203 z_offset (float)
* 207 mesh_num_x (uint8 as set in firmware)
* 208 mesh_num_y (uint8 as set in firmware)
* 209 G29 S3 XYZ z_values[][] (float x9, by default, up to float x 81)
* 206 M420 S status (uint8)
* 207 z_offset (float)
* 211 mesh_num_x (uint8 as set in firmware)
* 212 mesh_num_y (uint8 as set in firmware)
* 213 G29 S3 XYZ z_values[][] (float x9, by default, up to float x 81)
*
* AUTO BED LEVELING
* 245 M851 zprobe_zoffset (float)
* 249 M851 zprobe_zoffset (float)
*
* DELTA:
* 249 M666 XYZ endstop_adj (float x3)
* 261 M665 R delta_radius (float)
* 265 M665 L delta_diagonal_rod (float)
* 269 M665 S delta_segments_per_second (float)
* 273 M665 A delta_diagonal_rod_trim_tower_1 (float)
* 277 M665 B delta_diagonal_rod_trim_tower_2 (float)
* 281 M665 C delta_diagonal_rod_trim_tower_3 (float)
* 253 M666 XYZ endstop_adj (float x3)
* 265 M665 R delta_radius (float)
* 269 M665 L delta_diagonal_rod (float)
* 273 M665 S delta_segments_per_second (float)
* 277 M665 A delta_diagonal_rod_trim_tower_1 (float)
* 281 M665 B delta_diagonal_rod_trim_tower_2 (float)
* 285 M665 C delta_diagonal_rod_trim_tower_3 (float)
*
* Z_DUAL_ENDSTOPS:
* 285 M666 Z z_endstop_adj (float)
* 289 M666 Z z_endstop_adj (float)
*
* ULTIPANEL:
* 289 M145 S0 H preheatHotendTemp1 (int)
* 291 M145 S0 B preheatBedTemp1 (int)
* 293 M145 S0 F preheatFanSpeed1 (int)
* 295 M145 S1 H preheatHotendTemp2 (int)
* 297 M145 S1 B preheatBedTemp2 (int)
* 299 M145 S1 F preheatFanSpeed2 (int)
* 293 M145 S0 H preheatHotendTemp1 (int)
* 295 M145 S0 B preheatBedTemp1 (int)
* 297 M145 S0 F preheatFanSpeed1 (int)
* 299 M145 S1 H preheatHotendTemp2 (int)
* 301 M145 S1 B preheatBedTemp2 (int)
* 303 M145 S1 F preheatFanSpeed2 (int)
*
* PIDTEMP:
* 301 M301 E0 PIDC Kp[0], Ki[0], Kd[0], Kc[0] (float x4)
* 317 M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1] (float x4)
* 333 M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2] (float x4)
* 349 M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3] (float x4)
* 365 M301 L lpq_len (int)
* 305 M301 E0 PIDC Kp[0], Ki[0], Kd[0], Kc[0] (float x4)
* 321 M301 E1 PIDC Kp[1], Ki[1], Kd[1], Kc[1] (float x4)
* 337 M301 E2 PIDC Kp[2], Ki[2], Kd[2], Kc[2] (float x4)
* 353 M301 E3 PIDC Kp[3], Ki[3], Kd[3], Kc[3] (float x4)
* 369 M301 L lpq_len (int)
*
* PIDTEMPBED:
* 367 M304 PID thermalManager.bedKp, thermalManager.bedKi, thermalManager.bedKd (float x3)
* 371 M304 PID thermalManager.bedKp, thermalManager.bedKi, thermalManager.bedKd (float x3)
*
* DOGLCD:
* 379 M250 C lcd_contrast (int)
* 383 M250 C lcd_contrast (int)
*
* FWRETRACT:
* 381 M209 S autoretract_enabled (bool)
* 382 M207 S retract_length (float)
* 386 M207 W retract_length_swap (float)
* 390 M207 F retract_feedrate_mm_s (float)
* 394 M207 Z retract_zlift (float)
* 398 M208 S retract_recover_length (float)
* 402 M208 W retract_recover_length_swap (float)
* 406 M208 F retract_recover_feedrate_mm_s (float)
* 385 M209 S autoretract_enabled (bool)
* 386 M207 S retract_length (float)
* 390 M207 W retract_length_swap (float)
* 394 M207 F retract_feedrate_mm_s (float)
* 399 M207 Z retract_zlift (float)
* 402 M208 S retract_recover_length (float)
* 406 M208 W retract_recover_length_swap (float)
* 410 M208 F retract_recover_feedrate_mm_s (float)
*
* Volumetric Extrusion:
* 410 M200 D volumetric_enabled (bool)
* 411 M200 T D filament_size (float x4) (T0..3)
* 414 M200 D volumetric_enabled (bool)
* 415 M200 T D filament_size (float x4) (T0..3)
*
* 427 This Slot is Available!
* 431 This Slot is Available!
*
*/
#include "Marlin.h"
@ -219,9 +220,7 @@ void Config_StoreSettings() {
EEPROM_WRITE(planner.min_feedrate_mm_s);
EEPROM_WRITE(planner.min_travel_feedrate_mm_s);
EEPROM_WRITE(planner.min_segment_time);
EEPROM_WRITE(planner.max_xy_jerk);
EEPROM_WRITE(planner.max_z_jerk);
EEPROM_WRITE(planner.max_e_jerk);
EEPROM_WRITE(planner.max_jerk);
EEPROM_WRITE(home_offset);
#if ENABLED(MESH_BED_LEVELING)
@ -405,9 +404,7 @@ void Config_RetrieveSettings() {
EEPROM_READ(planner.min_feedrate_mm_s);
EEPROM_READ(planner.min_travel_feedrate_mm_s);
EEPROM_READ(planner.min_segment_time);
EEPROM_READ(planner.max_xy_jerk);
EEPROM_READ(planner.max_z_jerk);
EEPROM_READ(planner.max_e_jerk);
EEPROM_READ(planner.max_jerk);
EEPROM_READ(home_offset);
uint8_t dummy_uint8 = 0, mesh_num_x = 0, mesh_num_y = 0;
@ -576,9 +573,10 @@ void Config_ResetDefault() {
planner.min_feedrate_mm_s = DEFAULT_MINIMUMFEEDRATE;
planner.min_segment_time = DEFAULT_MINSEGMENTTIME;
planner.min_travel_feedrate_mm_s = DEFAULT_MINTRAVELFEEDRATE;
planner.max_xy_jerk = DEFAULT_XYJERK;
planner.max_z_jerk = DEFAULT_ZJERK;
planner.max_e_jerk = DEFAULT_EJERK;
planner.max_jerk[X_AXIS] = DEFAULT_XJERK;
planner.max_jerk[Y_AXIS] = DEFAULT_YJERK;
planner.max_jerk[Z_AXIS] = DEFAULT_ZJERK;
planner.max_jerk[E_AXIS] = DEFAULT_EJERK;
home_offset[X_AXIS] = home_offset[Y_AXIS] = home_offset[Z_AXIS] = 0;
#if ENABLED(MESH_BED_LEVELING)
@ -734,9 +732,10 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_ECHOPAIR(" M205 S", planner.min_feedrate_mm_s);
SERIAL_ECHOPAIR(" T", planner.min_travel_feedrate_mm_s);
SERIAL_ECHOPAIR(" B", planner.min_segment_time);
SERIAL_ECHOPAIR(" X", planner.max_xy_jerk);
SERIAL_ECHOPAIR(" Z", planner.max_z_jerk);
SERIAL_ECHOPAIR(" E", planner.max_e_jerk);
SERIAL_ECHOPAIR(" X", planner.max_jerk[X_AXIS]);
SERIAL_ECHOPAIR(" Y", planner.max_jerk[Y_AXIS]);
SERIAL_ECHOPAIR(" Z", planner.max_jerk[Z_AXIS]);
SERIAL_ECHOPAIR(" E", planner.max_jerk[E_AXIS]);
SERIAL_EOL;
CONFIG_ECHO_START;

View file

@ -498,7 +498,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 10.0
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -481,7 +481,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 10.0
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0

View file

@ -481,7 +481,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 10.0
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0

View file

@ -490,7 +490,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 10.0
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -492,7 +492,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 2.0

View file

@ -515,7 +515,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -498,7 +498,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 10.0
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.5
#define DEFAULT_EJERK 20.0

View file

@ -498,7 +498,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 10.0
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.5
#define DEFAULT_EJERK 20.0

View file

@ -498,7 +498,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -496,7 +496,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 8.0
#define DEFAULT_XJERK 8.0
#define DEFAULT_YJERK 8.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -513,7 +513,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 5.0
#define DEFAULT_XJERK 5.0
#define DEFAULT_YJERK 5.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 3.0

View file

@ -519,7 +519,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 8.0
#define DEFAULT_XJERK 8.0
#define DEFAULT_YJERK 8.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 10.0

View file

@ -490,7 +490,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 10.0
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -498,7 +498,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -541,7 +541,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 15.0
#define DEFAULT_XJERK 15.0
#define DEFAULT_YJERK 15.0
#define DEFAULT_ZJERK 15.0 // Must be same as XY for delta
#define DEFAULT_EJERK 5.0

View file

@ -541,7 +541,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 20.0 // Must be same as XY for delta
#define DEFAULT_EJERK 5.0

View file

@ -541,7 +541,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 20.0 // Must be same as XY for delta
#define DEFAULT_EJERK 5.0

View file

@ -537,7 +537,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 20.0 // Must be same as XY for delta
#define DEFAULT_EJERK 5.0

View file

@ -547,7 +547,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 20.0
#define DEFAULT_EJERK 20.0

View file

@ -501,7 +501,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -494,7 +494,8 @@
* When changing speed and direction, if the difference is less than the
* value set here, it may happen instantaneously.
*/
#define DEFAULT_XYJERK 20.0
#define DEFAULT_XJERK 20.0
#define DEFAULT_YJERK 20.0
#define DEFAULT_ZJERK 0.4
#define DEFAULT_EJERK 5.0

View file

@ -86,7 +86,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ves-jerk"
#define MSG_VMAX "Vmax"

View file

@ -88,7 +88,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acc"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -87,7 +87,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -86,7 +86,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -98,7 +98,8 @@
#define MSG_PID_C "PID-C"
#define MSG_SELECT "Vybrat"
#define MSG_ACC "Zrychl"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -96,7 +96,8 @@
#define MSG_PID_C "PID-C"
#define MSG_SELECT "Vælg"
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -95,9 +95,10 @@
#define MSG_PID_C "PID C"
#define MSG_SELECT "Auswählen"
#define MSG_ACC "A"
#define MSG_VXY_JERK "V XY Jerk"
#define MSG_VZ_JERK "V Z Jerk"
#define MSG_VE_JERK "V E Jerk"
#define MSG_VX_JERK "V X Jerk"
#define MSG_VY_JERK "V Y Jerk"
#define MSG_VZ_JERK "V Z Jerk"
#define MSG_VE_JERK "V E Jerk"
#define MSG_VMAX "V max " // space by purpose
#define MSG_VMIN "V min"
#define MSG_VTRAV_MIN "V min Leerfahrt"

View file

@ -94,7 +94,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Επιτάχυνση"
#define MSG_VXY_JERK "Vαντίδραση xy"
#define MSG_VX_JERK "Vαντίδραση x"
#define MSG_VY_JERK "Vαντίδραση y"
#define MSG_VZ_JERK "Vαντίδραση z"
#define MSG_VE_JERK "Vαντίδραση e"
#define MSG_VMAX "Vμεγ "

View file

@ -94,7 +94,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Επιτάχυνση"
#define MSG_VXY_JERK "Vαντίδραση xy"
#define MSG_VX_JERK "Vαντίδραση x"
#define MSG_VY_JERK "Vαντίδραση y"
#define MSG_VZ_JERK "Vαντίδραση z"
#define MSG_VE_JERK "Vαντίδραση e"
#define MSG_VMAX "V Μέγιστο"

View file

@ -216,8 +216,11 @@
#ifndef MSG_ACC
#define MSG_ACC "Accel"
#endif
#ifndef MSG_VXY_JERK
#define MSG_VXY_JERK "Vxy-jerk"
#ifndef MSG_VX_JERK
#define MSG_VX_JERK "Vx-jerk"
#endif
#ifndef MSG_VY_JERK
#define MSG_VY_JERK "Vy-jerk"
#endif
#ifndef MSG_VZ_JERK
#define MSG_VZ_JERK "Vz-jerk"

View file

@ -92,7 +92,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Aceleracion"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax"

View file

@ -86,7 +86,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Azelerazioa"
#define MSG_VXY_JERK "Vxy-astindua"
#define MSG_VX_JERK "Vx-astindua"
#define MSG_VY_JERK "Vy-astindua"
#define MSG_VZ_JERK "Vz-astindua"
#define MSG_VE_JERK "Ve-astindua"
#define MSG_VMAX "Vmax "

View file

@ -87,7 +87,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Kiihtyv"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -94,7 +94,8 @@
#define MSG_PID_C "PID-C"
#define MSG_SELECT "Selectionner"
#define MSG_ACC "Acceleration"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax"

View file

@ -95,7 +95,8 @@
#define MSG_PID_C "PID-C"
#define MSG_SELECT "Escolla"
#define MSG_ACC "Acel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -93,7 +93,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -102,7 +102,8 @@
#define MSG_PID_C "PID-C"
#define MSG_SELECT "Seleziona"
#define MSG_ACC "Accel"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -103,7 +103,8 @@
#define MSG_SELECT "\xbe\xdd\xc0\xb8" // "センタク" ("Select")
#if LCD_WIDTH > 19
#define MSG_ACC "\xb6\xbf\xb8\xc4\xde mm/s2" // "カソクド mm/s2" ("Accel")
#define MSG_VXY_JERK "XY\xbc\xde\xb8\x20\xd4\xb8\xc4\xde mm/s" // "XYジク ヤクド mm/s" ("Vxy-jerk")
#define MSG_VX_JERK "X\xbc\xde\xb8\x20\xd4\xb8\xc4\xde mm/s" // "XYジク ヤクド mm/s" ("Vx-jerk")
#define MSG_VY_JERK "Y\xbc\xde\xb8\x20\xd4\xb8\xc4\xde mm/s" // "XYジク ヤクド mm/s" ("Vy-jerk")
#define MSG_VZ_JERK "Z\xbc\xde\xb8\x20\xd4\xb8\xc4\xde mm/s" // "Zジク ヤクド mm/s" ("Vz-jerk")
#define MSG_VE_JERK "\xb4\xb8\xbd\xc4\xd9\xb0\xc0\xde\xb0\x20\xd4\xb8\xc4\xde" // "エクストルーダー ヤクド" ("Ve-jerk")
#define MSG_VMAX "\xbb\xb2\xc0\xde\xb2\xb5\xb8\xd8\xbf\xb8\xc4\xde " // "サイダイオクリソクド " ("Vmax ")
@ -112,7 +113,8 @@
#define MSG_AMAX "\xbb\xb2\xc0\xde\xb2\xb6\xbf\xb8\xc4\xde " // "サイダイカソクド " ("Amax ")
#else
#define MSG_ACC "\xb6\xbf\xb8\xc4\xde" // "カソクド" ("Accel")
#define MSG_VXY_JERK "XY\xbc\xde\xb8\x20\xd4\xb8\xc4\xde" // "XYジク ヤクド" ("Vxy-jerk")
#define MSG_VX_JERK "X\xbc\xde\xb8\x20\xd4\xb8\xc4\xde" // "XYジク ヤクド" ("Vx-jerk")
#define MSG_VY_JERK "Y\xbc\xde\xb8\x20\xd4\xb8\xc4\xde" // "XYジク ヤクド" ("Vy-jerk")
#define MSG_VZ_JERK "Z\xbc\xde\xb8\x20\xd4\xb8\xc4\xde" // "Zジク ヤクド" ("Vz-jerk")
#define MSG_VE_JERK "E\x20\xd4\xb8\xc4\xde" // "E ヤクド" ("Ve-jerk")
#define MSG_VMAX "max\xb5\xb8\xd8\xbf\xb8\xc4\xde " // "maxオクリソクド" ("Vmax ")

View file

@ -100,7 +100,8 @@
#define MSG_PID_C "PID-C"
#define MSG_SELECT "センタク" // "Select"
#define MSG_ACC "カソクド mm/s2" // "Accel"
#define MSG_VXY_JERK "XYジク ヤクド mm/s" // "Vxy-jerk"
#define MSG_VX_JERK "Xジク ヤクド mm/s" // "Vx-jerk"
#define MSG_VY_JERK "Yジク ヤクド mm/s" // "Vy-jerk"
#define MSG_VZ_JERK "Zジク ヤクド mm/s" // "Vz-jerk"
#define MSG_VE_JERK "エクストルーダー ヤクド" // "Ve-jerk"
#define MSG_VMAX "サイダイオクリソクド " // "Vmax "

View file

@ -87,7 +87,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Versn"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX "Vmax "

View file

@ -90,7 +90,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Przyspieszenie"
#define MSG_VXY_JERK "Zryw Vxy"
#define MSG_VX_JERK "Zryw Vx"
#define MSG_VY_JERK "Zryw Vy"
#define MSG_VZ_JERK "Zryw Vz"
#define MSG_VE_JERK "Zryw Ve"
#define MSG_VMAX "Vmax "

View file

@ -87,7 +87,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acc"
#define MSG_VXY_JERK "jogo VXY"
#define MSG_VX_JERK "jogo VX"
#define MSG_VY_JERK "jogo VY"
#define MSG_VZ_JERK "jogo VZ"
#define MSG_VE_JERK "jogo VE"
#define MSG_VMAX " Vmax "

View file

@ -87,7 +87,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acc"
#define MSG_VXY_JERK "jogo VXY"
#define MSG_VX_JERK "jogo VX"
#define MSG_VY_JERK "jogo VY"
#define MSG_VZ_JERK "jogo VZ"
#define MSG_VE_JERK "jogo VE"
#define MSG_VMAX " Vmax "

View file

@ -91,7 +91,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acc"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX " Vmax "

View file

@ -91,7 +91,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acc"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VX_JERK "Vx-jerk"
#define MSG_VY_JERK "Vy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VMAX " Vmax "

View file

@ -91,7 +91,8 @@
#define MSG_PID_D "PID-D"
#define MSG_PID_C "PID-C"
#define MSG_ACC "Acc"
#define MSG_VXY_JERK "Vxy-рывок"
#define MSG_VX_JERK "Vx-рывок"
#define MSG_VY_JERK "Vy-рывок"
#define MSG_VZ_JERK "Vz-рывок"
#define MSG_VE_JERK "Ve-рывок"
#define MSG_VMAX "Vмакс "

View file

@ -93,9 +93,7 @@ float Planner::min_feedrate_mm_s,
Planner::acceleration, // Normal acceleration mm/s^2 DEFAULT ACCELERATION for all printing moves. M204 SXXXX
Planner::retract_acceleration, // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
Planner::travel_acceleration, // Travel acceleration mm/s^2 DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
Planner::max_xy_jerk, // The largest speed change requiring no acceleration
Planner::max_z_jerk,
Planner::max_e_jerk,
Planner::max_jerk[XYZE], // The largest speed change requiring no acceleration
Planner::min_travel_feedrate_mm_s;
#if HAS_ABL
@ -152,33 +150,31 @@ void Planner::init() {
* by the provided factors.
*/
void Planner::calculate_trapezoid_for_block(block_t* block, float entry_factor, float exit_factor) {
unsigned long initial_rate = ceil(block->nominal_rate * entry_factor),
final_rate = ceil(block->nominal_rate * exit_factor); // (steps per second)
uint32_t initial_rate = ceil(block->nominal_rate * entry_factor),
final_rate = ceil(block->nominal_rate * exit_factor); // (steps per second)
// Limit minimal step rate (Otherwise the timer will overflow.)
NOLESS(initial_rate, 120);
NOLESS(final_rate, 120);
long accel = block->acceleration_steps_per_s2;
int32_t accelerate_steps = ceil(estimate_acceleration_distance(initial_rate, block->nominal_rate, accel));
int32_t decelerate_steps = floor(estimate_acceleration_distance(block->nominal_rate, final_rate, -accel));
// Calculate the size of Plateau of Nominal Rate.
int32_t plateau_steps = block->step_event_count - accelerate_steps - decelerate_steps;
int32_t accel = block->acceleration_steps_per_s2,
accelerate_steps = ceil(estimate_acceleration_distance(initial_rate, block->nominal_rate, accel)),
decelerate_steps = floor(estimate_acceleration_distance(block->nominal_rate, final_rate, -accel)),
plateau_steps = block->step_event_count - accelerate_steps - decelerate_steps;
// Is the Plateau of Nominal Rate smaller than nothing? That means no cruising, and we will
// have to use intersection_distance() to calculate when to abort accel and start braking
// in order to reach the final_rate exactly at the end of this block.
if (plateau_steps < 0) {
accelerate_steps = ceil(intersection_distance(initial_rate, final_rate, accel, block->step_event_count));
accelerate_steps = max(accelerate_steps, 0); // Check limits due to numerical round-off
NOLESS(accelerate_steps, 0); // Check limits due to numerical round-off
accelerate_steps = min((uint32_t)accelerate_steps, block->step_event_count);//(We can cast here to unsigned, because the above line ensures that we are above zero)
plateau_steps = 0;
}
#if ENABLED(ADVANCE)
volatile long initial_advance = block->advance * sq(entry_factor);
volatile long final_advance = block->advance * sq(exit_factor);
volatile int32_t initial_advance = block->advance * sq(entry_factor),
final_advance = block->advance * sq(exit_factor);
#endif // ADVANCE
// block->accelerate_until = accelerate_steps;
@ -268,7 +264,7 @@ void Planner::forward_pass_kernel(block_t* previous, block_t* current) {
// If nominal length is true, max junction speed is guaranteed to be reached. No need to recheck.
if (!previous->nominal_length_flag) {
if (previous->entry_speed < current->entry_speed) {
double entry_speed = min(current->entry_speed,
float entry_speed = min(current->entry_speed,
max_allowable_speed(-previous->acceleration, previous->entry_speed, previous->millimeters));
// Check for junction speed change
if (current->entry_speed != entry_speed) {
@ -984,15 +980,13 @@ void Planner::buffer_line(ARG_X, ARG_Y, ARG_Z, const float &e, float fr_mm_s, co
#endif
// Calculate and limit speed in mm/sec for each axis
float current_speed[NUM_AXIS];
float speed_factor = 1.0; //factor <=1 do decrease speed
float current_speed[NUM_AXIS], speed_factor = 1.0; // factor <1 decreases speed
LOOP_XYZE(i) {
current_speed[i] = delta_mm[i] * inverse_mm_s;
float cs = fabs(current_speed[i]), mf = max_feedrate_mm_s[i];
if (cs > mf) speed_factor = min(speed_factor, mf / cs);
float cs = fabs(current_speed[i] = delta_mm[i] * inverse_mm_s);
if (cs > max_feedrate_mm_s[i]) NOMORE(speed_factor, max_feedrate_mm_s[i] / cs);
}
// Max segement time in us.
// Max segment time in µs.
#ifdef XY_FREQUENCY_LIMIT
// Check and limit the xy direction change frequency
@ -1026,7 +1020,7 @@ void Planner::buffer_line(ARG_X, ARG_Y, ARG_Z, const float &e, float fr_mm_s, co
min_xy_segment_time = min(max_x_segment_time, max_y_segment_time);
if (min_xy_segment_time < MAX_FREQ_TIME) {
float low_sf = speed_factor * min_xy_segment_time / (MAX_FREQ_TIME);
speed_factor = min(speed_factor, low_sf);
NOMORE(speed_factor, low_sf);
}
#endif // XY_FREQUENCY_LIMIT
@ -1093,45 +1087,40 @@ void Planner::buffer_line(ARG_X, ARG_Y, ARG_Z, const float &e, float fr_mm_s, co
if (cos_theta > -0.95) {
// Compute maximum junction velocity based on maximum acceleration and junction deviation
double sin_theta_d2 = sqrt(0.5 * (1.0 - cos_theta)); // Trig half angle identity. Always positive.
vmax_junction = min(vmax_junction,
sqrt(block->acceleration * junction_deviation * sin_theta_d2 / (1.0 - sin_theta_d2)));
NOMORE(vmax_junction, sqrt(block->acceleration * junction_deviation * sin_theta_d2 / (1.0 - sin_theta_d2)));
}
}
}
#endif
// Start with a safe speed
float vmax_junction = max_xy_jerk * 0.5,
vmax_junction_factor = 1.0,
mz2 = max_z_jerk * 0.5,
me2 = max_e_jerk * 0.5,
csz = current_speed[Z_AXIS],
cse = current_speed[E_AXIS];
if (fabs(csz) > mz2) vmax_junction = min(vmax_junction, mz2);
if (fabs(cse) > me2) vmax_junction = min(vmax_junction, me2);
vmax_junction = min(vmax_junction, block->nominal_speed);
float vmax_junction = max_jerk[X_AXIS] * 0.5, vmax_junction_factor = 1.0;
if (max_jerk[Y_AXIS] * 0.5 < fabs(current_speed[Y_AXIS])) NOMORE(vmax_junction, max_jerk[Y_AXIS] * 0.5);
if (max_jerk[Z_AXIS] * 0.5 < fabs(current_speed[Z_AXIS])) NOMORE(vmax_junction, max_jerk[Z_AXIS] * 0.5);
if (max_jerk[E_AXIS] * 0.5 < fabs(current_speed[E_AXIS])) NOMORE(vmax_junction, max_jerk[E_AXIS] * 0.5);
NOMORE(vmax_junction, block->nominal_speed);
float safe_speed = vmax_junction;
if ((moves_queued > 1) && (previous_nominal_speed > 0.0001)) {
float dsx = current_speed[X_AXIS] - previous_speed[X_AXIS],
dsy = current_speed[Y_AXIS] - previous_speed[Y_AXIS],
dsz = fabs(csz - previous_speed[Z_AXIS]),
dse = fabs(cse - previous_speed[E_AXIS]),
jerk = HYPOT(dsx, dsy);
if (moves_queued > 1 && previous_nominal_speed > 0.0001) {
//if ((fabs(previous_speed[X_AXIS]) > 0.0001) || (fabs(previous_speed[Y_AXIS]) > 0.0001)) {
vmax_junction = block->nominal_speed;
//}
// if ((fabs(previous_speed[X_AXIS]) > 0.0001) || (fabs(previous_speed[Y_AXIS]) > 0.0001)) {
vmax_junction = block->nominal_speed;
// }
if (jerk > max_xy_jerk) vmax_junction_factor = max_xy_jerk / jerk;
if (dsz > max_z_jerk) vmax_junction_factor = min(vmax_junction_factor, max_z_jerk / dsz);
if (dse > max_e_jerk) vmax_junction_factor = min(vmax_junction_factor, max_e_jerk / dse);
float dsx = fabs(current_speed[X_AXIS] - previous_speed[X_AXIS]),
dsy = fabs(current_speed[Y_AXIS] - previous_speed[Y_AXIS]),
dsz = fabs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]),
dse = fabs(current_speed[E_AXIS] - previous_speed[E_AXIS]);
if (dsx > max_jerk[X_AXIS]) NOMORE(vmax_junction_factor, max_jerk[X_AXIS] / dsx);
if (dsy > max_jerk[Y_AXIS]) NOMORE(vmax_junction_factor, max_jerk[Y_AXIS] / dsy);
if (dsz > max_jerk[Z_AXIS]) NOMORE(vmax_junction_factor, max_jerk[Z_AXIS] / dsz);
if (dse > max_jerk[E_AXIS]) NOMORE(vmax_junction_factor, max_jerk[E_AXIS] / dse);
vmax_junction = min(previous_nominal_speed, vmax_junction * vmax_junction_factor); // Limit speed to max previous speed
}
block->max_entry_speed = vmax_junction;
// Initialize block entry speed. Compute based on deceleration to user-defined MINIMUM_PLANNER_SPEED.
double v_allowable = max_allowable_speed(-block->acceleration, MINIMUM_PLANNER_SPEED, block->millimeters);
float v_allowable = max_allowable_speed(-block->acceleration, MINIMUM_PLANNER_SPEED, block->millimeters);
block->entry_speed = min(vmax_junction, v_allowable);
// Initialize planner efficiency flags
@ -1173,7 +1162,7 @@ void Planner::buffer_line(ARG_X, ARG_Y, ARG_Z, const float &e, float fr_mm_s, co
}
else {
long acc_dist = estimate_acceleration_distance(0, block->nominal_rate, block->acceleration_steps_per_s2);
float advance = ((STEPS_PER_CUBIC_MM_E) * (EXTRUDER_ADVANCE_K)) * HYPOT(cse, EXTRUSION_AREA) * 256;
float advance = ((STEPS_PER_CUBIC_MM_E) * (EXTRUDER_ADVANCE_K)) * HYPOT(current_speed[E_AXIS], EXTRUSION_AREA) * 256;
block->advance = advance;
block->advance_rate = acc_dist ? advance / (float)acc_dist : 0;
}

View file

@ -132,9 +132,7 @@ class Planner {
static float acceleration; // Normal acceleration mm/s^2 DEFAULT ACCELERATION for all printing moves. M204 SXXXX
static float retract_acceleration; // Retract acceleration mm/s^2 filament pull-back and push-forward while standing still in the other axes M204 TXXXX
static float travel_acceleration; // Travel acceleration mm/s^2 DEFAULT ACCELERATION for all NON printing moves. M204 MXXXX
static float max_xy_jerk; // The largest speed change requiring no acceleration
static float max_z_jerk;
static float max_e_jerk;
static float max_jerk[XYZE]; // The largest speed change requiring no acceleration
static float min_travel_feedrate_mm_s;
#if HAS_ABL

View file

@ -265,8 +265,8 @@ uint8_t Temperature::soft_pwm[HOTENDS];
#endif
;
max = max(max, input);
min = min(min, input);
NOLESS(max, input);
NOMORE(min, input);
#if HAS_AUTO_FAN
if (ELAPSED(ms, next_auto_fan_check_ms)) {

View file

@ -1812,13 +1812,14 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM_EDIT(float43, MSG_BED_Z, &mbl.z_offset, -1, 1);
#endif
MENU_ITEM_EDIT(float5, MSG_ACC, &planner.acceleration, 10, 99000);
MENU_ITEM_EDIT(float3, MSG_VXY_JERK, &planner.max_xy_jerk, 1, 990);
MENU_ITEM_EDIT(float3, MSG_VX_JERK, &planner.max_jerk[X_AXIS], 1, 990);
MENU_ITEM_EDIT(float3, MSG_VY_JERK, &planner.max_jerk[Y_AXIS], 1, 990);
#if ENABLED(DELTA)
MENU_ITEM_EDIT(float3, MSG_VZ_JERK, &planner.max_z_jerk, 1, 990);
MENU_ITEM_EDIT(float3, MSG_VZ_JERK, &planner.max_jerk[Y_AXIS], 1, 990);
#else
MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &planner.max_z_jerk, 0.1, 990);
MENU_ITEM_EDIT(float52, MSG_VZ_JERK, &planner.max_jerk[Z_AXIS], 0.1, 990);
#endif
MENU_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_e_jerk, 1, 990);
MENU_ITEM_EDIT(float3, MSG_VE_JERK, &planner.max_jerk[E_AXIS], 1, 990);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_X, &planner.max_feedrate_mm_s[X_AXIS], 1, 999);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Y, &planner.max_feedrate_mm_s[Y_AXIS], 1, 999);
MENU_ITEM_EDIT(float3, MSG_VMAX MSG_Z, &planner.max_feedrate_mm_s[Z_AXIS], 1, 999);