Move L64XX index_to_axis to progmem (#16697)

This commit is contained in:
Scott Lahteine
2020-01-30 03:24:23 -06:00
committed by GitHub
parent 99b6a132bc
commit 50889c0f94
12 changed files with 539 additions and 405 deletions

View File

@ -78,7 +78,7 @@ void Babystep::add_steps(const AxisEnum axis, const int16_t distance) {
#endif
#if ENABLED(BABYSTEP_ALWAYS_AVAILABLE)
#define BSA_ENABLE(AXIS) do{ switch (AXIS) { case X_AXIS: enable_X(); break; case Y_AXIS: enable_Y(); break; case Z_AXIS: enable_Z(); break; default: break; } }while(0)
#define BSA_ENABLE(AXIS) do{ switch (AXIS) { case X_AXIS: ENABLE_AXIS_X(); break; case Y_AXIS: ENABLE_AXIS_Y(); break; case Z_AXIS: ENABLE_AXIS_Z(); break; default: break; } }while(0)
#else
#define BSA_ENABLE(AXIS) NOOP
#endif

View File

@ -448,7 +448,7 @@ void MMU2::tool_change(uint8_t index) {
if (index != extruder) {
disable_E0();
DISABLE_AXIS_E0();
ui.status_printf_P(0, GET_TEXT(MSG_MMU2_LOADING_FILAMENT), int(index + 1));
command(MMU_CMD_T0 + index);
@ -459,7 +459,7 @@ void MMU2::tool_change(uint8_t index) {
extruder = index; //filament change is finished
active_extruder = 0;
enable_E0();
ENABLE_AXIS_E0();
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, int(extruder));
@ -497,13 +497,13 @@ void MMU2::tool_change(const char* special) {
case 'x': {
planner.synchronize();
uint8_t index = mmu2_choose_filament();
disable_E0();
DISABLE_AXIS_E0();
command(MMU_CMD_T0 + index);
manage_response(true, true);
command(MMU_CMD_C0);
mmu_loop();
enable_E0();
ENABLE_AXIS_E0();
extruder = index;
active_extruder = 0;
} break;
@ -697,7 +697,7 @@ void MMU2::filament_runout() {
LCD_MESSAGEPGM(MSG_MMU2_EJECTING_FILAMENT);
enable_E0();
ENABLE_AXIS_E0();
current_position.e -= MMU2_FILAMENTCHANGE_EJECT_FEED;
line_to_current_position(2500 / 60);
planner.synchronize();
@ -731,7 +731,7 @@ void MMU2::filament_runout() {
BUZZ(200, 404);
disable_E0();
DISABLE_AXIS_E0();
return true;
}
@ -776,7 +776,7 @@ void MMU2::filament_runout() {
void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) {
planner.synchronize();
enable_E0();
ENABLE_AXIS_E0();
const E_Step* step = sequence;
@ -794,7 +794,7 @@ void MMU2::filament_runout() {
step++;
}
disable_E0();
DISABLE_AXIS_E0();
}
#endif // HAS_LCD_MENU && MMU2_MENUS