Renamed tower/tilt profile to speed (back end only)

This commit is contained in:
YuSanka 2024-05-02 16:35:49 +02:00 committed by Lukas Matena
parent 41f891c196
commit b0cf024a03
6 changed files with 251 additions and 230 deletions

View File

@ -19,6 +19,7 @@
#include "libslic3r/miniz_extension.hpp" #include "libslic3r/miniz_extension.hpp"
#include "libslic3r/LocalesUtils.hpp" #include "libslic3r/LocalesUtils.hpp"
#include "libslic3r/GCode/ThumbnailData.hpp" #include "libslic3r/GCode/ThumbnailData.hpp"
#include "libslic3r/Utils/JsonUtils.hpp"
#include "SLAArchiveReader.hpp" #include "SLAArchiveReader.hpp"
#include "SLAArchiveFormatRegistry.hpp" #include "SLAArchiveFormatRegistry.hpp"
@ -52,23 +53,43 @@ std::string to_ini(const ConfMap &m)
return ret; return ret;
} }
namespace pt = boost::property_tree; static std::string get_key(const std::string& opt_key)
static std::string write_json_with_post_process(const pt::ptree& ptree)
{ {
std::stringstream oss; static const std::set<std::string> ms_opts = {
pt::write_json(oss, ptree); "delay_before_exposure"
, "delay_after_exposure"
, "tilt_down_offset_delay"
, "tilt_up_offset_delay"
, "tilt_down_delay"
, "tilt_up_delay"
};
static const std::set<std::string> nm_opts = {
"tower_hop_height"
};
static const std::set<std::string> speed_opts = {
"tower_speed"
, "tilt_down_initial_speed"
, "tilt_down_finish_speed"
, "tilt_up_initial_speed"
, "tilt_up_finish_speed"
};
// fix json-out to show node values as a string just for string nodes if (ms_opts.find(opt_key) != ms_opts.end())
std::regex reg("\\\"([0-9]+\\.{0,1}[0-9]*)\\\""); // code is borrowed from https://stackoverflow.com/questions/2855741/why-does-boost-property-tree-write-json-save-everything-as-string-is-it-possibl return opt_key + "_ms";
std::string result = std::regex_replace(oss.str(), reg, "$1");
boost::replace_all(result, "\"true\"", "true"); if (nm_opts.find(opt_key) != nm_opts.end())
boost::replace_all(result, "\"false\"", "false"); return opt_key + "_nm";
return result; if (speed_opts.find(opt_key) != speed_opts.end())
return boost::replace_all_copy(opt_key, "_speed", "_profile");
return opt_key;
} }
namespace pt = boost::property_tree;
std::string to_json(const SLAPrint& print, const ConfMap &m) std::string to_json(const SLAPrint& print, const ConfMap &m)
{ {
auto& cfg = print.full_print_config(); auto& cfg = print.full_print_config();
@ -76,8 +97,8 @@ std::string to_json(const SLAPrint& print, const ConfMap &m)
pt::ptree below_node; pt::ptree below_node;
pt::ptree above_node; pt::ptree above_node;
const t_config_enum_names& tilt_enum_names = ConfigOptionEnum<TiltProfiles>::get_enum_names(); const t_config_enum_names& tilt_enum_names = ConfigOptionEnum< TiltSpeeds>::get_enum_names();
const t_config_enum_names& tower_enum_names = ConfigOptionEnum<TowerProfiles>::get_enum_names(); const t_config_enum_names& tower_enum_names = ConfigOptionEnum<TowerSpeeds>::get_enum_names();
for (const std::string& opt_key : tilt_options()) { for (const std::string& opt_key : tilt_options()) {
const ConfigOption* opt = cfg.option(opt_key); const ConfigOption* opt = cfg.option(opt_key);
@ -87,28 +108,28 @@ std::string to_json(const SLAPrint& print, const ConfMap &m)
case coFloats: { case coFloats: {
auto values = static_cast<const ConfigOptionFloats*>(opt); auto values = static_cast<const ConfigOptionFloats*>(opt);
// those options have to be exported in ms instead of s // those options have to be exported in ms instead of s
below_node.put<double>(opt_key, int(1000 * values->get_at(0))); below_node.put<double>(get_key(opt_key), int(1000 * values->get_at(0)));
above_node.put<double>(opt_key, int(1000 * values->get_at(1))); above_node.put<double>(get_key(opt_key), int(1000 * values->get_at(1)));
} }
break; break;
case coInts: { case coInts: {
auto values = static_cast<const ConfigOptionInts*>(opt); auto values = static_cast<const ConfigOptionInts*>(opt);
int koef = opt_key == "tower_hop_height_nm" ? 1000000 : 1; int koef = opt_key == "tower_hop_height" ? 1000000 : 1;
below_node.put<int>(opt_key, koef * values->get_at(0)); below_node.put<int>(get_key(opt_key), koef * values->get_at(0));
above_node.put<int>(opt_key, koef * values->get_at(1)); above_node.put<int>(get_key(opt_key), koef * values->get_at(1));
} }
break; break;
case coBools: { case coBools: {
auto values = static_cast<const ConfigOptionBools*>(opt); auto values = static_cast<const ConfigOptionBools*>(opt);
below_node.put<bool>(opt_key, values->get_at(0)); below_node.put<bool>(get_key(opt_key), values->get_at(0));
above_node.put<bool>(opt_key, values->get_at(1)); above_node.put<bool>(get_key(opt_key), values->get_at(1));
} }
break; break;
case coEnums: { case coEnums: {
const t_config_enum_names& enum_names = opt_key == "tower_profile" ? tower_enum_names : tilt_enum_names; const t_config_enum_names& enum_names = opt_key == "tower_speed" ? tower_enum_names : tilt_enum_names;
auto values = static_cast<const ConfigOptionEnums<TiltProfiles>*>(opt); auto values = static_cast<const ConfigOptionEnums<TiltSpeeds>*>(opt);
below_node.put(opt_key, enum_names[values->get_at(0)]); below_node.put(get_key(opt_key), enum_names[values->get_at(0)]);
above_node.put(opt_key, enum_names[values->get_at(1)]); above_node.put(get_key(opt_key), enum_names[values->get_at(1)]);
} }
break; break;
case coNone: case coNone:

View File

@ -265,38 +265,38 @@ static t_config_enum_values s_keys_map_TopOnePerimeterType {
}; };
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(TopOnePerimeterType) CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(TopOnePerimeterType)
static const t_config_enum_values s_keys_map_TowerProfiles{ static const t_config_enum_values s_keys_map_TowerSpeeds{
{ "layer1", tpLayer1 }, { "layer1", tsLayer1 },
{ "layer2", tpLayer2 }, { "layer2", tsLayer2 },
{ "layer3", tpLayer3 }, { "layer3", tsLayer3 },
{ "layer4", tpLayer4 }, { "layer4", tsLayer4 },
{ "layer5", tpLayer5 }, { "layer5", tsLayer5 },
{ "layer8", tpLayer8 }, { "layer8", tsLayer8 },
{ "layer11", tpLayer11 }, { "layer11", tsLayer11 },
{ "layer14", tpLayer14 }, { "layer14", tsLayer14 },
{ "layer18", tpLayer18 }, { "layer18", tsLayer18 },
{ "layer22", tpLayer22 }, { "layer22", tsLayer22 },
{ "layer24", tpLayer24 }, { "layer24", tsLayer24 },
}; };
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(TowerProfiles) CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(TowerSpeeds)
static const t_config_enum_values s_keys_map_TiltProfiles{ static const t_config_enum_values s_keys_map_TiltSpeeds{
{ "move120", tpMove120 }, { "move120", tsMove120 },
{ "layer200", tpLayer200 }, { "layer200", tsLayer200 },
{ "move300", tpMove300 }, { "move300", tsMove300 },
{ "layer400", tpLayer400 }, { "layer400", tsLayer400 },
{ "layer600", tpLayer600 }, { "layer600", tsLayer600 },
{ "layer800", tpLayer800 }, { "layer800", tsLayer800 },
{ "layer1000", tpLayer1000 }, { "layer1000", tsLayer1000 },
{ "layer1250", tpLayer1250 }, { "layer1250", tsLayer1250 },
{ "layer1500", tpLayer1500 }, { "layer1500", tsLayer1500 },
{ "layer1750", tpLayer1750 }, { "layer1750", tsLayer1750 },
{ "layer2000", tpLayer2000 }, { "layer2000", tsLayer2000 },
{ "layer2250", tpLayer2250 }, { "layer2250", tsLayer2250 },
{ "move5120", tpMove5120 }, { "move5120", tsMove5120 },
{ "move8000", tpMove8000 }, { "move8000", tsMove8000 },
}; };
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(TiltProfiles) CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(TiltSpeeds)
static void assign_printer_technology_to_unknown(t_optiondef_map &options, PrinterTechnology printer_technology) static void assign_printer_technology_to_unknown(t_optiondef_map &options, PrinterTechnology printer_technology)
{ {
@ -4509,7 +4509,7 @@ void PrintConfigDef::init_sla_tilt_params()
{ {
ConfigOptionDef* def; ConfigOptionDef* def;
def = this->add("delay_before_exposure_ms", coFloats); def = this->add("delay_before_exposure", coFloats);
def->full_label = L("Delay before exposure"); def->full_label = L("Delay before exposure");
def->tooltip = L("Delay before exposure after previous layer separation."); def->tooltip = L("Delay before exposure after previous layer separation.");
def->sidetext = L("s"); def->sidetext = L("s");
@ -4518,7 +4518,7 @@ void PrintConfigDef::init_sla_tilt_params()
def->mode = comExpert; def->mode = comExpert;
def->set_default_value(new ConfigOptionFloats({ 3., 3.})); def->set_default_value(new ConfigOptionFloats({ 3., 3.}));
def = this->add("delay_after_exposure_ms", coFloats); def = this->add("delay_after_exposure", coFloats);
def->full_label = L("Delay after exposure"); def->full_label = L("Delay after exposure");
def->tooltip = L("Delay after exposure before layer separation."); def->tooltip = L("Delay after exposure before layer separation.");
def->sidetext = L("s"); def->sidetext = L("s");
@ -4527,7 +4527,7 @@ void PrintConfigDef::init_sla_tilt_params()
def->mode = comExpert; def->mode = comExpert;
def->set_default_value(new ConfigOptionFloats({ 0., 0.})); def->set_default_value(new ConfigOptionFloats({ 0., 0.}));
def = this->add("tower_hop_height_nm", coInts); def = this->add("tower_hop_height", coInts);
def->full_label = L("Tower hop height"); def->full_label = L("Tower hop height");
def->tooltip = L("The height of the tower raise."); def->tooltip = L("The height of the tower raise.");
def->sidetext = L("mm"); def->sidetext = L("mm");
@ -4536,12 +4536,12 @@ void PrintConfigDef::init_sla_tilt_params()
def->mode = comExpert; def->mode = comExpert;
def->set_default_value(new ConfigOptionInts({ 0, 0})); def->set_default_value(new ConfigOptionInts({ 0, 0}));
def = this->add("tower_profile", coEnums); def = this->add("tower_speed", coEnums);
def->full_label = L("Tower speed"); def->full_label = L("Tower speed");
def->tooltip = L("Tower speed used for tower raise."); def->tooltip = L("Tower speed used for tower raise.");
def->mode = comExpert; def->mode = comExpert;
def->sidetext = L("mm/s"); def->sidetext = L("mm/s");
def->set_enum<TowerProfiles>({ def->set_enum<TowerSpeeds>({
{ "layer1", "1" }, { "layer1", "1" },
{ "layer2", "2" }, { "layer2", "2" },
{ "layer3", "3" }, { "layer3", "3" },
@ -4554,9 +4554,9 @@ void PrintConfigDef::init_sla_tilt_params()
{ "layer22", "22" }, { "layer22", "22" },
{ "layer24", "24" }, { "layer24", "24" },
}); });
def->set_default_value(new ConfigOptionEnums<TowerProfiles>({ tpLayer22, tpLayer22 })); def->set_default_value(new ConfigOptionEnums<TowerSpeeds>({ tsLayer22, tsLayer22 }));
const std::initializer_list<std::pair<std::string_view, std::string_view>> tilt_profiles_il = { const std::initializer_list<std::pair<std::string_view, std::string_view>> tilt_speeds_il = {
{ "move120", "120" }, { "move120", "120" },
{ "layer200", "200" }, { "layer200", "200" },
{ "move300", "300" }, { "move300", "300" },
@ -4573,37 +4573,37 @@ void PrintConfigDef::init_sla_tilt_params()
{ "move8000", "8000" }, { "move8000", "8000" },
}; };
def = this->add("tilt_down_initial_profile", coEnums); def = this->add("tilt_down_initial_speed", coEnums);
def->full_label = L("Tilt down initial speed"); def->full_label = L("Tilt down initial speed");
def->tooltip = L("Tilt speed used for an initial portion of tilt down move."); def->tooltip = L("Tilt speed used for an initial portion of tilt down move.");
def->mode = comExpert; def->mode = comExpert;
def->sidetext = L("μ-steps/s"); def->sidetext = L("μ-steps/s");
def->set_enum<TiltProfiles>(tilt_profiles_il); def->set_enum<TiltSpeeds>(tilt_speeds_il);
def->set_default_value(new ConfigOptionEnums<TiltProfiles>({ tpLayer1750, tpLayer1750 })); def->set_default_value(new ConfigOptionEnums<TiltSpeeds>({ tsLayer1750, tsLayer1750 }));
def = this->add("tilt_down_finish_profile", coEnums); def = this->add("tilt_down_finish_speed", coEnums);
def->full_label = L("Tilt down finish speed"); def->full_label = L("Tilt down finish speed");
def->tooltip = L("Tilt speed used for the rest of the tilt down move."); def->tooltip = L("Tilt speed used for the rest of the tilt down move.");
def->mode = comExpert; def->mode = comExpert;
def->sidetext = L("μ-steps/s"); def->sidetext = L("μ-steps/s");
def->set_enum<TiltProfiles>(tilt_profiles_il); def->set_enum<TiltSpeeds>(tilt_speeds_il);
def->set_default_value(new ConfigOptionEnums<TiltProfiles>({ tpLayer1750, tpLayer1750 })); def->set_default_value(new ConfigOptionEnums<TiltSpeeds>({ tsLayer1750, tsLayer1750 }));
def = this->add("tilt_up_initial_profile", coEnums); def = this->add("tilt_up_initial_speed", coEnums);
def->full_label = L("Tilt up initial speed"); def->full_label = L("Tilt up initial speed");
def->tooltip = L("Tilt speed used for an initial portion of tilt up move."); def->tooltip = L("Tilt speed used for an initial portion of tilt up move.");
def->mode = comExpert; def->mode = comExpert;
def->sidetext = L("μ-steps/s"); def->sidetext = L("μ-steps/s");
def->set_enum<TiltProfiles>(tilt_profiles_il); def->set_enum<TiltSpeeds>(tilt_speeds_il);
def->set_default_value(new ConfigOptionEnums<TiltProfiles>({ tpMove8000, tpMove8000 })); def->set_default_value(new ConfigOptionEnums<TiltSpeeds>({ tsMove8000, tsMove8000 }));
def = this->add("tilt_up_finish_profile", coEnums); def = this->add("tilt_up_finish_speed", coEnums);
def->full_label = L("Tilt up finish speed"); def->full_label = L("Tilt up finish speed");
def->tooltip = L("Tilt speed used for the rest of the tilt-up."); def->tooltip = L("Tilt speed used for the rest of the tilt-up.");
def->mode = comExpert; def->mode = comExpert;
def->sidetext = L("μ-steps/s"); def->sidetext = L("μ-steps/s");
def->set_enum<TiltProfiles>(tilt_profiles_il); def->set_enum<TiltSpeeds>(tilt_speeds_il);
def->set_default_value(new ConfigOptionEnums<TiltProfiles>({ tpLayer1750, tpLayer1750 })); def->set_default_value(new ConfigOptionEnums<TiltSpeeds>({ tsLayer1750, tsLayer1750 }));
def = this->add("use_tilt", coBools); def = this->add("use_tilt", coBools);
def->full_label = L("Use tilt"); def->full_label = L("Use tilt");
@ -4620,7 +4620,7 @@ void PrintConfigDef::init_sla_tilt_params()
def->mode = comExpert; def->mode = comExpert;
def->set_default_value(new ConfigOptionInts({ 0, 0 })); def->set_default_value(new ConfigOptionInts({ 0, 0 }));
def = this->add("tilt_down_offset_delay_ms", coFloats); def = this->add("tilt_down_offset_delay", coFloats);
def->full_label = L("Tilt down offset delay"); def->full_label = L("Tilt down offset delay");
def->tooltip = L("Delay after the tilt reaches 'tilt_down_offset_steps' position."); def->tooltip = L("Delay after the tilt reaches 'tilt_down_offset_steps' position.");
def->sidetext = L("s"); def->sidetext = L("s");
@ -4637,7 +4637,7 @@ void PrintConfigDef::init_sla_tilt_params()
def->mode = comExpert; def->mode = comExpert;
def->set_default_value(new ConfigOptionInts({ 1, 1 })); def->set_default_value(new ConfigOptionInts({ 1, 1 }));
def = this->add("tilt_down_delay_ms", coFloats); def = this->add("tilt_down_delay", coFloats);
def->full_label = L("Tilt down delay"); def->full_label = L("Tilt down delay");
def->tooltip = L("The delay between tilt-down cycles."); def->tooltip = L("The delay between tilt-down cycles.");
def->sidetext = L("s"); def->sidetext = L("s");
@ -4655,7 +4655,7 @@ void PrintConfigDef::init_sla_tilt_params()
def->mode = comExpert; def->mode = comExpert;
def->set_default_value(new ConfigOptionInts({ 1200, 1200 })); def->set_default_value(new ConfigOptionInts({ 1200, 1200 }));
def = this->add("tilt_up_offset_delay_ms", coFloats); def = this->add("tilt_up_offset_delay", coFloats);
def->full_label = L("Tilt up offset delay"); def->full_label = L("Tilt up offset delay");
def->tooltip = L("Delay after the tilt reaches 'tilt_up_offset_steps' position."); def->tooltip = L("Delay after the tilt reaches 'tilt_up_offset_steps' position.");
def->sidetext = L("s"); def->sidetext = L("s");
@ -4672,7 +4672,7 @@ void PrintConfigDef::init_sla_tilt_params()
def->mode = comExpert; def->mode = comExpert;
def->set_default_value(new ConfigOptionInts({ 1, 1 })); def->set_default_value(new ConfigOptionInts({ 1, 1 }));
def = this->add("tilt_up_delay_ms", coFloats); def = this->add("tilt_up_delay", coFloats);
def->full_label = L("Tilt up delay"); def->full_label = L("Tilt up delay");
def->tooltip = L("The delay between tilt-up cycles."); def->tooltip = L("The delay between tilt-up cycles.");
def->sidetext = L("s"); def->sidetext = L("s");
@ -4959,23 +4959,23 @@ void DynamicPrintConfig::normalize_fdm()
} }
static std::vector<std::string> s_Preset_sla_tilt_options{ static std::vector<std::string> s_Preset_sla_tilt_options{
"delay_before_exposure_ms" "delay_before_exposure"
,"delay_after_exposure_ms" ,"delay_after_exposure"
,"tower_hop_height_nm" ,"tower_hop_height"
,"tower_profile" ,"tower_speed"
,"use_tilt" ,"use_tilt"
,"tilt_down_initial_profile" ,"tilt_down_initial_speed"
,"tilt_down_offset_steps" ,"tilt_down_offset_steps"
,"tilt_down_offset_delay_ms" ,"tilt_down_offset_delay"
,"tilt_down_finish_profile" ,"tilt_down_finish_speed"
,"tilt_down_cycles" ,"tilt_down_cycles"
,"tilt_down_delay_ms" ,"tilt_down_delay"
,"tilt_up_initial_profile" ,"tilt_up_initial_speed"
,"tilt_up_offset_steps" ,"tilt_up_offset_steps"
,"tilt_up_offset_delay_ms" ,"tilt_up_offset_delay"
,"tilt_up_finish_profile" ,"tilt_up_finish_speed"
,"tilt_up_cycles" ,"tilt_up_cycles"
,"tilt_up_delay_ms" ,"tilt_up_delay"
}; };
const std::vector<std::string>& tilt_options() { return s_Preset_sla_tilt_options; } const std::vector<std::string>& tilt_options() { return s_Preset_sla_tilt_options; }
@ -4985,21 +4985,21 @@ const std::vector<std::string>& tilt_options() { return s_Preset_sla_tilt_option
const std::map<std::string, ConfigOptionFloats> tilt_options_floats_defs = const std::map<std::string, ConfigOptionFloats> tilt_options_floats_defs =
{ {
{"delay_before_exposure_ms", ConfigOptionFloats({ 3., 3., 0., 1., 3.5, 3.5, 0., 0. }) } , {"delay_before_exposure", ConfigOptionFloats({ 3., 3., 0., 1., 3.5, 3.5, 0., 0. }) } ,
{"delay_after_exposure_ms", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } , {"delay_after_exposure", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } ,
{"tilt_down_offset_delay_ms", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } , {"tilt_down_offset_delay", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } ,
{"tilt_down_delay_ms", ConfigOptionFloats({ 0., 0., 0., 0.5, 0., 0., 0., 0. }) } , {"tilt_down_delay", ConfigOptionFloats({ 0., 0., 0., 0.5, 0., 0., 0., 0. }) } ,
{"tilt_up_offset_delay_ms", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } , {"tilt_up_offset_delay", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } ,
{"tilt_up_delay_ms", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } , {"tilt_up_delay", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } ,
}; };
const std::map<std::string, ConfigOptionInts> tilt_options_ints_defs = const std::map<std::string, ConfigOptionInts> tilt_options_ints_defs =
{ {
{"tower_hop_height_nm", ConfigOptionInts({ 0, 0, 0, 0, 5, 5, 0, 0 }) } , {"tower_hop_height", ConfigOptionInts({ 0, 0, 0, 0, 5, 5, 0, 0 }) } ,
{"tilt_down_offset_steps", ConfigOptionInts({ 0, 0, 0, 0, 2200, 2200, 0, 0 }) } , {"tilt_down_offset_steps", ConfigOptionInts({ 0, 0, 0, 0, 2200, 2200, 0, 0 }) } ,
{"tilt_down_cycles", ConfigOptionInts({ 1, 1, 1, 1, 1, 1, 0, 0 }) } , {"tilt_down_cycles", ConfigOptionInts({ 1, 1, 1, 1, 1, 1, 0, 0 }) } ,
{"tilt_up_offset_steps", ConfigOptionInts({ 1200, 1200, 600, 600, 2200, 2200, 0, 0 }) } , {"tilt_up_offset_steps", ConfigOptionInts({ 1200, 1200, 600, 600, 2200, 2200, 0, 0 }) } ,
{"tilt_up_cycles", ConfigOptionInts({ 1, 1, 1, 1, 1, 1, 0, 0 }) } , {"tilt_up_cycles", ConfigOptionInts({ 1, 1, 1, 1, 1, 1, 0, 0 }) } ,
}; };
const std::map<std::string, ConfigOptionBools> tilt_options_bools_defs = const std::map<std::string, ConfigOptionBools> tilt_options_bools_defs =
@ -5007,17 +5007,17 @@ const std::map<std::string, ConfigOptionBools> tilt_options_bools_defs =
{"use_tilt", ConfigOptionBools({ true, true, true, true, true, true, false, false })} , {"use_tilt", ConfigOptionBools({ true, true, true, true, true, true, false, false })} ,
}; };
const std::map<std::string, ConfigOptionEnums<TowerProfiles>> tower_tilt_options_enums_defs = const std::map<std::string, ConfigOptionEnums<TowerSpeeds>> tower_tilt_options_enums_defs =
{ {
{"tower_profile", ConfigOptionEnums<TowerProfiles>({ tpLayer22, tpLayer22, tpLayer22, tpLayer22, tpLayer2, tpLayer2, tpLayer1, tpLayer1 })} , {"tower_speed", ConfigOptionEnums<TowerSpeeds>({ tsLayer22, tsLayer22, tsLayer22, tsLayer22, tsLayer2, tsLayer2, tsLayer1, tsLayer1 })} ,
}; };
const std::map<std::string, ConfigOptionEnums<TiltProfiles>> tilt_options_enums_defs = const std::map<std::string, ConfigOptionEnums<TiltSpeeds>> tilt_options_enums_defs =
{ {
{"tilt_down_initial_profile", ConfigOptionEnums<TiltProfiles>({ tpLayer1750, tpLayer1750, tpLayer1750, tpLayer1750, tpLayer800, tpLayer800, tpMove120, tpMove120 }) } , {"tilt_down_initial_speed", ConfigOptionEnums<TiltSpeeds>({ tsLayer1750, tsLayer1750, tsLayer1750, tsLayer1750, tsLayer800, tsLayer800, tsMove120, tsMove120 }) } ,
{"tilt_down_finish_profile", ConfigOptionEnums<TiltProfiles>({ tpLayer1750, tpLayer1750, tpMove8000, tpLayer1750, tpLayer1750, tpLayer1750, tpMove120, tpMove120 }) } , {"tilt_down_finish_speed", ConfigOptionEnums<TiltSpeeds>({ tsLayer1750, tsLayer1750, tsMove8000, tsLayer1750, tsLayer1750, tsLayer1750, tsMove120, tsMove120 }) } ,
{"tilt_up_initial_profile", ConfigOptionEnums<TiltProfiles>({ tpMove8000, tpMove8000, tpMove8000, tpMove8000, tpLayer1750, tpLayer1750, tpMove120, tpMove120 }) } , {"tilt_up_initial_speed", ConfigOptionEnums<TiltSpeeds>({ tsMove8000, tsMove8000, tsMove8000, tsMove8000, tsLayer1750, tsLayer1750, tsMove120, tsMove120 }) } ,
{"tilt_up_finish_profile", ConfigOptionEnums<TiltProfiles>({ tpLayer1750, tpLayer1750, tpLayer1750, tpLayer1750, tpLayer800, tpLayer800, tpMove120, tpMove120 }) } , {"tilt_up_finish_speed", ConfigOptionEnums<TiltSpeeds>({ tsLayer1750, tsLayer1750, tsLayer1750, tsLayer1750, tsLayer800, tsLayer800, tsMove120, tsMove120 }) } ,
}; };
// Default values containe option pair of values (Below and Above) for each titl modes // Default values containe option pair of values (Below and Above) for each titl modes
@ -5025,21 +5025,21 @@ const std::map<std::string, ConfigOptionEnums<TiltProfiles>> tilt_options_enums_
const std::map<std::string, ConfigOptionFloats> tilt_options_floats_sl1_defs = const std::map<std::string, ConfigOptionFloats> tilt_options_floats_sl1_defs =
{ {
{"delay_before_exposure_ms", ConfigOptionFloats({ 3., 3., 0., 1., 3.5, 3.5, 0., 0. }) } , {"delay_before_exposure", ConfigOptionFloats({ 3., 3., 0., 1., 3.5, 3.5, 0., 0. }) } ,
{"delay_after_exposure_ms", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } , {"delay_after_exposure", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } ,
{"tilt_down_offset_delay_ms", ConfigOptionFloats({ 1., 1., 0., 0., 0., 0., 0., 0. }) } , {"tilt_down_offset_delay", ConfigOptionFloats({ 1., 1., 0., 0., 0., 0., 0., 0. }) } ,
{"tilt_down_delay_ms", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } , {"tilt_down_delay", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } ,
{"tilt_up_offset_delay_ms", ConfigOptionFloats({ 0., 0., 0., 0., 1., 1., 0., 0. }) } , {"tilt_up_offset_delay", ConfigOptionFloats({ 0., 0., 0., 0., 1., 1., 0., 0. }) } ,
{"tilt_up_delay_ms", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } , {"tilt_up_delay", ConfigOptionFloats({ 0., 0., 0., 0., 0., 0., 0., 0. }) } ,
}; };
const std::map<std::string, ConfigOptionInts> tilt_options_ints_sl1_defs = const std::map<std::string, ConfigOptionInts> tilt_options_ints_sl1_defs =
{ {
{"tower_hop_height_nm", ConfigOptionInts({ 0, 0, 0, 0, 5, 5, 0, 0 }) } , {"tower_hop_height", ConfigOptionInts({ 0, 0, 0, 0, 5, 5, 0, 0 }) } ,
{"tilt_down_offset_steps", ConfigOptionInts({ 650, 650, 0, 0, 2200, 2200, 0, 0 }) } , {"tilt_down_offset_steps", ConfigOptionInts({ 650, 650, 0, 0, 2200, 2200, 0, 0 }) } ,
{"tilt_down_cycles", ConfigOptionInts({ 1, 1, 1, 1, 1, 1, 0, 0 }) } , {"tilt_down_cycles", ConfigOptionInts({ 1, 1, 1, 1, 1, 1, 0, 0 }) } ,
{"tilt_up_offset_steps", ConfigOptionInts({ 400, 400, 400, 400, 2200, 2200, 0, 0 }) } , {"tilt_up_offset_steps", ConfigOptionInts({ 400, 400, 400, 400, 2200, 2200, 0, 0 }) } ,
{"tilt_up_cycles", ConfigOptionInts({ 1, 1, 1, 1, 1, 1, 0, 0 }) } , {"tilt_up_cycles", ConfigOptionInts({ 1, 1, 1, 1, 1, 1, 0, 0 }) } ,
}; };
const std::map<std::string, ConfigOptionBools> tilt_options_bools_sl1_defs = const std::map<std::string, ConfigOptionBools> tilt_options_bools_sl1_defs =
@ -5048,17 +5048,17 @@ const std::map<std::string, ConfigOptionBools> tilt_options_bools_sl1_defs =
}; };
const std::map<std::string, ConfigOptionEnums<TowerProfiles>> tower_tilt_options_enums_sl1_defs = const std::map<std::string, ConfigOptionEnums<TowerSpeeds>> tower_tilt_options_enums_sl1_defs =
{ {
{"tower_profile", ConfigOptionEnums<TowerProfiles>({ tpLayer22, tpLayer22, tpLayer22, tpLayer22, tpLayer2, tpLayer2, tpLayer1, tpLayer1 })} , {"tower_speed", ConfigOptionEnums<TowerSpeeds>({ tsLayer22, tsLayer22, tsLayer22, tsLayer22, tsLayer2, tsLayer2, tsLayer1, tsLayer1 })} ,
}; };
const std::map<std::string, ConfigOptionEnums<TiltProfiles>> tilt_options_enums_sl1_defs = const std::map<std::string, ConfigOptionEnums<TiltSpeeds>> tilt_options_enums_sl1_defs =
{ {
{"tilt_down_initial_profile", ConfigOptionEnums<TiltProfiles>({ tpLayer400, tpLayer400, tpLayer400, tpLayer400, tpLayer600, tpLayer600, tpMove120, tpMove120 }) } , {"tilt_down_initial_speed", ConfigOptionEnums<TiltSpeeds>({ tsLayer400, tsLayer400, tsLayer400, tsLayer400, tsLayer600, tsLayer600, tsMove120, tsMove120 }) } ,
{"tilt_down_finish_profile", ConfigOptionEnums<TiltProfiles>({ tpLayer1500, tpLayer1500, tpLayer1750, tpLayer1500, tpLayer1500, tpLayer1500, tpMove120, tpMove120 }) } , {"tilt_down_finish_speed", ConfigOptionEnums<TiltSpeeds>({ tsLayer1500, tsLayer1500, tsLayer1750, tsLayer1500, tsLayer1500, tsLayer1500, tsMove120, tsMove120 }) } ,
{"tilt_up_initial_profile", ConfigOptionEnums<TiltProfiles>({ tpMove5120, tpMove5120, tpMove5120, tpMove5120, tpLayer1500, tpLayer1500, tpMove120, tpMove120 }) } , {"tilt_up_initial_speed", ConfigOptionEnums<TiltSpeeds>({ tsMove5120, tsMove5120, tsMove5120, tsMove5120, tsLayer1500, tsLayer1500, tsMove120, tsMove120 }) } ,
{"tilt_up_finish_profile", ConfigOptionEnums<TiltProfiles>({ tpLayer400, tpLayer400, tpLayer400, tpLayer400, tpLayer600, tpLayer600, tpMove120, tpMove120 }) } , {"tilt_up_finish_speed", ConfigOptionEnums<TiltSpeeds>({ tsLayer400, tsLayer400, tsLayer400, tsLayer400, tsLayer600, tsLayer600, tsMove120, tsMove120 }) } ,
}; };
void handle_legacy_sla(DynamicPrintConfig &config) void handle_legacy_sla(DynamicPrintConfig &config)
@ -5085,7 +5085,7 @@ void handle_legacy_sla(DynamicPrintConfig &config)
// Load default tilt options in config in respect to the print speed, if config is loaded from old PS // Load default tilt options in config in respect to the print speed, if config is loaded from old PS
if (config.has("material_print_speed") && if (config.has("material_print_speed") &&
!config.has("tilt_down_offset_delay_ms") // Config from old PS doesn't contain any of tilt options, so check it !config.has("tilt_down_offset_delay") // Config from old PS doesn't contain any of tilt options, so check it
) { ) {
int tilt_mode = config.option("material_print_speed")->getInt(); int tilt_mode = config.option("material_print_speed")->getInt();
@ -5094,8 +5094,8 @@ void handle_legacy_sla(DynamicPrintConfig &config)
const std::map<std::string, ConfigOptionFloats> floats_defs = is_sl1_model ? tilt_options_floats_sl1_defs : tilt_options_floats_defs; const std::map<std::string, ConfigOptionFloats> floats_defs = is_sl1_model ? tilt_options_floats_sl1_defs : tilt_options_floats_defs;
const std::map<std::string, ConfigOptionInts> ints_defs = is_sl1_model ? tilt_options_ints_sl1_defs : tilt_options_ints_defs; const std::map<std::string, ConfigOptionInts> ints_defs = is_sl1_model ? tilt_options_ints_sl1_defs : tilt_options_ints_defs;
const std::map<std::string, ConfigOptionBools> bools_defs = is_sl1_model ? tilt_options_bools_sl1_defs : tilt_options_bools_defs; const std::map<std::string, ConfigOptionBools> bools_defs = is_sl1_model ? tilt_options_bools_sl1_defs : tilt_options_bools_defs;
const std::map<std::string, ConfigOptionEnums<TowerProfiles>> tower_enums_defs = is_sl1_model ? tower_tilt_options_enums_sl1_defs : tower_tilt_options_enums_defs; const std::map<std::string, ConfigOptionEnums<TowerSpeeds>> tower_enums_defs = is_sl1_model ? tower_tilt_options_enums_sl1_defs : tower_tilt_options_enums_defs;
const std::map<std::string, ConfigOptionEnums<TiltProfiles>> tilt_enums_defs = is_sl1_model ? tilt_options_enums_sl1_defs : tilt_options_enums_defs; const std::map<std::string, ConfigOptionEnums<TiltSpeeds>> tilt_enums_defs = is_sl1_model ? tilt_options_enums_sl1_defs : tilt_options_enums_defs;
for (const std::string& opt_key : s_Preset_sla_tilt_options) { for (const std::string& opt_key : s_Preset_sla_tilt_options) {
switch (config.def()->get(opt_key)->type) { switch (config.def()->get(opt_key)->type) {
@ -5122,7 +5122,7 @@ void handle_legacy_sla(DynamicPrintConfig &config)
break; break;
case coEnums: { case coEnums: {
int val1, val2; int val1, val2;
if (opt_key == "tower_profile") { if (opt_key == "tower_speed") {
auto values = tower_enums_defs.at(opt_key); auto values = tower_enums_defs.at(opt_key);
val1 = values.get_at(2 * tilt_mode); val1 = values.get_at(2 * tilt_mode);
val2 = values.get_at(2 * tilt_mode + 1); val2 = values.get_at(2 * tilt_mode + 1);

View File

@ -171,35 +171,35 @@ enum class GCodeThumbnailsFormat {
PNG, JPG, QOI PNG, JPG, QOI
}; };
enum TowerProfiles : int { enum TowerSpeeds : int {
tpLayer1, tsLayer1,
tpLayer2, tsLayer2,
tpLayer3, tsLayer3,
tpLayer4, tsLayer4,
tpLayer5, tsLayer5,
tpLayer8, tsLayer8,
tpLayer11, tsLayer11,
tpLayer14, tsLayer14,
tpLayer18, tsLayer18,
tpLayer22, tsLayer22,
tpLayer24, tsLayer24,
}; };
enum TiltProfiles : int { enum TiltSpeeds : int {
tpMove120, tsMove120,
tpLayer200, tsLayer200,
tpMove300, tsMove300,
tpLayer400, tsLayer400,
tpLayer600, tsLayer600,
tpLayer800, tsLayer800,
tpLayer1000, tsLayer1000,
tpLayer1250, tsLayer1250,
tpLayer1500, tsLayer1500,
tpLayer1750, tsLayer1750,
tpLayer2000, tsLayer2000,
tpLayer2250, tsLayer2250,
tpMove5120, tsMove5120,
tpMove8000, tsMove8000,
}; };
#define CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(NAME) \ #define CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(NAME) \
@ -1190,23 +1190,23 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloat, area_fill)) ((ConfigOptionFloat, area_fill))
//tilt params //tilt params
((ConfigOptionFloats, delay_before_exposure_ms)) ((ConfigOptionFloats, delay_before_exposure))
((ConfigOptionFloats, delay_after_exposure_ms)) ((ConfigOptionFloats, delay_after_exposure))
((ConfigOptionInts, tower_hop_height_nm)) ((ConfigOptionInts, tower_hop_height))
((ConfigOptionEnums<TowerProfiles>, tower_profile)) ((ConfigOptionEnums<TowerSpeeds>, tower_speed))
((ConfigOptionBools, use_tilt)) ((ConfigOptionBools, use_tilt))
((ConfigOptionEnums<TiltProfiles>, tilt_down_initial_profile)) ((ConfigOptionEnums<TiltSpeeds>, tilt_down_initial_speed))
((ConfigOptionInts, tilt_down_offset_steps)) ((ConfigOptionInts, tilt_down_offset_steps))
((ConfigOptionFloats, tilt_down_offset_delay_ms)) ((ConfigOptionFloats, tilt_down_offset_delay))
((ConfigOptionEnums<TiltProfiles>, tilt_down_finish_profile)) ((ConfigOptionEnums<TiltSpeeds>, tilt_down_finish_speed))
((ConfigOptionInts, tilt_down_cycles)) ((ConfigOptionInts, tilt_down_cycles))
((ConfigOptionFloats, tilt_down_delay_ms)) ((ConfigOptionFloats, tilt_down_delay))
((ConfigOptionEnums<TiltProfiles>, tilt_up_initial_profile)) ((ConfigOptionEnums<TiltSpeeds>, tilt_up_initial_speed))
((ConfigOptionInts, tilt_up_offset_steps)) ((ConfigOptionInts, tilt_up_offset_steps))
((ConfigOptionFloats, tilt_up_offset_delay_ms)) ((ConfigOptionFloats, tilt_up_offset_delay))
((ConfigOptionEnums<TiltProfiles>, tilt_up_finish_profile)) ((ConfigOptionEnums<TiltSpeeds>, tilt_up_finish_speed))
((ConfigOptionInts, tilt_up_cycles)) ((ConfigOptionInts, tilt_up_cycles))
((ConfigOptionFloats, tilt_up_delay_ms)) ((ConfigOptionFloats, tilt_up_delay))
) )
PRINT_CONFIG_CLASS_DEFINE( PRINT_CONFIG_CLASS_DEFINE(

View File

@ -685,8 +685,8 @@ std::string SLAPrint::validate(std::vector<std::string>*) const
} }
} }
if (!m_material_config.use_tilt.get_at(0) && m_material_config.tower_hop_height_nm.get_at(0) == 0 if (!m_material_config.use_tilt.get_at(0) && m_material_config.tower_hop_height.get_at(0) == 0
|| !m_material_config.use_tilt.get_at(1) && m_material_config.tower_hop_height_nm.get_at(1) == 0) || !m_material_config.use_tilt.get_at(1) && m_material_config.tower_hop_height.get_at(1) == 0)
return _u8L("Disabling the 'Use tilt' function causes the object to separate away from the film in the " return _u8L("Disabling the 'Use tilt' function causes the object to separate away from the film in the "
"vertical direction only. Therefore, it is necessary to set the 'Tower hop height' parameter " "vertical direction only. Therefore, it is necessary to set the 'Tower hop height' parameter "
" to a reasonable minimum value."); " to a reasonable minimum value.");
@ -846,23 +846,23 @@ bool SLAPrint::invalidate_state_by_config_options(const std::vector<t_config_opt
"elefant_foot_min_width"sv, "elefant_foot_min_width"sv,
"gamma_correction"sv, "gamma_correction"sv,
// tilt params // tilt params
"delay_before_exposure_ms"sv, "delay_before_exposure"sv,
"delay_after_exposure_ms"sv, "delay_after_exposure"sv,
"tower_hop_height_nm"sv, "tower_hop_height"sv,
"tower_profile"sv, "tower_speed"sv,
"use_tilt"sv, "use_tilt"sv,
"tilt_down_initial_profile"sv, "tilt_down_initial_speed"sv,
"tilt_down_offset_steps"sv, "tilt_down_offset_steps"sv,
"tilt_down_offset_delay_ms"sv, "tilt_down_offset_delay"sv,
"tilt_down_finish_profile"sv, "tilt_down_finish_speed"sv,
"tilt_down_cycles"sv, "tilt_down_cycles"sv,
"tilt_down_delay_ms"sv, "tilt_down_delay"sv,
"tilt_up_initial_profile"sv, "tilt_up_initial_speed"sv,
"tilt_up_offset_steps"sv, "tilt_up_offset_steps"sv,
"tilt_up_offset_delay_ms"sv, "tilt_up_offset_delay"sv,
"tilt_up_finish_profile"sv, "tilt_up_finish_speed"sv,
"tilt_up_cycles"sv, "tilt_up_cycles"sv,
"tilt_up_delay_ms"sv, "tilt_up_delay"sv,
}; };
// Cache the plenty of parameters, which influence the final rasterization only, // Cache the plenty of parameters, which influence the final rasterization only,

View File

@ -949,39 +949,39 @@ static int count_move_time(const std::string& axis_name, double length, int step
struct ExposureProfile { struct ExposureProfile {
// map of internal TowerProfiles to maximum_steprates (usteps/s) // map of internal TowerSpeeds to maximum_steprates (usteps/s)
// this values was provided in default_tower_moving_profiles.json by SLA-team // this values was provided in default_tower_moving_profiles.json by SLA-team
std::map<TowerProfiles, int> tower_speeds = { std::map<TowerSpeeds, int> tower_speeds = {
{ tpLayer1 , 800 }, { tsLayer1 , 800 },
{ tpLayer2 , 1600 }, { tsLayer2 , 1600 },
{ tpLayer3 , 2400 }, { tsLayer3 , 2400 },
{ tpLayer4 , 3200 }, { tsLayer4 , 3200 },
{ tpLayer5 , 4000 }, { tsLayer5 , 4000 },
{ tpLayer8 , 6400 }, { tsLayer8 , 6400 },
{ tpLayer11, 8800 }, { tsLayer11, 8800 },
{ tpLayer14, 11200 }, { tsLayer14, 11200 },
{ tpLayer18, 14400 }, { tsLayer18, 14400 },
{ tpLayer22, 17600 }, { tsLayer22, 17600 },
{ tpLayer24, 19200 }, { tsLayer24, 19200 },
}; };
// map of internal TiltProfiles to maximum_steprates (usteps/s) // map of internal TiltSpeeds to maximum_steprates (usteps/s)
// this values was provided in default_tilt_moving_profiles.json by SLA-team // this values was provided in default_tilt_moving_profiles.json by SLA-team
std::map<TiltProfiles, int> tilt_speeds = { std::map<TiltSpeeds, int> tilt_speeds = {
{ tpMove120 , 120 }, { tsMove120 , 120 },
{ tpLayer200 , 200 }, { tsLayer200 , 200 },
{ tpMove300 , 300 }, { tsMove300 , 300 },
{ tpLayer400 , 400 }, { tsLayer400 , 400 },
{ tpLayer600 , 600 }, { tsLayer600 , 600 },
{ tpLayer800 , 800 }, { tsLayer800 , 800 },
{ tpLayer1000, 1000 }, { tsLayer1000, 1000 },
{ tpLayer1250, 1250 }, { tsLayer1250, 1250 },
{ tpLayer1500, 1500 }, { tsLayer1500, 1500 },
{ tpLayer1750, 1750 }, { tsLayer1750, 1750 },
{ tpLayer2000, 2000 }, { tsLayer2000, 2000 },
{ tpLayer2250, 2250 }, { tsLayer2250, 2250 },
{ tpMove5120 , 5120 }, { tsMove5120 , 5120 },
{ tpMove8000 , 8000 }, { tsMove8000 , 8000 },
}; };
int delay_before_exposure_ms { 0 }; int delay_before_exposure_ms { 0 };
@ -1006,23 +1006,23 @@ struct ExposureProfile {
ExposureProfile(const SLAMaterialConfig& config, int opt_id) ExposureProfile(const SLAMaterialConfig& config, int opt_id)
{ {
delay_before_exposure_ms = int(1000 * config.delay_before_exposure_ms.get_at(opt_id)); delay_before_exposure_ms = int(1000 * config.delay_before_exposure.get_at(opt_id));
delay_after_exposure_ms = int(1000 * config.delay_after_exposure_ms.get_at(opt_id)); delay_after_exposure_ms = int(1000 * config.delay_after_exposure.get_at(opt_id));
tilt_down_offset_delay_ms = int(1000 * config.tilt_down_offset_delay_ms.get_at(opt_id)); tilt_down_offset_delay_ms = int(1000 * config.tilt_down_offset_delay.get_at(opt_id));
tilt_down_delay_ms = int(1000 * config.tilt_down_delay_ms.get_at(opt_id)); tilt_down_delay_ms = int(1000 * config.tilt_down_delay.get_at(opt_id));
tilt_up_offset_delay_ms = int(1000 * config.tilt_up_offset_delay_ms.get_at(opt_id)); tilt_up_offset_delay_ms = int(1000 * config.tilt_up_offset_delay.get_at(opt_id));
tilt_up_delay_ms = int(1000 * config.tilt_up_delay_ms.get_at(opt_id)); tilt_up_delay_ms = int(1000 * config.tilt_up_delay.get_at(opt_id));
tower_hop_height_nm = config.tower_hop_height_nm.get_at(opt_id) * 1000000; tower_hop_height_nm = config.tower_hop_height.get_at(opt_id) * 1000000;
tilt_down_offset_steps = config.tilt_down_offset_steps.get_at(opt_id); tilt_down_offset_steps = config.tilt_down_offset_steps.get_at(opt_id);
tilt_down_cycles = config.tilt_down_cycles.get_at(opt_id); tilt_down_cycles = config.tilt_down_cycles.get_at(opt_id);
tilt_up_offset_steps = config.tilt_up_offset_steps.get_at(opt_id); tilt_up_offset_steps = config.tilt_up_offset_steps.get_at(opt_id);
tilt_up_cycles = config.tilt_up_cycles.get_at(opt_id); tilt_up_cycles = config.tilt_up_cycles.get_at(opt_id);
use_tilt = config.use_tilt.get_at(opt_id); use_tilt = config.use_tilt.get_at(opt_id);
tower_speed = tower_speeds.at(static_cast<TowerProfiles>(config.tower_profile.getInts()[opt_id])); tower_speed = tower_speeds.at(static_cast<TowerSpeeds>(config.tower_speed.getInts()[opt_id]));
tilt_down_initial_speed = tilt_speeds.at(static_cast<TiltProfiles>(config.tilt_down_initial_profile.getInts()[opt_id])); tilt_down_initial_speed = tilt_speeds.at(static_cast<TiltSpeeds>(config.tilt_down_initial_speed.getInts()[opt_id]));
tilt_down_finish_speed = tilt_speeds.at(static_cast<TiltProfiles>(config.tilt_down_finish_profile.getInts()[opt_id])); tilt_down_finish_speed = tilt_speeds.at(static_cast<TiltSpeeds>(config.tilt_down_finish_speed.getInts()[opt_id]));
tilt_up_initial_speed = tilt_speeds.at(static_cast<TiltProfiles>(config.tilt_up_initial_profile.getInts()[opt_id])); tilt_up_initial_speed = tilt_speeds.at(static_cast<TiltSpeeds>(config.tilt_up_initial_speed.getInts()[opt_id]));
tilt_up_finish_speed = tilt_speeds.at(static_cast<TiltProfiles>(config.tilt_up_finish_profile.getInts()[opt_id])); tilt_up_finish_speed = tilt_speeds.at(static_cast<TiltSpeeds>(config.tilt_up_finish_speed.getInts()[opt_id]));
} }
}; };

View File

@ -5463,18 +5463,18 @@ static boost::any get_def_config_value(const DynamicPrintConfig& config, const s
} }
std::vector<std::string> disable_tilt_options = { std::vector<std::string> disable_tilt_options = {
"tilt_down_initial_profile" "tilt_down_initial_speed"
,"tilt_down_offset_steps" ,"tilt_down_offset_steps"
,"tilt_down_offset_delay_ms" ,"tilt_down_offset_delay"
,"tilt_down_finish_profile" ,"tilt_down_finish_speed"
,"tilt_down_cycles" ,"tilt_down_cycles"
,"tilt_down_delay_ms" ,"tilt_down_delay"
,"tilt_up_initial_profile" ,"tilt_up_initial_speed"
,"tilt_up_offset_steps" ,"tilt_up_offset_steps"
,"tilt_up_offset_delay_ms" ,"tilt_up_offset_delay"
,"tilt_up_finish_profile" ,"tilt_up_finish_speed"
,"tilt_up_cycles" ,"tilt_up_cycles"
,"tilt_up_delay_ms" ,"tilt_up_delay"
}; };
void TabSLAMaterial::toggle_tilt_options(bool is_above) void TabSLAMaterial::toggle_tilt_options(bool is_above)