Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2026-01-22"
//#define STRING_DISTRIBUTION_DATE "2026-01-23"

/**
* The protocol for communication to the host. Protocol indicates communication
Expand Down
24 changes: 19 additions & 5 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
#if ENABLED(NONLINEAR_EXTRUSION)
#if HAS_MULTI_EXTRUDER
#error "NONLINEAR_EXTRUSION doesn't currently support multi-extruder setups."
#elif DISABLED(CPU_32_BIT)
#error "NONLINEAR_EXTRUSION requires a 32-bit CPU."
#elif NONE(CPU_32_BIT, NO_STANDARD_MOTION)
#error "NONLINEAR_EXTRUSION requires a 32-bit CPU or NO_STANDARD_MOTION."
#endif
#endif

Expand Down Expand Up @@ -2715,6 +2715,22 @@ static_assert(NUM_SERVOS <= NUM_SERVO_PLUGS, "NUM_SERVOS (or some servo index) i
#elif ENABLED(NEO2_COLOR_PRESETS) && DISABLED(NEOPIXEL2_SEPARATE)
#error "NEO2_COLOR_PRESETS requires NEOPIXEL2_SEPARATE to be enabled."
#endif
#ifdef BOARD_NEOPIXEL_MAX
#if (NEOPIXEL_PIXELS > BOARD_NEOPIXEL_MAX && NEOPIXEL_PIN == BOARD_NEOPIXEL_PIN) || (NEOPIXEL_PIXELS > BOARD_NEOPIXEL_MAX && DISABLED(NEOPIXEL2_SEPARATE) && NEOPIXEL2_PIN == BOARD_NEOPIXEL_PIN)
#if ENABLED(BOARD_HAS_DCDC5V)
#error "NEOPIXEL_PIXELS exceeds the recommended maximum for your MOTHERBOARD."
#elif MB(BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0)
static_assert(false, "\nNEOPIXEL_PIXELS exceeds the recommended maximum for your MOTHERBOARD.\nConsider adding a 5V DC-DC converter and #define BOARD_HAS_DCDC5V to your Configuration.h.");
#endif
#endif
#if ENABLED(NEOPIXEL2_SEPARATE) && NEOPIXEL2_PIXELS > BOARD_NEOPIXEL_MAX && NEOPIXEL2_PIN == BOARD_NEOPIXEL_PIN
#if ENABLED(BOARD_HAS_DCDC5V)
#error "NEOPIXEL2_PIXELS exceeds the recommended maximum for your MOTHERBOARD."
#elif MB(BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0)
static_assert(false, "\nNEOPIXEL2_PIXELS exceeds the recommended maximum for your MOTHERBOARD.\nConsider adding a 5V DC-DC converter and #define BOARD_HAS_DCDC5V to your Configuration.h.");
#endif
#endif
#endif
#endif

#if DISABLED(NO_COMPILE_TIME_PWM)
Expand Down Expand Up @@ -4499,9 +4515,7 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
#error "EMERGENCY_PARSER is required with FTM_RESONANCE_TEST (to cancel the test)."
#endif
#if !HAS_STANDARD_MOTION
#if ENABLED(NONLINEAR_EXTRUSION)
#error "NONLINEAR_EXTRUSION is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
#elif ENABLED(SMOOTH_LIN_ADVANCE)
#if ENABLED(SMOOTH_LIN_ADVANCE)
#error "SMOOTH_LIN_ADVANCE is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
#elif ENABLED(MIXING_EXTRUDER)
#error "MIXING_EXTRUDER is not yet available in FT_MOTION. Disable NO_STANDARD_MOTION if you require it."
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2026-01-22"
#define STRING_DISTRIBUTION_DATE "2026-01-23"
#endif

/**
Expand Down
3 changes: 0 additions & 3 deletions Marlin/src/inc/Warnings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,9 +941,6 @@
#if ENABLED(I2S_STEPPER_STREAM)
#warning "FT_MOTION has not been tested with I2S_STEPPER_STREAM."
#endif
#if ENABLED(NONLINEAR_EXTRUSION)
#warning "NONLINEAR_EXTRUSION does not (currently) operate when FT_MOTION is the active motion system."
#endif
#if ENABLED(LIN_ADVANCE)
#warning "Be aware that FT_MOTION K factor is now set with M900 K (same as LIN_ADVANCE)."
#if DISABLED(FTM_SMOOTHING)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/dgus_e3s1pro/dgus_e3s1pro_extui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,4 @@ namespace ExtUI {
void onAxisEnabled(const axis_t) {}
}

#endif // DGUS_LCD_UI_RELOADED
#endif // DGUS_LCD_UI_E3S1PRO
11 changes: 6 additions & 5 deletions Marlin/src/lcd/menu/menu_mmu2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ inline void action_mmu2_load_to_nozzle(const uint8_t tool) {
ui.reset_status();
ui.return_to_status();
ui.status_printf(0, GET_TEXT_F(MSG_MMU2_LOADING_FILAMENT), int(tool + 1));
TERN(HAS_PRUSA_MMU3, mmu3.load_to_nozzle(tool), mmu2.load_to_nozzle(tool));
TERN(HAS_PRUSA_MMU3, mmu3, mmu2).load_to_nozzle(tool);
ui.reset_status();
}

void _mmu2_load_to_feeder(const uint8_t tool) {
ui.reset_status();
ui.return_to_status();
ui.status_printf(0, GET_TEXT_F(MSG_MMU2_LOADING_FILAMENT), int(tool + 1));
TERN(HAS_PRUSA_MMU3, mmu3.load_to_feeder(tool), mmu2.load_to_feeder(tool));
TERN(HAS_PRUSA_MMU3, mmu3, mmu2).load_to_feeder(tool);
ui.reset_status();
}

Expand Down Expand Up @@ -82,7 +82,8 @@ void _mmu2_eject_filament(uint8_t index) {
ui.reset_status();
ui.return_to_status();
ui.status_printf(0, GET_TEXT_F(MSG_MMU2_EJECTING_FILAMENT), int(index + 1));
if (mmu3.eject_filament(index, true)) ui.reset_status();
if (TERN(HAS_PRUSA_MMU3, mmu3, mmu2).eject_filament(index, true))
ui.reset_status();
}

void _mmu2_cut_filament(uint8_t index) {
Expand All @@ -97,7 +98,7 @@ void action_mmu2_unload_filament() {
ui.reset_status();
ui.return_to_status();
LCD_MESSAGE(MSG_MMU2_UNLOADING_FILAMENT);
while (!TERN(HAS_PRUSA_MMU3, mmu3.unload(), mmu2.unload())) {
while (!TERN(HAS_PRUSA_MMU3, mmu3, mmu2).unload()) {
safe_delay(50);
TERN(HAS_PRUSA_MMU3, MMU3::marlin_idle(true), marlin.idle());
}
Expand Down Expand Up @@ -342,7 +343,7 @@ void menu_mmu2_choose_filament() {
//

void menu_mmu2_pause() {
feeder_index = mmu3.get_current_tool();
feeder_index = TERN(HAS_PRUSA_MMU3, mmu3, mmu2).get_current_tool();
START_MENU();
#if LCD_HEIGHT > 2
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, SS_DEFAULT|SS_INVERT);
Expand Down
40 changes: 32 additions & 8 deletions Marlin/src/module/ft_motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,21 +478,42 @@ xyze_float_t FTMotion::calc_traj_point(const float dist) {
LOGICAL_AXIS_MAP_LC(_SET_TRAJ);

#if FTM_HAS_LIN_ADVANCE
const float advK = planner.get_advance_k();
if (advK) {
const float traj_e = traj_coords.e;
if (use_advance_lead) {
// Don't apply LA to retract/unretract blocks
const float e_rate = (traj_e - prev_traj_e) * (FTM_FS);

// Apply LA/NLE only to printing (not retract/unretract) blocks

if (use_advance_lead) {
const float advK = planner.get_advance_k();
if (advK || TERN0(NONLINEAR_EXTRUSION, stepper.ne.settings.enabled)) {
float traj_e = traj_coords.e;
const float traj_e_delta = traj_e - prev_traj_e; // extruder delta in mm, always positive for use_advance_lead (printing moves)
const float e_rate = traj_e_delta * FTM_FS; // extruder velocity in mm/s

traj_coords.e += e_rate * advK;

#if ENABLED(NONLINEAR_EXTRUSION)
if (stepper.ne.settings.enabled) {
const nonlinear_coeff_t &coeff = stepper.ne.settings.coeff;
const float multiplier = max(coeff.C, coeff.A * sq(e_rate) + coeff.B * e_rate + coeff.C),
nle_term = traj_e_delta * (multiplier - 1);

traj_coords.e += nle_term;
traj_e += nle_term;
startPos.e += nle_term;
endPos_prevBlock.e += nle_term;
}
#endif

prev_traj_e = traj_e;
}
prev_traj_e = traj_e;
}
#endif

#endif // FTM_HAS_LIN_ADVANCE

// Update shaping parameters if needed.
switch (cfg.dynFreqMode) {

#if HAS_DYNAMIC_FREQ_MM

case dynFreqMode_Z_BASED: {
static float oldz = 0.0f;
const float z = traj_coords.z;
Expand All @@ -509,9 +530,11 @@ xyze_float_t FTMotion::calc_traj_point(const float dist) {
shaping.refresh_largest_delay_samples();
}
} break;

#endif

#if HAS_DYNAMIC_FREQ_G

case dynFreqMode_MASS_BASED:
// Update constantly. The optimization done for Z value makes
// less sense for E, as E is expected to constantly change.
Expand All @@ -523,6 +546,7 @@ xyze_float_t FTMotion::calc_traj_point(const float dist) {
#endif
shaping.refresh_largest_delay_samples();
break;

#endif

default: break;
Expand Down
10 changes: 6 additions & 4 deletions Marlin/src/module/stepper.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,14 @@ constexpr ena_mask_t enable_overlap[] = {
#define NONLINEAR_EXTRUSION_Q24 1
#endif

typedef struct {
float A, B, C;
void reset() { A = B = 0.0f; C = 1.0f; }
} nonlinear_coeff_t;

typedef struct {
bool enabled;
struct {
float A, B, C;
void reset() { A = B = 0.0f; C = 1.0f; }
} coeff;
nonlinear_coeff_t coeff;
void reset() {
enabled = ENABLED(NONLINEAR_EXTRUSION_DEFAULT_ON);
coeff.reset();
Expand Down
7 changes: 5 additions & 2 deletions Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@
// Release PA13/PA14 (led, usb control) from SWD pins
#define DISABLE_DEBUG

#ifndef BOARD_NEOPIXEL_PIN
#define BOARD_NEOPIXEL_PIN PA8 // LED driving pin
#define BOARD_NEOPIXEL_PIN PA8 // LED driving pin
#ifndef BOARD_HAS_DCDC5V
#define BOARD_NEOPIXEL_MAX 7 // Max number of NEOPIXELS supported on this board
#else
#define BOARD_NEOPIXEL_MAX 29 // With 5V DC-DC converter
#endif

#ifndef PS_ON_PIN
Expand Down
7 changes: 5 additions & 2 deletions Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,11 @@
//
// NeoPixel
//
#ifndef BOARD_NEOPIXEL_PIN
#define BOARD_NEOPIXEL_PIN PA8 // LED driving pin
#define BOARD_NEOPIXEL_PIN PA8 // LED driving pin
#ifndef BOARD_HAS_DCDC5V
#define BOARD_NEOPIXEL_MAX 7 // Max number of NEOPIXELS supported on this board
#else
#define BOARD_NEOPIXEL_MAX 29 // With 5V DC-DC converter
#endif

// Pins for documentation and sanity checks only.
Expand Down
Loading