refactor: convert m_fila_system from raw pointer to shared_ptr

Matches BambuStudio commit c8f70c6ca. DevFilaSystem* m_fila_system
becomes std::shared_ptr<DevFilaSystem>, enabling proper shared ownership
for the AMS drying control feature without no-op deleter hacks.

- DeviceManager.hpp: m_fila_system and GetFilaSystem() use shared_ptr
- DeviceManager.cpp: std::make_shared allocation, remove manual delete,
  add .get() to ParseV1_0 calls
- MoonrakerPrinterAgent.cpp: add .get() to GetFilaSystem() in ParseV1_0
This commit is contained in:
Noisyfox
2026-07-07 17:29:10 +08:00
parent f713c7ae49
commit 922af972c7
3 changed files with 5 additions and 7 deletions

View File

@@ -536,7 +536,7 @@ void MoonrakerPrinterAgent::build_ams_payload(int ams_count, int max_lane_index,
print_json["ams"] = ams_json;
// Call the parser to populate DevFilaSystem
DevFilaSystemParser::ParseV1_0(print_json, obj, obj->GetFilaSystem(), false);
DevFilaSystemParser::ParseV1_0(print_json, obj, obj->GetFilaSystem().get(), false);
BOOST_LOG_TRIVIAL(info) << "MoonrakerPrinterAgent::build_ams_payload: Parsed " << trays.size() << " trays";
// Set printer_type so update_sync_status() can match it against the preset's printer type.