Skip to content

Commit 11046b2

Browse files
authored
🔧 FT Motion Linear Advance K factor nnnn.nn (#27416)
Lost part of #26785
1 parent 36b7292 commit 11046b2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Marlin/Configuration_adv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@
11351135
#define FTM_SHAPING_DEFAULT_FREQ_X 37.0f // (Hz) Default peak frequency used by input shapers
11361136
#define FTM_SHAPING_DEFAULT_FREQ_Y 37.0f // (Hz) Default peak frequency used by input shapers
11371137
#define FTM_LINEAR_ADV_DEFAULT_ENA false // Default linear advance enable (true) or disable (false)
1138-
#define FTM_LINEAR_ADV_DEFAULT_K 0 // Default linear advance gain, integer value. (Acceleration-based scaling factor.)
1138+
#define FTM_LINEAR_ADV_DEFAULT_K 0.0f // Default linear advance gain. (Acceleration-based scaling factor.)
11391139
#define FTM_SHAPING_ZETA_X 0.1f // Zeta used by input shapers for X axis
11401140
#define FTM_SHAPING_ZETA_Y 0.1f // Zeta used by input shapers for Y axis
11411141

Marlin/src/lcd/menu/menu_motion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ void menu_move() {
464464
#if HAS_EXTRUDERS
465465
EDIT_ITEM(bool, MSG_LINEAR_ADVANCE, &c.linearAdvEna);
466466
if (c.linearAdvEna || ENABLED(FT_MOTION_NO_MENU_TOGGLE))
467-
EDIT_ITEM(float42_52, MSG_ADVANCE_K, &c.linearAdvK, 0, 10);
467+
EDIT_ITEM(float62, MSG_ADVANCE_K, &c.linearAdvK, 0.0f, 1000.0f);
468468
#endif
469469
}
470470
END_MENU();

Marlin/src/module/ft_motion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ void FTMotion::makeVector() {
607607
#if HAS_EXTRUDERS
608608
if (cfg.linearAdvEna) {
609609
float dedt_adj = (traj.e[makeVector_batchIdx] - e_raw_z1) * (FTM_FS);
610-
if (ratio.e > 0.0f) dedt_adj += accel_k * cfg.linearAdvK;
610+
if (ratio.e > 0.0f) dedt_adj += accel_k * cfg.linearAdvK * 0.0001f;
611611

612612
e_raw_z1 = traj.e[makeVector_batchIdx];
613613
e_advanced_z1 += dedt_adj * (FTM_TS);

0 commit comments

Comments
 (0)