New experimental feature for pressure management. Credits to @llluis for the original implementation. #1203 #1677 #2018

This commit is contained in:
Alessandro Ranellucci 2014-11-24 18:22:39 +01:00
parent 5a382f0200
commit ff9b53260d
9 changed files with 108 additions and 2 deletions

View file

@ -550,6 +550,12 @@ PrintConfigDef::build_def() {
Options["post_process"].full_width = true;
Options["post_process"].height = 60;
Options["pressure_advance"].type = coFloat;
Options["pressure_advance"].label = "Pressure advance";
Options["pressure_advance"].tooltip = "When set to a non-zero value, this experimental option enables pressure regulation. It's the K constant for the advance algorithm that pushes more or less filament upon speed changes. It's useful for Bowden-tube extruders. Reasonable values are in range 0-10.";
Options["pressure_advance"].cli = "pressure-advance=f";
Options["pressure_advance"].min = 0;
Options["raft_layers"].type = coInt;
Options["raft_layers"].label = "Raft layers";
Options["raft_layers"].category = "Support material";

View file

@ -319,6 +319,7 @@ class GCodeConfig : public virtual StaticPrintConfig
ConfigOptionFloats filament_diameter;
ConfigOptionBool gcode_comments;
ConfigOptionEnum<GCodeFlavor> gcode_flavor;
ConfigOptionFloat pressure_advance;
ConfigOptionFloats retract_length;
ConfigOptionFloats retract_length_toolchange;
ConfigOptionFloats retract_lift;
@ -337,6 +338,7 @@ class GCodeConfig : public virtual StaticPrintConfig
this->filament_diameter.values[0] = 3;
this->gcode_comments.value = false;
this->gcode_flavor.value = gcfRepRap;
this->pressure_advance.value = 0;
this->retract_length.values.resize(1);
this->retract_length.values[0] = 1;
this->retract_length_toolchange.values.resize(1);
@ -360,6 +362,7 @@ class GCodeConfig : public virtual StaticPrintConfig
if (opt_key == "filament_diameter") return &this->filament_diameter;
if (opt_key == "gcode_comments") return &this->gcode_comments;
if (opt_key == "gcode_flavor") return &this->gcode_flavor;
if (opt_key == "pressure_advance") return &this->pressure_advance;
if (opt_key == "retract_length") return &this->retract_length;
if (opt_key == "retract_length_toolchange") return &this->retract_length_toolchange;
if (opt_key == "retract_lift") return &this->retract_lift;