Skip to content

Commit

Permalink
Handle configurable distance past gears
Browse files Browse the repository at this point in the history
  • Loading branch information
leptun committed Dec 19, 2022
1 parent 70356b7 commit 62ea78d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Firmware/mmu2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ bool MMU2::VerifyFilamentEnteredPTFE()
uint8_t fsensorState = 0;
// MMU has finished its load, push the filament further by some defined constant length
// If the filament sensor reads 0 at any moment, then report FAILURE
current_position[E_AXIS] += MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH - MMU2_LOAD_DISTANCE_PAST_GEARS;
current_position[E_AXIS] += MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH - (logic.ExtraLoadDistance() - MMU2_FILAMENT_SENSOR_POSITION);
plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE);
current_position[E_AXIS] -= (MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH - MMU2_LOAD_DISTANCE_PAST_GEARS);
current_position[E_AXIS] -= (MMU2_EXTRUDER_PTFE_LENGTH + MMU2_EXTRUDER_HEATBREAK_LENGTH - (logic.ExtraLoadDistance() - MMU2_FILAMENT_SENSOR_POSITION));
plan_buffer_line_curposXYZE(MMU2_LOAD_TO_NOZZLE_FEED_RATE);

while(blocks_queued())
Expand Down Expand Up @@ -840,7 +840,7 @@ void MMU2::execute_extruder_sequence(const E_Step *sequence, uint8_t steps) {
void MMU2::execute_load_to_nozzle_sequence() {
st_synchronize();
// Compensate for configurable Extra Loading Distance
current_position[E_AXIS] -= MMU2_LOAD_DISTANCE_PAST_GEARS;
current_position[E_AXIS] -= (logic.ExtraLoadDistance() - MMU2_FILAMENT_SENSOR_POSITION);
execute_extruder_sequence((const E_Step *)load_to_nozzle_sequence, sizeof(load_to_nozzle_sequence) / sizeof (load_to_nozzle_sequence[0]));
}

Expand Down

0 comments on commit 62ea78d

Please sign in to comment.