mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX:fixed the issue of AMS not updating location
jira:[STUDIO-9182 STUDIO-9216] Change-Id: I42e57b47abf357cdc99f71e1739ab9fc3a122d85 (cherry picked from commit 43083f1e4834163c11a961e743db1fb7ece52348)
This commit is contained in:
@@ -4187,6 +4187,11 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
|
||||
// new ams added event
|
||||
curr_ams = new_ams;
|
||||
} else {
|
||||
|
||||
if (nozzle_id != ams_it->second->nozzle) {
|
||||
ams_it->second->nozzle = nozzle_id;
|
||||
}
|
||||
|
||||
curr_ams = ams_it->second;
|
||||
}
|
||||
if (!curr_ams) continue;
|
||||
|
||||
@@ -1009,11 +1009,17 @@ void AMSControl::UpdateAms(std::vector<AMSinfo> ams_info, std::vector<AMSinfo>ex
|
||||
if (!test){
|
||||
// update item
|
||||
bool fresh = false;
|
||||
|
||||
// basic check
|
||||
if (m_ams_info.size() == ams_info.size() && m_extder_data.total_extder_count == data.total_extder_count && m_dev_id == dev_id){
|
||||
for (int i = 0; i < m_ams_info.size(); i++){
|
||||
if (m_ams_info[i].ams_id != ams_info[i].ams_id){
|
||||
fresh = true;
|
||||
}
|
||||
|
||||
if (m_ams_info[i].nozzle_id != ams_info[i].nozzle_id) {
|
||||
fresh = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user