🧑‍💻 EXTRUDER_LOOP macro

This commit is contained in:
Scott Lahteine
2022-03-22 22:22:08 -05:00
committed by Scott Lahteine
parent b094a3fc0d
commit 4a8b99d505
15 changed files with 62 additions and 61 deletions

View File

@ -1505,7 +1505,7 @@ void Planner::check_axes_activity() {
volumetric_extruder_feedrate_limit[e] = (lim && siz) ? lim / CIRCLE_AREA(siz * 0.5f) : 0;
}
void Planner::calculate_volumetric_extruder_limits() {
LOOP_L_N(e, EXTRUDERS) calculate_volumetric_extruder_limit(e);
EXTRUDER_LOOP() calculate_volumetric_extruder_limit(e);
}
#endif

View File

@ -928,8 +928,8 @@ class Planner {
#if HAS_LINEAR_E_JERK
FORCE_INLINE static void recalculate_max_e_jerk() {
const float prop = junction_deviation_mm * SQRT(0.5) / (1.0f - SQRT(0.5));
LOOP_L_N(i, EXTRUDERS)
max_e_jerk[E_INDEX_N(i)] = SQRT(prop * settings.max_acceleration_mm_per_s2[E_INDEX_N(i)]);
EXTRUDER_LOOP()
max_e_jerk[E_INDEX_N(e)] = SQRT(prop * settings.max_acceleration_mm_per_s2[E_INDEX_N(e)]);
}
#endif

View File

@ -3138,9 +3138,9 @@ void MarlinSettings::reset() {
//
#if ENABLED(LIN_ADVANCE)
LOOP_L_N(i, EXTRUDERS) {
planner.extruder_advance_K[i] = LIN_ADVANCE_K;
TERN_(EXTRA_LIN_ADVANCE_K, other_extruder_advance_K[i] = LIN_ADVANCE_K);
EXTRUDER_LOOP() {
planner.extruder_advance_K[e] = LIN_ADVANCE_K;
TERN_(EXTRA_LIN_ADVANCE_K, other_extruder_advance_K[e] = LIN_ADVANCE_K);
}
#endif
@ -3185,7 +3185,7 @@ void MarlinSettings::reset() {
// Advanced Pause filament load & unload lengths
//
#if ENABLED(ADVANCED_PAUSE_FEATURE)
LOOP_L_N(e, EXTRUDERS) {
EXTRUDER_LOOP() {
fc_settings[e].unload_length = FILAMENT_CHANGE_UNLOAD_LENGTH;
fc_settings[e].load_length = FILAMENT_CHANGE_FAST_LOAD_LENGTH;
}