mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-05 20:26:11 +08:00
FIX: support flush params in machine start GCode
jira: NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I7566b960421b088f1d122936d9bc3974057a1e6b
This commit is contained in:
parent
bdc864bf10
commit
dd796026b3
@ -2222,6 +2222,18 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
m_placeholder_parser.set("retraction_distances_when_ec", new ConfigOptionFloatsNullable(m_config.retraction_distances_when_ec));
|
||||
m_placeholder_parser.set("long_retractions_when_ec",new ConfigOptionBoolsNullable(m_config.long_retractions_when_ec));
|
||||
|
||||
auto flush_v_speed = m_config.filament_flush_volumetric_speed.values;
|
||||
auto flush_temps = m_config.filament_flush_temp.values;
|
||||
for (size_t idx = 0; idx < flush_v_speed.size(); ++idx) {
|
||||
if (flush_v_speed[idx] == 0)
|
||||
flush_v_speed[idx] = m_config.filament_max_volumetric_speed.get_at(idx);
|
||||
}
|
||||
for (size_t idx = 0; idx < flush_temps.size(); ++idx) {
|
||||
if (flush_temps[idx] == 0)
|
||||
flush_temps[idx] = m_config.nozzle_temperature_range_high.get_at(idx);
|
||||
}
|
||||
m_placeholder_parser.set("flush_volumetric_speeds", new ConfigOptionFloats(flush_v_speed));
|
||||
m_placeholder_parser.set("flush_temperatures", new ConfigOptionInts(flush_temps));
|
||||
//Set variable for total layer count so it can be used in custom gcode.
|
||||
m_placeholder_parser.set("total_layer_count", m_layer_count);
|
||||
// Useful for sequential prints.
|
||||
|
@ -1735,7 +1735,7 @@ void PrintConfigDef::init_fff_params()
|
||||
|
||||
def = this->add("filament_flush_temp", coInts);
|
||||
def->label = L("Flush temperature");
|
||||
def->tooltip = L("temperature when flushing filament");
|
||||
def->tooltip = L("temperature when flushing filament. 0 indicates the upper bound of the recommended nozzle temperature range");
|
||||
def->mode = comAdvanced;
|
||||
def->nullable = true;
|
||||
def->min = 0;
|
||||
@ -1744,7 +1744,7 @@ void PrintConfigDef::init_fff_params()
|
||||
|
||||
def = this->add("filament_flush_volumetric_speed", coFloats);
|
||||
def->label = L("Flush volumetric speed");
|
||||
def->tooltip = L("Volumetric speed when flushing filament");
|
||||
def->tooltip = L("Volumetric speed when flushing filament. 0 indicates the max volumetric speed");
|
||||
def->mode = comAdvanced;
|
||||
def->nullable = true;
|
||||
def->min = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user