Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Nov 18, 2020
1 parent 9b0227e commit 87c322e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Marlin/src/feature/mmu/mmu2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ static constexpr E_Step
#endif
;


MMU2::MMU2() {
rx_buffer[0] = '\0';
}
Expand Down Expand Up @@ -550,14 +549,14 @@ static void mmu2_not_responding() {

switch (*special) {
case '?': {
uint8_t index = mmu2_choose_filament();
const uint8_t index = mmu2_choose_filament();
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
load_filament_to_nozzle(index);
} break;

case 'x': {
planner.synchronize();
uint8_t index = mmu2_choose_filament();
const uint8_t index = mmu2_choose_filament();
DISABLE_AXIS_E0();
command(MMU_CMD_T0 + index);
manage_response(true, true);
Expand Down Expand Up @@ -635,15 +634,15 @@ static void mmu2_not_responding() {
switch (*special) {
case '?': {
DEBUG_ECHOLNPGM("case ?\n");
uint8_t index = mmu2_choose_filament();
const uint8_t index = mmu2_choose_filament();
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
load_filament_to_nozzle(index);
} break;

case 'x': {
DEBUG_ECHOLNPGM("case x\n");
planner.synchronize();
uint8_t index = mmu2_choose_filament();
const uint8_t index = mmu2_choose_filament();
DISABLE_AXIS_E0();
command(MMU_CMD_T0 + index);
manage_response(true, true);
Expand Down Expand Up @@ -682,7 +681,7 @@ static void mmu2_not_responding() {
mmu_idl_sens = 0;
}

#else
#else // !HAS_PRUSA_MMU2S && !MMU_EXTRUDER_SENSOR

/**
* Handle tool change
Expand Down Expand Up @@ -726,15 +725,15 @@ static void mmu2_not_responding() {
switch (*special) {
case '?': {
DEBUG_ECHOLNPGM("case ?\n");
uint8_t index = mmu2_choose_filament();
const uint8_t index = mmu2_choose_filament();
while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
load_filament_to_nozzle(index);
} break;

case 'x': {
DEBUG_ECHOLNPGM("case x\n");
planner.synchronize();
uint8_t index = mmu2_choose_filament();
const uint8_t index = mmu2_choose_filament();
DISABLE_AXIS_E0();
command(MMU_CMD_T0 + index);
manage_response(true, true);
Expand All @@ -758,7 +757,7 @@ static void mmu2_not_responding() {
#endif
}

#endif
#endif // HAS_PRUSA_MMU2S

/**
* Set next command
Expand Down

0 comments on commit 87c322e

Please sign in to comment.