Fixes for DUAL_NOZZLE_DUPLICATION_MODE

This commit is contained in:
Scott Lahteine 2017-05-01 12:20:25 -05:00
parent 8bd63aafb9
commit 8002672938
2 changed files with 25 additions and 23 deletions

View File

@ -161,7 +161,7 @@ enum LCDViewAction {
LCDVIEW_CALL_NO_REDRAW
};
#if ENABLED(DUAL_X_CARRIAGE)
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
enum DualXMode {
DXC_FULL_CONTROL_MODE,
DXC_AUTO_PARK_MODE,

View File

@ -131,7 +131,7 @@ float Planner::previous_speed[NUM_AXIS],
#if ENABLED(DISABLE_INACTIVE_EXTRUDER)
uint8_t Planner::g_uc_extruder_last_move[EXTRUDERS] = { 0 };
#endif // DISABLE_INACTIVE_EXTRUDER
#endif
#ifdef XY_FREQUENCY_LIMIT
// Old direction bits. Used for speed calculations
@ -863,27 +863,29 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
#if ENABLED(DISABLE_INACTIVE_EXTRUDER) // Enable only the selected extruder
#define DISABLE_IDLE_E(N) if (!g_uc_extruder_last_move[N]) disable_E##N();
for (uint8_t i = 0; i < EXTRUDERS; i++)
if (g_uc_extruder_last_move[i] > 0) g_uc_extruder_last_move[i]--;
switch(extruder) {
case 0:
enable_E0();
g_uc_extruder_last_move[0] = (BLOCK_BUFFER_SIZE) * 2;
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
if (extruder_duplication_enabled) {
enable_E1();
g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2;
}
#endif
g_uc_extruder_last_move[0] = (BLOCK_BUFFER_SIZE) * 2;
#if EXTRUDERS > 1
if (g_uc_extruder_last_move[1] == 0) disable_E1();
DISABLE_IDLE_E(1);
#if EXTRUDERS > 2
if (g_uc_extruder_last_move[2] == 0) disable_E2();
DISABLE_IDLE_E(2);
#if EXTRUDERS > 3
if (g_uc_extruder_last_move[3] == 0) disable_E3();
DISABLE_IDLE_E(3);
#if EXTRUDERS > 4
if (g_uc_extruder_last_move[4] == 0) disable_E4();
DISABLE_IDLE_E(4);
#endif // EXTRUDERS > 4
#endif // EXTRUDERS > 3
#endif // EXTRUDERS > 2
@ -893,13 +895,13 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
case 1:
enable_E1();
g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2;
if (g_uc_extruder_last_move[0] == 0) disable_E0();
DISABLE_IDLE_E(0);
#if EXTRUDERS > 2
if (g_uc_extruder_last_move[2] == 0) disable_E2();
DISABLE_IDLE_E(2);
#if EXTRUDERS > 3
if (g_uc_extruder_last_move[3] == 0) disable_E3();
DISABLE_IDLE_E(3);
#if EXTRUDERS > 4
if (g_uc_extruder_last_move[4] == 0) disable_E4();
DISABLE_IDLE_E(4);
#endif // EXTRUDERS > 4
#endif // EXTRUDERS > 3
#endif // EXTRUDERS > 2
@ -908,12 +910,12 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
case 2:
enable_E2();
g_uc_extruder_last_move[2] = (BLOCK_BUFFER_SIZE) * 2;
if (g_uc_extruder_last_move[0] == 0) disable_E0();
if (g_uc_extruder_last_move[1] == 0) disable_E1();
DISABLE_IDLE_E(0);
DISABLE_IDLE_E(1);
#if EXTRUDERS > 3
if (g_uc_extruder_last_move[3] == 0) disable_E3();
DISABLE_IDLE_E(3);
#if EXTRUDERS > 4
if (g_uc_extruder_last_move[4] == 0) disable_E4();
DISABLE_IDLE_E(4);
#endif
#endif
break;
@ -921,21 +923,21 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
case 3:
enable_E3();
g_uc_extruder_last_move[3] = (BLOCK_BUFFER_SIZE) * 2;
if (g_uc_extruder_last_move[0] == 0) disable_E0();
if (g_uc_extruder_last_move[1] == 0) disable_E1();
if (g_uc_extruder_last_move[2] == 0) disable_E2();
DISABLE_IDLE_E(0);
DISABLE_IDLE_E(1);
DISABLE_IDLE_E(2);
#if EXTRUDERS > 4
if (g_uc_extruder_last_move[4] == 0) disable_E4();
DISABLE_IDLE_E(4);
#endif
break;
#if EXTRUDERS > 4
case 4:
enable_E4();
g_uc_extruder_last_move[4] = (BLOCK_BUFFER_SIZE) * 2;
if (g_uc_extruder_last_move[0] == 0) disable_E0();
if (g_uc_extruder_last_move[1] == 0) disable_E1();
if (g_uc_extruder_last_move[2] == 0) disable_E2();
if (g_uc_extruder_last_move[3] == 0) disable_E3();
DISABLE_IDLE_E(0);
DISABLE_IDLE_E(1);
DISABLE_IDLE_E(2);
DISABLE_IDLE_E(3);
break;
#endif // EXTRUDERS > 4
#endif // EXTRUDERS > 3