Correct HOTENDS for SWITCHING_EXTRUDER
This commit is contained in:
parent
33b7488f68
commit
fbeea12026
@ -206,7 +206,6 @@ script:
|
|||||||
- opt_set EXTRUDERS 2
|
- opt_set EXTRUDERS 2
|
||||||
- opt_enable NUM_SERVOS
|
- opt_enable NUM_SERVOS
|
||||||
- opt_set NUM_SERVOS 1
|
- opt_set NUM_SERVOS 1
|
||||||
- opt_set TEMP_SENSOR_1 1
|
|
||||||
- opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
|
- opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
|
||||||
- build_marlin
|
- build_marlin
|
||||||
#
|
#
|
||||||
|
@ -396,15 +396,6 @@
|
|||||||
* E_MANUAL - Number of E steppers for LCD move options
|
* 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 ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS
|
||||||
#if EXTRUDERS > 4
|
#if EXTRUDERS > 4
|
||||||
#define E_STEPPERS 3
|
#define E_STEPPERS 3
|
||||||
@ -413,6 +404,7 @@
|
|||||||
#else
|
#else
|
||||||
#define E_STEPPERS 1
|
#define E_STEPPERS 1
|
||||||
#endif
|
#endif
|
||||||
|
#define HOTENDS E_STEPPERS
|
||||||
#define E_MANUAL EXTRUDERS
|
#define E_MANUAL EXTRUDERS
|
||||||
#elif ENABLED(MIXING_EXTRUDER)
|
#elif ENABLED(MIXING_EXTRUDER)
|
||||||
#define E_STEPPERS MIXING_STEPPERS
|
#define E_STEPPERS MIXING_STEPPERS
|
||||||
@ -422,6 +414,18 @@
|
|||||||
#define E_MANUAL EXTRUDERS
|
#define E_MANUAL EXTRUDERS
|
||||||
#endif
|
#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))
|
#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()
|
&& !planner.has_blocks_queued()
|
||||||
) {
|
) {
|
||||||
#if ENABLED(SWITCHING_EXTRUDER)
|
#if ENABLED(SWITCHING_EXTRUDER)
|
||||||
const bool oldstatus = E0_ENABLE_READ;
|
bool oldstatus;
|
||||||
enable_E0();
|
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
|
#else // !SWITCHING_EXTRUDER
|
||||||
bool oldstatus;
|
bool oldstatus;
|
||||||
switch (active_extruder) {
|
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);
|
planner.buffer_line_kinematic(current_position, MMM_TO_MMS(EXTRUDER_RUNOUT_SPEED), active_extruder);
|
||||||
current_position[E_AXIS] = olde;
|
current_position[E_AXIS] = olde;
|
||||||
planner.set_e_position_mm(olde);
|
planner.set_e_position_mm(olde);
|
||||||
|
|
||||||
planner.synchronize();
|
planner.synchronize();
|
||||||
|
|
||||||
#if ENABLED(SWITCHING_EXTRUDER)
|
#if ENABLED(SWITCHING_EXTRUDER)
|
||||||
E0_ENABLE_WRITE(oldstatus);
|
switch (active_extruder) {
|
||||||
#else
|
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) {
|
switch (active_extruder) {
|
||||||
case 0: E0_ENABLE_WRITE(oldstatus); break;
|
case 0: E0_ENABLE_WRITE(oldstatus); break;
|
||||||
#if E_STEPPERS > 1
|
#if E_STEPPERS > 1
|
||||||
|
@ -1804,10 +1804,8 @@ uint32_t Stepper::stepper_block_phase_isr() {
|
|||||||
current_adv_steps++;
|
current_adv_steps++;
|
||||||
interval = eISR_Rate;
|
interval = eISR_Rate;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
interval = ADV_NEVER;
|
interval = eISR_Rate = ADV_NEVER;
|
||||||
eISR_Rate = ADV_NEVER;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
interval = ADV_NEVER;
|
interval = ADV_NEVER;
|
||||||
|
@ -51,10 +51,8 @@
|
|||||||
|
|
||||||
#if HOTENDS == 1
|
#if HOTENDS == 1
|
||||||
#define HOTEND_INDEX 0
|
#define HOTEND_INDEX 0
|
||||||
#define EXTRUDER_IDX 0
|
|
||||||
#else
|
#else
|
||||||
#define HOTEND_INDEX e
|
#define HOTEND_INDEX e
|
||||||
#define EXTRUDER_IDX active_extruder
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user