FIX: fix change nozzle temp in Studio but printer not change

Jira: 6510

Change-Id: Ia0e1ac586ff41ddbabdac0845415e70774299387
Signed-off-by: maosheng.wei <maosheng.wei@bambulab.com>
This commit is contained in:
maosheng.wei 2024-03-14 18:45:38 +08:00 committed by Lane.Wei
parent bdc1ffb4d5
commit 5929a0a431
2 changed files with 3 additions and 2 deletions

View File

@ -1882,7 +1882,7 @@ bool PresetBundle::check_filament_temp_equation_by_printer_type_and_nozzle_for_m
min_temp_equation = true;
else {
BOOST_LOG_TRIVIAL(info) << "tray min temp: " << nozzle_temp_min << " preset min temp: " << min_nozzle_temp;
//nozzle_temp_min = std::to_string(min_nozzle_temp);
nozzle_temp_min = std::to_string(min_nozzle_temp);
}
}
ConfigOption *opt_max = const_cast<Preset *>(preset)->config.option("nozzle_temperature_range_high");
@ -1893,7 +1893,7 @@ bool PresetBundle::check_filament_temp_equation_by_printer_type_and_nozzle_for_m
max_temp_equation = true;
else {
BOOST_LOG_TRIVIAL(info) << "tray max temp: " << nozzle_temp_max << " preset min temp: " << max_nozzle_temp;
//nozzle_temp_max = std::to_string(max_nozzle_temp);
nozzle_temp_max = std::to_string(max_nozzle_temp);
}
}
if (min_temp_equation && max_temp_equation) {

View File

@ -4161,6 +4161,7 @@ int MachineObject::parse_json(std::string payload)
char col_buf[10];
sprintf(col_buf, "%02X%02X%02XFF", (int) color.Red(), (int) color.Green(), (int) color.Blue());
try {
BOOST_LOG_TRIVIAL(info) << "no filament_id in filament_list and reset vt_tray and the filament_id is: " << vt_tray.setting_id;
this->command_ams_filament_settings(255, std::stoi(vt_tray.id), "", "", std::string(col_buf), "", 0, 0);
} catch (...) {
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " " << __LINE__ << " stoi error and tray_id" << vt_tray.id;