FIX:Fix the display issue of uncalibrated AMS

jira:[for uncalibrated ams]

Change-Id: I02e3f3548750fd0bd61d64e36a535a0f83371e98
This commit is contained in:
tao wang 2024-11-04 21:54:33 +08:00 committed by lane.wei
parent db8ae4ccb3
commit f08d40b42a
2 changed files with 7 additions and 1 deletions

View File

@ -4143,6 +4143,7 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
for (auto it = amsList.begin(); it != amsList.end(); it++) { for (auto it = amsList.begin(); it != amsList.end(); it++) {
ams_id_set.insert(it->first); ams_id_set.insert(it->first);
} }
for (auto it = j_ams.begin(); it != j_ams.end(); it++) { for (auto it = j_ams.begin(); it != j_ams.end(); it++) {
if (!it->contains("id")) continue; if (!it->contains("id")) continue;
std::string ams_id = (*it)["id"].get<std::string>(); std::string ams_id = (*it)["id"].get<std::string>();
@ -4158,6 +4159,11 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
type_id = (*it)["type"].get<int>(); type_id = (*it)["type"].get<int>();
} }
/*AMS without initialization*/
if (nozzle_id == 0x0E) {
continue;
}
ams_id_set.erase(ams_id); ams_id_set.erase(ams_id);
Ams* curr_ams = nullptr; Ams* curr_ams = nullptr;
auto ams_it = amsList.find(ams_id); auto ams_it = amsList.find(ams_id);

View File

@ -1521,7 +1521,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_sizer_main->Add(m_statictext_ams_msg, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, FromDIP(15)); m_sizer_main->Add(m_statictext_ams_msg, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, FromDIP(15));
m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(16)); m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(16));
m_sizer_main->Add(sizer_split_options, 1, wxEXPAND|wxLEFT|wxRIGHT, FromDIP(15)); m_sizer_main->Add(sizer_split_options, 1, wxEXPAND|wxLEFT|wxRIGHT, FromDIP(15));
m_sizer_main->Add(m_sizer_options, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT| wxRIGHT, FromDIP(15)); m_sizer_main->Add(m_sizer_options, 0, wxLEFT|wxRIGHT, FromDIP(15));
m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(10)); m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(10));
m_sizer_main->Add(m_simplebook, 0, wxALIGN_CENTER_HORIZONTAL, 0); m_sizer_main->Add(m_simplebook, 0, wxALIGN_CENTER_HORIZONTAL, 0);
m_sizer_main->Add(m_sw_print_failed_info, 0, wxALIGN_CENTER, 0); m_sizer_main->Add(m_sw_print_failed_info, 0, wxALIGN_CENTER, 0);