ENH:support parse new print data

jira:[for new print data]

Change-Id: Iac6747e9ade690fcdf3b7b11239fe183bc7c3796
(cherry picked from commit 6c02c7bc8c77a481253e6c574f7bc13ff2cfcbdc)
This commit is contained in:
tao wang
2024-07-15 21:54:21 +08:00
committed by Noisyfox
parent 89a225a0e1
commit 319827daec
12 changed files with 359 additions and 151 deletions

View File

@@ -1505,7 +1505,7 @@ void CalibrationPresetPage::init_with_machine(MachineObject* obj)
// set nozzle value from machine
bool nozzle_is_set = false;
for (int i = 0; i < NOZZLE_LIST_COUNT; i++) {
if (abs(obj->nozzle_diameter - nozzle_diameter_list[i]) < 1e-3) {
if (abs(obj->m_nozzle_data.nozzles[0].diameter - nozzle_diameter_list[i]) < 1e-3) {
if (m_comboBox_nozzle_dia->GetCount() > i) {
m_comboBox_nozzle_dia->SetSelection(i);
nozzle_is_set = true;
@@ -1836,7 +1836,7 @@ Preset* CalibrationPresetPage::get_printer_preset(MachineObject* obj, float nozz
std::string model_id = printer_it->get_current_printer_type(preset_bundle);
std::string printer_type = obj->printer_type;
if (obj->is_support_p1s_plus) { printer_type = "C12"; }
if (obj->is_support_upgrade_kit && obj->installed_upgrade_kit) { printer_type = "C12"; }
if (model_id.compare(printer_type) == 0
&& printer_nozzle_vals
&& abs(printer_nozzle_vals->get_at(0) - nozzle_value) < 1e-3) {