Skip to content

Commit 4d60675

Browse files
vovodroideoyilmaz
authored andcommitted
🔧 Adjust DEFAULT_EJERK settings (MarlinFirmware#26665)
1 parent ed254ae commit 4d60675

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

Marlin/Configuration.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@
12921292
#define DEFAULT_XJERK 10.0
12931293
#define DEFAULT_YJERK 10.0
12941294
#define DEFAULT_ZJERK 0.3
1295+
#define DEFAULT_EJERK 5.0
12951296
//#define DEFAULT_IJERK 0.3
12961297
//#define DEFAULT_JJERK 0.3
12971298
//#define DEFAULT_KJERK 0.3
@@ -1307,8 +1308,6 @@
13071308
#endif
13081309
#endif
13091310

1310-
#define DEFAULT_EJERK 5.0 // May be used by Linear Advance
1311-
13121311
/**
13131312
* Junction Deviation Factor
13141313
*

Marlin/Configuration_adv.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -2320,7 +2320,9 @@
23202320
#endif
23212321
//#define ADVANCE_K_EXTRA // Add a second linear advance constant, configurable with M900 L.
23222322
//#define LA_DEBUG // Print debug information to serial during operation. Disable for production use.
2323-
//#define ALLOW_LOW_EJERK // Allow a DEFAULT_EJERK value of <10. Recommended for direct drive hotends.
2323+
#if ENABLED(CLASSIC_JERK)
2324+
//#define ALLOW_LOW_EJERK // Allow a DEFAULT_EJERK value of <10. Recommended for direct drive hotends.
2325+
#endif
23242326
//#define EXPERIMENTAL_I2S_LA // Allow I2S_STEPPER_STREAM to be used with LA. Performance degrades as the LA step rate reaches ~20kHz.
23252327
#endif
23262328

Marlin/src/gcode/host/M360.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ void GcodeSuite::M360() {
182182
config_line(F("NumExtruder"), EXTRUDERS);
183183
#if HAS_EXTRUDERS
184184
EXTRUDER_LOOP() {
185-
config_line_e(e, JERK_STR, TERN(HAS_LINEAR_E_JERK, planner.max_e_jerk[E_INDEX_N(e)], TERN(CLASSIC_JERK, planner.max_jerk.e, DEFAULT_EJERK)));
185+
#if HAS_LINEAR_E_JERK
186+
config_line_e(e, JERK_STR, planner.max_e_jerk[E_INDEX_N(e)]);
187+
#elif ENABLED(CLASSIC_JERK)
188+
config_line_e(e, JERK_STR, planner.max_jerk.e);
189+
#endif
186190
config_line_e(e, F("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]);
187191
config_line_e(e, F("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]);
188192
config_line_e(e, F("Diameter"), TERN(NO_VOLUMETRICS, DEFAULT_NOMINAL_FILAMENT_DIA, planner.filament_size[e]));

Marlin/src/module/planner.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -3386,8 +3386,12 @@ void Planner::set_max_feedrate(const AxisEnum axis, float inMaxFeedrateMMS) {
33863386
#ifdef MAX_JERK_EDIT_VALUES
33873387
MAX_JERK_EDIT_VALUES
33883388
#else
3389-
{ (DEFAULT_XJERK) * 2, (DEFAULT_YJERK) * 2,
3390-
(DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 }
3389+
LOGICAL_AXIS_ARRAY(
3390+
(DEFAULT_EJERK) * 2,
3391+
(DEFAULT_XJERK) * 2, (DEFAULT_YJERK) * 2, (DEFAULT_ZJERK) * 2,
3392+
(DEFAULT_IJERK) * 2, (DEFAULT_JJERK) * 2, (DEFAULT_KJERK) * 2,
3393+
(DEFAULT_UJERK) * 2, (DEFAULT_VJERK) * 2, (DEFAULT_WJERK) * 2
3394+
)
33913395
#endif
33923396
;
33933397
limit_and_warn(inMaxJerkMMS, axis, F("Jerk"), max_jerk_edit);

Marlin/src/module/settings.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ void MarlinSettings::postprocess() {
879879
EEPROM_WRITE(dummyf);
880880
#endif
881881
#else
882-
const xyze_pos_t planner_max_jerk = LOGICAL_AXIS_ARRAY(float(DEFAULT_EJERK), 10, 10, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4);
882+
const xyze_pos_t planner_max_jerk = LOGICAL_AXIS_ARRAY(5, 10, 10, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4);
883883
EEPROM_WRITE(planner_max_jerk);
884884
#endif
885885

0 commit comments

Comments
 (0)