New parameters actually connected to the wipe tower generator

This commit is contained in:
Lukas Matena 2018-04-24 13:43:39 +02:00
parent ec2d37451b
commit 650489dd8a
2 changed files with 5 additions and 5 deletions

View File

@ -814,10 +814,10 @@ void WipeTowerPrusaMM::toolchange_Unload(
writer.set_extruder_temp(new_temperature, false);
// Cooling:
const unsigned number_of_moves = 3;
const int& number_of_moves = m_filpar[m_current_tool].cooling_moves;
if (number_of_moves > 0) {
const float initial_speed = 2.2f; // mm/s
const float final_speed = 3.4f;
const float& initial_speed = m_filpar[m_current_tool].cooling_initial_speed;
const float& final_speed = m_filpar[m_current_tool].cooling_final_speed;
float speed_inc = (final_speed - initial_speed) / (2.f * number_of_moves - 1.f);
@ -825,7 +825,7 @@ void WipeTowerPrusaMM::toolchange_Unload(
.travel(writer.x(), writer.y() + y_step);
old_x = writer.x();
turning_point = xr-old_x > old_x-xl ? xr : xl;
for (unsigned i=0; i<number_of_moves; ++i) {
for (int i=0; i<number_of_moves; ++i) {
float speed = initial_speed + speed_inc * 2*i;
writer.load_move_x_advanced(turning_point, m_cooling_tube_length, speed);
speed += speed_inc;

View File

@ -489,7 +489,7 @@ PrintConfigDef::PrintConfigDef()
def->cli = "filament-cooling-moves=i@";
def->max = 0;
def->max = 20;
def->default_value = new ConfigOptionInts { 6 };
def->default_value = new ConfigOptionInts { 4 };
def = this->add("filament_cooling_initial_speed", coFloats);
def->label = L("Speed of the first cooling move");