Fix crash when using old firmware

This commit is contained in:
Noisyfox
2025-05-24 18:37:35 +08:00
parent 0d61ae87ed
commit 65936b34c1
15 changed files with 374 additions and 284 deletions

View File

@@ -1504,7 +1504,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->m_extder_data.extders[0].diameter - nozzle_diameter_list[i]) < 1e-3) {
if (abs(obj->m_extder_data.extders[0].current_nozzle_diameter - nozzle_diameter_list[i]) < 1e-3) {
if (m_comboBox_nozzle_dia->GetCount() > i) {
m_comboBox_nozzle_dia->SetSelection(i);
nozzle_is_set = true;