mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-30 15:21:59 +08:00
Adds Printer config option to force the use of set-and-wait gcode semantics (if supported by firmware).
Fixes #3268
This commit is contained in:
parent
548ce534ad
commit
ea29a22cd6
@ -1217,6 +1217,7 @@ sub options {
|
||||
retract_length_toolchange retract_restart_extra_toolchange retract_lift_above retract_lift_below
|
||||
printer_settings_id
|
||||
printer_notes
|
||||
use_set_and_wait_bed use_set_and_wait_extruder
|
||||
);
|
||||
}
|
||||
|
||||
@ -1369,6 +1370,8 @@ sub build {
|
||||
$optgroup->append_single_option_line('pressure_advance');
|
||||
$optgroup->append_single_option_line('vibration_limit');
|
||||
$optgroup->append_single_option_line('z_steps_per_mm');
|
||||
$optgroup->append_single_option_line('use_set_and_wait_extruder');
|
||||
$optgroup->append_single_option_line('use_set_and_wait_bed');
|
||||
}
|
||||
}
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ GCodeWriter::postamble() const
|
||||
std::string
|
||||
GCodeWriter::set_temperature(unsigned int temperature, bool wait, int tool) const
|
||||
{
|
||||
|
||||
wait = this->config.use_set_and_wait_extruder ? true : wait;
|
||||
std::string code, comment;
|
||||
if (wait && FLAVOR_IS_NOT(gcfTeacup) && FLAVOR_IS_NOT(gcfMakerWare) && FLAVOR_IS_NOT(gcfSailfish)) {
|
||||
code = "M109";
|
||||
@ -143,6 +143,7 @@ std::string
|
||||
GCodeWriter::set_bed_temperature(unsigned int temperature, bool wait) const
|
||||
{
|
||||
std::string code, comment;
|
||||
wait = this->config.use_set_and_wait_bed ? true : wait;
|
||||
if (wait && FLAVOR_IS_NOT(gcfTeacup)) {
|
||||
if (FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish)) {
|
||||
code = "M109";
|
||||
|
@ -1631,6 +1631,19 @@ PrintConfigDef::PrintConfigDef()
|
||||
def->cli = "use-relative-e-distances!";
|
||||
def->default_value = new ConfigOptionBool(false);
|
||||
|
||||
def = this->add("use_set_and_wait_extruder", coBool);
|
||||
def->label = "Use Set-and-Wait GCode (Extruder)";
|
||||
def->tooltip = "If your firmware supports a set and wait gcode for temperature changes, use it for automatically inserted temperature gcode for all extruders. Does not affect custom gcode.";
|
||||
def->cli = "use-set-and-wait-extruder!";
|
||||
def->default_value = new ConfigOptionBool(false);
|
||||
|
||||
def = this->add("use_set_and_wait_bed", coBool);
|
||||
def->label = "Use Set-and-Wait GCode (Bed)";
|
||||
def->tooltip = "If your firmware supports a set and wait gcode for temperature changes, use it for automatically inserted temperature gcode for the heatbed. Does not affect custom gcode.";
|
||||
def->cli = "use-set-and-wait-heatbed!";
|
||||
def->default_value = new ConfigOptionBool(false);
|
||||
|
||||
|
||||
def = this->add("use_volumetric_e", coBool);
|
||||
def->label = "Use volumetric E";
|
||||
def->tooltip = "This experimental setting uses outputs the E values in cubic millimeters instead of linear millimeters. If your firmware doesn't already know filament diameter(s), you can put commands like 'M200 D[filament_diameter_0] T0' in your start G-code in order to turn volumetric mode on and use the filament diameter associated to the filament selected in Slic3r. This is only supported in recent Marlin.";
|
||||
|
@ -349,6 +349,8 @@ class GCodeConfig : public virtual StaticPrintConfig
|
||||
ConfigOptionBool use_firmware_retraction;
|
||||
ConfigOptionBool use_relative_e_distances;
|
||||
ConfigOptionBool use_volumetric_e;
|
||||
ConfigOptionBool use_set_and_wait_extruder;
|
||||
ConfigOptionBool use_set_and_wait_bed;
|
||||
|
||||
GCodeConfig(bool initialize = true) : StaticPrintConfig() {
|
||||
if (initialize)
|
||||
@ -390,6 +392,8 @@ class GCodeConfig : public virtual StaticPrintConfig
|
||||
OPT_PTR(use_firmware_retraction);
|
||||
OPT_PTR(use_relative_e_distances);
|
||||
OPT_PTR(use_volumetric_e);
|
||||
OPT_PTR(use_set_and_wait_extruder);
|
||||
OPT_PTR(use_set_and_wait_bed);
|
||||
|
||||
return NULL;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user