Prusa MMU2 (#12967)

This commit is contained in:
revilor
2019-02-01 02:10:52 +01:00
committed by Scott Lahteine
parent 996f7d1642
commit 6a57d0b381
180 changed files with 6218 additions and 49 deletions

View File

@ -584,6 +584,11 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
#define NORM_E_DIR(E) do{ E0_DIR_WRITE(E ? INVERT_E0_DIR : !INVERT_E0_DIR); }while(0)
#define REV_E_DIR(E) do{ E0_DIR_WRITE(E ? !INVERT_E0_DIR : INVERT_E0_DIR); }while(0)
#endif
#elif ENABLED(PRUSA_MMU2)
#define E_STEP_WRITE(E,V) E0_STEP_WRITE(V)
#define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR)
#define REV_E_DIR(E) E0_DIR_WRITE( INVERT_E0_DIR)
#elif ENABLED(MK2_MULTIPLEXER) // One multiplexed stepper driver, reversed on odd index
#define E_STEP_WRITE(E,V) E0_STEP_WRITE(V)
#define NORM_E_DIR(E) do{ E0_DIR_WRITE(TEST(E, 0) ? !INVERT_E0_DIR: INVERT_E0_DIR); }while(0)

View File

@ -70,6 +70,10 @@
#include "../feature/fanmux.h"
#endif
#if ENABLED(PRUSA_MMU2)
#include "../feature/prusa_MMU2/mmu2.h"
#endif
#if HAS_LCD_MENU
#include "../lcd/ultralcd.h"
#endif
@ -508,6 +512,13 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
mixer.T(uint_fast8_t(tmp_extruder));
#endif
#elif ENABLED(PRUSA_MMU2)
UNUSED(fr_mm_s); UNUSED(no_move);
mmu2.toolChange(tmp_extruder);
#elif EXTRUDERS < 2
UNUSED(fr_mm_s); UNUSED(no_move);
@ -714,6 +725,11 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
do_blocking_move_to_z(destination[Z_AXIS], planner.settings.max_feedrate_mm_s[Z_AXIS]);
}
#endif
#if ENABLED(PRUSA_MMU2)
mmu2.toolChange(tmp_extruder);
#endif
} // (tmp_extruder != active_extruder)
planner.synchronize();