diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 8e8411df8..56ecad9a1 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -4178,15 +4178,14 @@ int MachineObject::parse_json(std::string payload, bool key_field_only) if (!it->contains("id")) continue; std::string ams_id = (*it)["id"].get(); - int nozzle_id = 0; // Default nozzle id + int nozzle_id = MAIN_NOZZLE_ID; // Default nozzle id int type_id = 1; // 0:dummy 1:ams 2:ams-lite 3:n3f 4:n3s - if (it->contains("nozzle")) { - nozzle_id = (*it)["nozzle"].get(); - } - - if (it->contains("type")) { - type_id = (*it)["type"].get(); + /*ams info*/ + if (it->contains("info")) { + std::string info = (*it)["info"].get(); + type_id = get_flag_bits(info, 0, 3); + nozzle_id = get_flag_bits(info, 8, 3); } /*AMS without initialization*/