ENH: add new way to set bed temperature

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I99a9f67e9b13b2137ad371b22cf0999ccf9c096d
(cherry picked from commit 69c2947daf66eb0a6732b1b980c9b87f597c8da7)
This commit is contained in:
xun.zhang
2025-02-20 21:12:00 +08:00
committed by Noisyfox
parent 34d0855ba2
commit 6f5ea725dc
11 changed files with 125 additions and 20 deletions

View File

@@ -126,6 +126,12 @@ static t_config_enum_values s_keys_map_GCodeFlavor {
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(GCodeFlavor)
static t_config_enum_values s_keys_map_BedTempFormula {
{ "by_first_filament",int(BedTempFormula::btfFirstFilament) },
{ "by_highest_temp", int(BedTempFormula::btfHighestTemp)}
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(BedTempFormula)
static t_config_enum_values s_keys_map_FuzzySkinType {
{ "none", int(FuzzySkinType::None) },
{ "external", int(FuzzySkinType::External) },
@@ -2218,6 +2224,17 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloat { 0. });
def = this->add("bed_temperature_formula", coEnum);
def->label = L("Bed temperature type");
def->tooltip = L("With this option enabled, you can print filaments with significant bed temperature differentials.");
def->mode = comDevelop;
def->enum_keys_map = &ConfigOptionEnum<BedTempFormula>::get_enum_values();
def->enum_values.push_back("first_filament");
def->enum_values.push_back("highest_filament");
def->enum_labels.push_back("First filament");
def->enum_labels.push_back("Highest temp filament");
def->set_default_value(new ConfigOptionEnum<BedTempFormula>(BedTempFormula::btfFirstFilament));
def = this->add("filament_diameter", coFloats);
def->label = L("Diameter");
def->tooltip = L("Filament diameter is used to calculate extrusion in G-code, so it is important and should be accurate.");