|
@@ -104,8 +104,12 @@ class Stepper {
|
104
|
104
|
static uint16_t current_adv_steps, final_adv_steps, max_adv_steps; // Copy from current executed block. Needed because current_block is set to NULL "too early".
|
105
|
105
|
#define _NEXT_ISR(T) nextMainISR = T
|
106
|
106
|
static int8_t e_steps;
|
107
|
|
- static int8_t LA_active_extruder; // Copy from current executed block. Needed because current_block is set to NULL "too early".
|
108
|
107
|
static bool use_advance_lead;
|
|
108
|
+ #if E_STEPPERS > 1
|
|
109
|
+ static int8_t LA_active_extruder; // Copy from current executed block. Needed because current_block is set to NULL "too early".
|
|
110
|
+ #else
|
|
111
|
+ constexpr int8_t LA_active_extruder = 0;
|
|
112
|
+ #endif
|
109
|
113
|
|
110
|
114
|
#else // !LIN_ADVANCE
|
111
|
115
|
|
|
@@ -352,19 +356,18 @@ class Stepper {
|
352
|
356
|
static int8_t last_extruder = -1;
|
353
|
357
|
|
354
|
358
|
#if ENABLED(LIN_ADVANCE)
|
355
|
|
- if (current_block->active_extruder != last_extruder) {
|
356
|
|
- current_adv_steps = 0; // If the now active extruder wasn't in use during the last move, its pressure is most likely gone.
|
357
|
|
- LA_active_extruder = current_block->active_extruder;
|
358
|
|
- }
|
|
359
|
+ #if E_STEPPERS > 1
|
|
360
|
+ if (current_block->active_extruder != last_extruder) {
|
|
361
|
+ current_adv_steps = 0; // If the now active extruder wasn't in use during the last move, its pressure is most likely gone.
|
|
362
|
+ LA_active_extruder = current_block->active_extruder;
|
|
363
|
+ }
|
|
364
|
+ #endif
|
359
|
365
|
|
360
|
|
- if (current_block->use_advance_lead) {
|
|
366
|
+ if ((use_advance_lead = current_block->use_advance_lead)) {
|
361
|
367
|
LA_decelerate_after = current_block->decelerate_after;
|
362
|
368
|
final_adv_steps = current_block->final_adv_steps;
|
363
|
369
|
max_adv_steps = current_block->max_adv_steps;
|
364
|
|
- use_advance_lead = true;
|
365
|
370
|
}
|
366
|
|
- else
|
367
|
|
- use_advance_lead = false;
|
368
|
371
|
#endif
|
369
|
372
|
|
370
|
373
|
if (current_block->direction_bits != last_direction_bits || current_block->active_extruder != last_extruder) {
|