Correct HOTENDS for SWITCHING_EXTRUDER
This commit is contained in:
parent
33b7488f68
commit
fbeea12026
@ -206,7 +206,6 @@ script:
|
||||
- opt_set EXTRUDERS 2
|
||||
- opt_enable NUM_SERVOS
|
||||
- opt_set NUM_SERVOS 1
|
||||
- opt_set TEMP_SENSOR_1 1
|
||||
- opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
|
||||
- build_marlin
|
||||
#
|
||||
|
@ -396,15 +396,6 @@
|
||||
* E_MANUAL - Number of E steppers for LCD move options
|
||||
*
|
||||
*/
|
||||
#if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
|
||||
#define HOTENDS 1
|
||||
#undef TEMP_SENSOR_1_AS_REDUNDANT
|
||||
#undef HOTEND_OFFSET_X
|
||||
#undef HOTEND_OFFSET_Y
|
||||
#else // Two hotends
|
||||
#define HOTENDS EXTRUDERS
|
||||
#endif
|
||||
|
||||
#if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
|
||||
#if EXTRUDERS > 4
|
||||
#define E_STEPPERS 3
|
||||
@ -413,6 +404,7 @@
|
||||
#else
|
||||
#define E_STEPPERS 1
|
||||
#endif
|
||||
#define HOTENDS E_STEPPERS
|
||||
#define E_MANUAL EXTRUDERS
|
||||
#elif ENABLED(MIXING_EXTRUDER)
|
||||
#define E_STEPPERS MIXING_STEPPERS
|
||||
@ -422,6 +414,18 @@
|
||||
#define E_MANUAL EXTRUDERS
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER) // One hotend, one thermistor, no XY offset
|
||||
#undef HOTENDS
|
||||
#define HOTENDS 1
|
||||
#undef TEMP_SENSOR_1_AS_REDUNDANT
|
||||
#undef HOTEND_OFFSET_X
|
||||
#undef HOTEND_OFFSET_Y
|
||||
#endif
|
||||
|
||||
#ifndef HOTENDS
|
||||
#define HOTENDS EXTRUDERS
|
||||
#endif
|
||||
|
||||
#define DO_SWITCH_EXTRUDER (ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR))
|
||||
|
||||
/**
|
||||
|
@ -14005,8 +14005,16 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
|
||||
&& !planner.has_blocks_queued()
|
||||
) {
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
const bool oldstatus = E0_ENABLE_READ;
|
||||
enable_E0();
|
||||
bool oldstatus;
|
||||
switch (active_extruder) {
|
||||
default: oldstatus = E0_ENABLE_READ; enable_E0(); break;
|
||||
#if E_STEPPERS > 1
|
||||
case 2: case 3: oldstatus = E1_ENABLE_READ; enable_E1(); break;
|
||||
#if E_STEPPERS > 2
|
||||
case 4: oldstatus = E2_ENABLE_READ; enable_E2(); break;
|
||||
#endif // E_STEPPERS > 2
|
||||
#endif // E_STEPPERS > 1
|
||||
}
|
||||
#else // !SWITCHING_EXTRUDER
|
||||
bool oldstatus;
|
||||
switch (active_extruder) {
|
||||
@ -14031,11 +14039,19 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
|
||||
planner.buffer_line_kinematic(current_position, MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder);
|
||||
current_position[E_AXIS] = olde;
|
||||
planner.set_e_position_mm(olde);
|
||||
|
||||
planner.synchronize();
|
||||
|
||||
#if ENABLED(SWITCHING_EXTRUDER)
|
||||
E0_ENABLE_WRITE(oldstatus);
|
||||
#else
|
||||
switch (active_extruder) {
|
||||
default: oldstatus = E0_ENABLE_WRITE(oldstatus); break;
|
||||
#if E_STEPPERS > 1
|
||||
case 2: case 3: oldstatus = E1_ENABLE_WRITE(oldstatus); break;
|
||||
#if E_STEPPERS > 2
|
||||
case 4: oldstatus = E2_ENABLE_WRITE(oldstatus); break;
|
||||
#endif // E_STEPPERS > 2
|
||||
#endif // E_STEPPERS > 1
|
||||
}
|
||||
#else // !SWITCHING_EXTRUDER
|
||||
switch (active_extruder) {
|
||||
case 0: E0_ENABLE_WRITE(oldstatus); break;
|
||||
#if E_STEPPERS > 1
|
||||
|
@ -1804,10 +1804,8 @@ uint32_t Stepper::stepper_block_phase_isr() {
|
||||
current_adv_steps++;
|
||||
interval = eISR_Rate;
|
||||
}
|
||||
else {
|
||||
interval = ADV_NEVER;
|
||||
eISR_Rate = ADV_NEVER;
|
||||
}
|
||||
else
|
||||
interval = eISR_Rate = ADV_NEVER;
|
||||
}
|
||||
else
|
||||
interval = ADV_NEVER;
|
||||
|
@ -51,10 +51,8 @@
|
||||
|
||||
#if HOTENDS == 1
|
||||
#define HOTEND_INDEX 0
|
||||
#define EXTRUDER_IDX 0
|
||||
#else
|
||||
#define HOTEND_INDEX e
|
||||
#define EXTRUDER_IDX active_extruder
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user