Remove porting jargon and provenance notes from comments

This commit is contained in:
SoftFever
2026-07-18 01:46:23 +08:00
parent 4683c17f6f
commit 0b4cb89f7c
19 changed files with 97 additions and 116 deletions

View File

@@ -124,9 +124,8 @@ public:
std::string ams_setting_id; std::string ams_setting_id;
bool m_is_third; bool m_is_third;
// Orca: view-only mode (dialog half of the laser/cut read-only feature). When set, the dialog is // Orca: view-only mode (laser/cut). When set, the dialog is inspectable but every
// inspectable but every editing control is disabled and no command is sent. Set by the caller // editing control is disabled and no command is sent.
// (StatusPanel, cluster 6); dormant (false) until then, so behavior is unchanged.
bool m_view_only = false; bool m_view_only = false;
wxString m_brand_filament; wxString m_brand_filament;
wxString m_brand_sn; wxString m_brand_sn;

View File

@@ -96,8 +96,8 @@ protected:
wxString m_mapping_text; wxString m_mapping_text;
public: public:
// Orca: filament_id defaults to empty so the pre-resync 3-arg callers (SelectMachine [cluster 7], // Orca: filament_id defaults to empty so the existing 3-arg callers keep compiling;
// SendMultiMachinePage, the calibration wizard) keep compiling; m_filament_id is otherwise unused here. // m_filament_id is otherwise unused here.
MaterialItem(wxWindow *parent, wxColour mcolour, wxString mname, std::string filament_id = std::string()); MaterialItem(wxWindow *parent, wxColour mcolour, wxString mname, std::string filament_id = std::string());
~MaterialItem(); ~MaterialItem();
@@ -172,7 +172,7 @@ public:
class MaterialSyncItem : public MaterialItem class MaterialSyncItem : public MaterialItem
{ {
public: public:
// Orca: filament_id defaults to empty for pre-resync 3-arg callers (see MaterialItem). // Orca: filament_id defaults to empty for existing 3-arg callers (see MaterialItem).
MaterialSyncItem(wxWindow *parent, wxColour mcolour, wxString mname, std::string filament_id = std::string()); MaterialSyncItem(wxWindow *parent, wxColour mcolour, wxString mname, std::string filament_id = std::string());
~MaterialSyncItem(); ~MaterialSyncItem();
int get_real_offset(); int get_real_offset();
@@ -352,11 +352,10 @@ public:
void paintEvent(wxPaintEvent &evt); void paintEvent(wxPaintEvent &evt);
void set_parent_item(MaterialItem* item) {m_parent_item = item;}; void set_parent_item(MaterialItem* item) {m_parent_item = item;};
void set_show_type(ShowType type) { m_show_type = type; }; void set_show_type(ShowType type) { m_show_type = type; };
// Orca: kept surface for the reverse-direction SelectMachine — its only caller passes false, which // Orca: kept as a no-op for SelectMachine — its only caller passes false, which
// equals the update path's default (all slots shown), so this no-op preserves behavior. // equals the update path's default (all slots shown).
void set_only_show_ext_spool(bool /*flag*/) {} void set_only_show_ext_spool(bool /*flag*/) {}
// Orca: kept surface for the reverse-direction SelectMachine — this helper (dropped by the reference) // Orca: dropped by the reference but still consumed by SelectMachine.
// is still consumed by SelectMachine, so it stays as a permanent compatibility surface.
std::vector<TrayData> parse_ams_mapping(const std::map<std::string, DevAms*, NumericStrCompare>& amsList); std::vector<TrayData> parse_ams_mapping(const std::map<std::string, DevAms*, NumericStrCompare>& amsList);
#ifdef __APPLE__ #ifdef __APPLE__

View File

@@ -148,8 +148,8 @@ enum class DevFirmwareUpgradeState : int
UpgradingFinished = 3 UpgradingFinished = 3
}; };
// Orca: permanent compatibility alias — the reverse-direction DeviceManager/UpgradePanel keep the // Orca: DeviceManager/UpgradePanel keep the Orca spelling of this enum; the alias to the
// Orca spelling of this enum, so the alias to the reference name is a kept surface, not transitional. // reference name is a permanent compatibility surface.
using DevFirmwareUpgradingState = DevFirmwareUpgradeState; using DevFirmwareUpgradingState = DevFirmwareUpgradeState;
class devPrinterUtil class devPrinterUtil

View File

@@ -76,7 +76,7 @@ public:
DevAmsSystemIdx GetCurrentFirmwareIdxSel() const { return m_current_firmware_sel.m_firmare_idx; }; DevAmsSystemIdx GetCurrentFirmwareIdxSel() const { return m_current_firmware_sel.m_firmare_idx; };
DevAmsSystemIdx GetCurrentFirmwareIdxRun() const { return m_current_firmware_run.m_firmare_idx; }; DevAmsSystemIdx GetCurrentFirmwareIdxRun() const { return m_current_firmware_run.m_firmare_idx; };
std::unordered_map<int, DevAmsSystemFirmware> GetSuppotedFirmwares() const { return m_firmwares;}; // Orca: unordered (AMSSetting.cpp, cluster 8) std::unordered_map<int, DevAmsSystemFirmware> GetSuppotedFirmwares() const { return m_firmwares;}; // Orca: unordered (mirrored by AMSSetting.cpp)
bool IsSwitching() const { return m_status == "SWITCHING";}; bool IsSwitching() const { return m_status == "SWITCHING";};
bool IsIdle() const { return m_status == "IDLE";}; bool IsIdle() const { return m_status == "IDLE";};
@@ -95,7 +95,7 @@ private:
DevAmsSystemFirmware m_current_firmware_run; DevAmsSystemFirmware m_current_firmware_run;
DevAmsSystemFirmware m_current_firmware_sel; DevAmsSystemFirmware m_current_firmware_sel;
std::unordered_map<int, DevAmsSystemFirmware> m_firmwares; // Orca: unordered (AMSSetting.cpp, cluster 8) std::unordered_map<int, DevAmsSystemFirmware> m_firmwares; // Orca: unordered (mirrored by AMSSetting.cpp)
DevCtrlInfo m_ctrl_switching; DevCtrlInfo m_ctrl_switching;
}; };

View File

@@ -10,8 +10,7 @@ class MachineObject;
/* some static info of machine*/ /*TODO*/ /* some static info of machine*/ /*TODO*/
// Orca: kept as a stub — connection_type/is_lan_mode_printer/is_cloud_mode_printer live inline on // Orca: kept as a stub — connection_type/is_lan_mode_printer/is_cloud_mode_printer live inline on
// MachineObject (DeviceManager.hpp). Adopting the reference's full DevInfo would duplicate those // MachineObject (DeviceManager.hpp). Adopting the reference's full DevInfo would duplicate those
// definitions and require an m_dev_info member MachineObject does not have; that consolidation is // definitions and require an m_dev_info member MachineObject does not have.
// deferred to the DeviceManager resync (cluster 2).
class DevInfo class DevInfo
{ {
public: public:

View File

@@ -105,7 +105,7 @@ private:
// print option // print option
DevPrintingSpeedLevel m_speed_level = SPEED_LEVEL_INVALID; DevPrintingSpeedLevel m_speed_level = SPEED_LEVEL_INVALID;
// detection options (7 existing + 6 newly parsed) // detection options
PrintOptionData m_ai_monitoring_detection; PrintOptionData m_ai_monitoring_detection;
PrintOptionData m_first_layer_detection; PrintOptionData m_first_layer_detection;
PrintOptionData m_buildplate_mark_detection; PrintOptionData m_buildplate_mark_detection;

View File

@@ -96,9 +96,8 @@ class DevStorage;
class DevUpgrade; // Orca: adopt DeviceCore split class DevUpgrade; // Orca: adopt DeviceCore split
struct DevPrintTaskRatingInfo; struct DevPrintTaskRatingInfo;
// Orca: REF-additive, now ported (post-review). Returns true when filament_id (e.g. "GFA11", // Returns true when filament_id (e.g. "GFA11", "GFU00") is on the stringing-prone list for the
// "GFU00") is on the stringing-prone list for the given nozzle diameter (mm), bucketed per // given nozzle diameter (mm), bucketed per nozzle size to mirror the printer firmware.
// nozzle size to mirror the printer firmware.
bool is_stringing_prone_filament(const std::string& filament_id, float nozzle_diameter); bool is_stringing_prone_filament(const std::string& filament_id, float nozzle_diameter);
@@ -163,13 +162,11 @@ public:
void set_agent(NetworkAgent* agent) { m_agent = agent; } void set_agent(NetworkAgent* agent) { m_agent = agent; }
NetworkAgent* get_agent() const { return m_agent; } // Orca: needed by DeviceCore modules (DevAxisCtrl) NetworkAgent* get_agent() const { return m_agent; } // Orca: needed by DeviceCore modules (DevAxisCtrl)
// Orca: these five DeviceCore module accessors are UNWIRED on the read side. The modules are // Orca: these DeviceCore module accessors are unwired on the read side — axis/chamber/status
// constructed in the ctor and axis/chamber/status are fed every MQTT push (ParseAxis/ParseChamber/ // are fed every MQTT push but no GUI consumer reads them yet, and for calib/upgrade the inline
// ParseStatus), but NO GUI consumer reads them yet. For calib/upgrade the module parse is NOT // parse in DeviceManager.cpp remains authoritative. Do not wire DevUpgrade naively: its
// routed — the legacy inline parse in DeviceManager.cpp remains authoritative. Migration is parked // ParseUpgradeDisplayState would duplicate the inline block's dis_state==3 ->
// (follow-up issue); do NOT wire DevUpgrade naively: its ParseUpgradeDisplayState would duplicate // command_get_version CallAfter side effect.
// the inline block's dis_state==3 -> command_get_version CallAfter side effect.
// Orca: adopt DeviceCore split — reference-shape accessors for the new modules
std::shared_ptr<DevAxis> GetAxis() const { return m_axis; } std::shared_ptr<DevAxis> GetAxis() const { return m_axis; }
std::shared_ptr<DevChamber> GetChamber() const { return m_chamber; } std::shared_ptr<DevChamber> GetChamber() const { return m_chamber; }
DevCalib* GetCalib() const { return m_calib; } DevCalib* GetCalib() const { return m_calib; }
@@ -409,7 +406,6 @@ public:
DevFirmwareVersionInfo laser_version_info; DevFirmwareVersionInfo laser_version_info;
DevFirmwareVersionInfo cutting_module_version_info; DevFirmwareVersionInfo cutting_module_version_info;
DevFirmwareVersionInfo extinguish_version_info; DevFirmwareVersionInfo extinguish_version_info;
// Orca: REF-additive accessory firmware versions, now ported (post-review)
DevFirmwareVersionInfo rotary_version_info; DevFirmwareVersionInfo rotary_version_info;
DevFirmwareVersionInfo exhaustfan_version_info; DevFirmwareVersionInfo exhaustfan_version_info;
DevFirmwareVersionInfo amshub_version_info; DevFirmwareVersionInfo amshub_version_info;
@@ -710,9 +706,8 @@ public:
boost::thread* get_slice_info_thread { nullptr }; boost::thread* get_slice_info_thread { nullptr };
boost::thread* get_model_task_thread { nullptr }; boost::thread* get_model_task_thread { nullptr };
// Orca: REF-additive, now ported (post-review). Per-filament-index AMS slot mapping // Per-filament-index AMS slot mapping reported by the printer in print.mapping. Up to
// reported by the printer in print.mapping. Up to 32 entries, each value packs // 32 entries, each value packs (ams_id << 8) | slot_id; 0xFFFF means unused.
// (ams_id << 8) | slot_id; 0xFFFF means unused.
std::vector<uint16_t> print_job_filament_mapping; std::vector<uint16_t> print_job_filament_mapping;
bool any_loaded_filament_is_stringing_prone() const; bool any_loaded_filament_is_stringing_prone() const;
@@ -933,12 +928,11 @@ public:
/*for more extruder*/ /*for more extruder*/
bool is_enable_np{ false }; bool is_enable_np{ false };
bool is_enable_ams_np{ false }; bool is_enable_ams_np{ false };
bool is_support_filament_32_colors{ false }; // Orca: REF-additive, now ported (post-review) bool is_support_filament_32_colors{ false };
bool is_support_fila_change_abort{ false }; // Orca: REF-additive, now ported (filament-change Stop button) bool is_support_fila_change_abort{ false }; // filament-change Stop button
bool is_support_ext_change_assist_old{ false }; // Orca: REF-additive, now ported (A/P-series multi-color external change assist) bool is_support_ext_change_assist_old{ false }; // A/P-series multi-color external change assist
// Orca: REF-additive, now ported (post-review). Max filament color count for the send // Max filament color count for the send gate; returns 0 when there is no explicit upper bound.
// gate; returns 0 when there is no explicit upper bound.
int get_max_filament_color_count() const; int get_max_filament_color_count() const;
/** /**

View File

@@ -523,7 +523,7 @@ void PrintJob::process(Ctl &ctl)
BOOST_LOG_TRIVIAL(info) << "print_job: printer has enter printing status, s = " << obj->print_status; BOOST_LOG_TRIVIAL(info) << "print_job: printer has enter printing status, s = " << obj->print_status;
return true; return true;
} }
// Orca: break the wait-for-print-start loop on user cancel (resync). // Break the wait-for-print-start loop on user cancel.
if (ctl.was_canceled()) { if (ctl.was_canceled()) {
BOOST_LOG_TRIVIAL(info) << "print_job: user cancel the job " << obj->job_id_; BOOST_LOG_TRIVIAL(info) << "print_job: user cancel the job " << obj->job_id_;
return true; return true;
@@ -644,8 +644,8 @@ void PrintJob::process(Ctl &ctl)
if (result < 0) { if (result < 0) {
curr_percent = -1; curr_percent = -1;
// Orca: restore the ENC-flag-not-ready message (resync). The printer is still fetching its // The printer is still fetching its encryption flag (a transient state), so ask the
// encryption flag (a transient state), so ask the user to retry rather than showing a generic error. // user to retry rather than showing a generic error.
if (result == BAMBU_NETOWRK_ERR_PRINT_SP_ENC_FLAG_NOT_READY) { if (result == BAMBU_NETOWRK_ERR_PRINT_SP_ENC_FLAG_NOT_READY) {
msg_text = _u8L("Retrieving printer information, please try again later."); msg_text = _u8L("Retrieving printer information, please try again later.");
} else if (result == BAMBU_NETWORK_ERR_PRINT_WR_FILE_NOT_EXIST || result == BAMBU_NETWORK_ERR_PRINT_SP_FILE_NOT_EXIST) { } else if (result == BAMBU_NETWORK_ERR_PRINT_WR_FILE_NOT_EXIST || result == BAMBU_NETWORK_ERR_PRINT_SP_FILE_NOT_EXIST) {

View File

@@ -118,11 +118,9 @@ void SendJob::process(Ctl &ctl)
ctl.call_on_main_thread([this] { prepare(); }).wait(); ctl.call_on_main_thread([this] { prepare(); }).wait();
ctl.update_status(0, msg); ctl.update_status(0, msg);
// Orca: IP/access-code verification pass (resync), adapted to the Worker/Job model. In check mode // In check mode (InputIpAddressDialog / lan-mode send) verify the connection with a dummy
// (InputIpAddressDialog / lan-mode send) verify the connection with a dummy "verify_job" upload and // "verify_job" upload and fire the caller's success/fail callback; when not continuing, stop
// fire the caller's success/fail callback; when not continuing, stop here. Non-check-mode (cloud) // here. Cloud sends skip this.
// sends skip this. Without it, set_check_mode()/check_and_continue() were dead and the IP-verify
// dialog's callbacks (ReleaseNote InputIpAddressDialog / SendToPrinter lan-mode) could never fire.
if (m_is_check_mode) { if (m_is_check_mode) {
PrintParams verify_params; PrintParams verify_params;
verify_params.dev_ip = m_dev_ip; verify_params.dev_ip = m_dev_ip;

View File

@@ -112,12 +112,12 @@ wxString PrePrintChecker::get_pre_state_msg(PrintDialogStatus status)
// (SelectMachine formats it via get_pre_state_msg before add()); default templates keep the wording. // (SelectMachine formats it via get_pre_state_msg before add()); default templates keep the wording.
case PrintStatusColorQuantityExceed: return _L("The current firmware supports a maximum of %s materials. You can either reduce the number of materials to %s or fewer on the Preparation Page, or try updating the firmware. If you are still restricted after the update, please wait for subsequent firmware support."); case PrintStatusColorQuantityExceed: return _L("The current firmware supports a maximum of %s materials. You can either reduce the number of materials to %s or fewer on the Preparation Page, or try updating the firmware. If you are still restricted after the update, please wait for subsequent firmware support.");
case PrintStatusWarningExtFilamentNotMatch: return _L("The type of external filament is unknown or does not match with the filament type in the slicing file. Please make sure you have installed the correct filament in the external spool."); case PrintStatusWarningExtFilamentNotMatch: return _L("The type of external filament is unknown or does not match with the filament type in the slicing file. Please make sure you have installed the correct filament in the external spool.");
// Orca: reuses REF's exact AutoCali/CaliOn text (same string for both). CaliOn is a non-blocking // Same text as the blocking "auto" case (PrintStatusTPUUnsupportAutoCali); CaliOn is a
// advisory (Send stays enabled); the "auto" case is the blocking one (PrintStatusTPUUnsupportAutoCali). // non-blocking advisory (Send stays enabled).
case PrintStatusTPUUnsupportCaliOn: return _L("TPU 90A/TPU 85A are too soft. It is recommended to perform manual flow calibration on the 'Calibration' page. If 'Dynamic Flow Calibration' is set to auto/on, the system will use the previous calibration value and skip the flow calibration process."); case PrintStatusTPUUnsupportCaliOn: return _L("TPU 90A/TPU 85A are too soft. It is recommended to perform manual flow calibration on the 'Calibration' page. If 'Dynamic Flow Calibration' is set to auto/on, the system will use the previous calibration value and skip the flow calibration process.");
case PrintStatusFilamentWarningRemainNotEnough: return _L("The filament in the AMS may be insufficient for this print. Please refill or replace it."); case PrintStatusFilamentWarningRemainNotEnough: return _L("The filament in the AMS may be insufficient for this print. Please refill or replace it.");
// SmartNozzleBlobNeedAuto text is passed via add_with_link (clickable "Switch"), not here. // SmartNozzleBlobNeedAuto text is passed via add_with_link (clickable "Switch"), not here.
// PrintTimeEstimateWarning is dead in REF (no call site); enum kept for parity, no message string. // PrintTimeEstimateWarning has no call site and no message string.
} }
return wxEmptyString; return wxEmptyString;
} }

View File

@@ -119,10 +119,9 @@ enum PrintDialogStatus : unsigned int {
PrintStatusWarningExtFilamentNotMatch, PrintStatusWarningExtFilamentNotMatch,
PrintStatusFilamentWarningNozzleHRC, PrintStatusFilamentWarningNozzleHRC,
PrintStatusFilamentCrossExtruderWarning, PrintStatusFilamentCrossExtruderWarning,
// Orca: resynced pre-send-check statuses (all non-blocking advisories). Wired: TPUUnsupportCaliOn, // Non-blocking advisories. FilamentWarningRemainNotEnough is declared but not wired (missing
// TPUUnsuggestCali, SmartNozzleBlobNeedAuto. FilamentWarningRemainNotEnough is declared for // device-model surface); PrintTimeEstimateWarning has no call site or message and is kept only
// forward-compat (feature deferred — missing device-model surface). PrintTimeEstimateWarning is // to match the reference enum table.
// kept for table parity only (dead in REF; no call site, no message).
PrintStatusTPUUnsupportCaliOn, PrintStatusTPUUnsupportCaliOn,
PrintStatusTPUUnsuggestCali, PrintStatusTPUUnsuggestCali,
PrintStatusSmartNozzleBlobNeedAuto, PrintStatusSmartNozzleBlobNeedAuto,

View File

@@ -223,9 +223,9 @@ PrintOptionsDialog::PrintOptionsDialog(wxWindow* parent)
int mode_map[] = {2, 1, 0}; int mode_map[] = {2, 1, 0};
if (sel < 0 || sel > 2) { evt.Skip(); return; } if (sel < 0 || sel > 2) { evt.Skip(); return; }
// Orca: Auto->On in-print confirmation (backing helper landed in cluster 2). If currently in // If currently in Auto (current_detect_value == 2), a print is running, and a loaded
// Auto (current_detect_value == 2), a print is running, and a loaded filament is stringing-prone, // filament is stringing-prone, confirm before enabling — turning blob detection on
// confirm before enabling — turning blob detection on mid-print with such filament can degrade quality. // mid-print with such filament can degrade quality.
const auto* blob_opt = obj->GetPrintOptions()->GetDetectionOption(PrintOptionEnum::Smart_Nozzle_Blob_Detection); const auto* blob_opt = obj->GetPrintOptions()->GetDetectionOption(PrintOptionEnum::Smart_Nozzle_Blob_Detection);
const bool was_auto = blob_opt && blob_opt->current_detect_value == 2; const bool was_auto = blob_opt && blob_opt->current_detect_value == 2;
if (sel == 1 /*On*/ && was_auto && obj->is_in_printing() if (sel == 1 /*On*/ && was_auto && obj->is_in_printing()
@@ -527,8 +527,7 @@ void PrintOptionsDialog::update_options(MachineObject* obj_)
} }
// Orca: firmware print-option toggles, each shown only when its fun2 capability bit is // Orca: firmware print-option toggles, each shown only when its fun2 capability bit is
// reported (Task 6 detection map). A printer reporting none of these bits renders // reported. A printer reporting none of these bits renders the dialog as before.
// the dialog exactly as before.
auto* print_opts = obj_->GetPrintOptions(); auto* print_opts = obj_->GetPrintOptions();
auto show_row = [](bool support, std::initializer_list<wxWindow*> widgets, wxSizerItem* bottom_space) { auto show_row = [](bool support, std::initializer_list<wxWindow*> widgets, wxSizerItem* bottom_space) {
for (auto* w : widgets) { if (w) w->Show(support); } for (auto* w : widgets) { if (w) w->Show(support); }

View File

@@ -31,9 +31,9 @@
#include "DeviceCore/DevMapping.h" #include "DeviceCore/DevMapping.h"
#include "DeviceCore/DevUtilBackend.h" #include "DeviceCore/DevUtilBackend.h"
#include "DeviceCore/DevMappingNozzle.h" #include "DeviceCore/DevMappingNozzle.h"
#include "DeviceCore/DevPrintOptions.h" // Orca: smart-nozzle-blob detection option (resync) #include "DeviceCore/DevPrintOptions.h" // smart-nozzle-blob detection option
#include "libslic3r/MultiNozzleUtils.hpp" // Orca: filament-change-gap model for the best-position popup (resync) #include "libslic3r/MultiNozzleUtils.hpp" // filament-change-gap model for the best-position popup
#include "BackgroundSlicingProcess.hpp" // Orca: complete type for background_process().get_current_gcode_result() (resync) #include "BackgroundSlicingProcess.hpp" // complete type for background_process().get_current_gcode_result()
#include "DeviceCore/DevStorage.h" #include "DeviceCore/DevStorage.h"
#include <wx/progdlg.h> #include <wx/progdlg.h>
@@ -329,7 +329,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_text_printer_msg_tips->Hide(); m_text_printer_msg_tips->Hide();
m_text_printer_msg_tips->GetAlignment(); m_text_printer_msg_tips->GetAlignment();
// Orca: best-position "recommended arrangement saves X" clickable tip (resync). Hidden unless the // Orca: best-position "recommended arrangement saves X" clickable tip. Hidden unless the
// printer has a filament switcher and a better arrangement exists; click opens the best-position popup. // printer has a filament switcher and a better arrangement exists; click opens the best-position popup.
m_saveTimeText = new Label(m_basic_panel, wxEmptyString); m_saveTimeText = new Label(m_basic_panel, wxEmptyString);
m_saveTimeText->SetForegroundColour(wxColour("#FF6F00")); m_saveTimeText->SetForegroundColour(wxColour("#FF6F00"));
@@ -349,7 +349,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
sizer_basic_right_info->Add(m_text_printer_msg, 0, wxLEFT, 0); sizer_basic_right_info->Add(m_text_printer_msg, 0, wxLEFT, 0);
sizer_basic_right_info->AddSpacer(FromDIP(10)); sizer_basic_right_info->AddSpacer(FromDIP(10));
sizer_basic_right_info->Add(m_text_printer_msg_tips, 0, wxLEFT, 0); sizer_basic_right_info->Add(m_text_printer_msg_tips, 0, wxLEFT, 0);
sizer_basic_right_info->Add(m_saveTimeText, 0, wxTOP, 0); // Orca: best-position tip (resync) sizer_basic_right_info->Add(m_saveTimeText, 0, wxTOP, 0);
m_basicl_sizer->Add(m_sizer_thumbnail_area, 0, wxLEFT, 0); m_basicl_sizer->Add(m_sizer_thumbnail_area, 0, wxLEFT, 0);
@@ -1926,7 +1926,7 @@ bool SelectMachineDialog::CheckWarningFilamentCrossExtruder(MachineObject* obj_)
return true; return true;
} }
// ===== Orca: resynced pre-send checks + AMS best-position popup (cluster 7) ===== // ===== Orca: pre-send checks + AMS best-position popup =====
bool SelectMachineDialog::CheckWarningSmartNozzleBlobAuto(MachineObject* obj_) bool SelectMachineDialog::CheckWarningSmartNozzleBlobAuto(MachineObject* obj_)
{ {
@@ -2277,7 +2277,7 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
} else if (status == PrintStatusColorQuantityExceed) { } else if (status == PrintStatusColorQuantityExceed) {
Enable_Refresh_Button(true); Enable_Refresh_Button(true);
Enable_Send_Button(false); Enable_Send_Button(false);
// Orca: fill the real per-printer max color count into the %s template (resync). // Fill the real per-printer max color count into the %s template.
if (!params.empty()) if (!params.empty())
msg = wxString::Format(m_pre_print_checker.get_pre_state_msg(status), params[0], params[0]); msg = wxString::Format(m_pre_print_checker.get_pre_state_msg(status), params[0], params[0]);
} }
@@ -2393,13 +2393,13 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
} else if (status == PrintStatusTPUUnsupportAutoCali) { } else if (status == PrintStatusTPUUnsupportAutoCali) {
Enable_Refresh_Button(true); Enable_Refresh_Button(true);
Enable_Send_Button(false); Enable_Send_Button(false);
} else if (status == PrintStatusTPUUnsupportCaliOn) { // Orca: TPU manual-cali-on ADVISORY (resync) — Send stays enabled } else if (status == PrintStatusTPUUnsupportCaliOn) { // advisory — Send stays enabled
Enable_Refresh_Button(true); Enable_Refresh_Button(true);
Enable_Send_Button(true); Enable_Send_Button(true);
} else if (status == PrintStatusTPUUnsuggestCali) { // Orca: TPU flow-cali advisory (resync) — non-blocking } else if (status == PrintStatusTPUUnsuggestCali) { // advisory — Send stays enabled
Enable_Refresh_Button(true); Enable_Refresh_Button(true);
Enable_Send_Button(true); Enable_Send_Button(true);
} else if (status == PrintStatusSmartNozzleBlobNeedAuto) { // Orca: blob switch-to-Auto advisory (resync) — non-blocking } else if (status == PrintStatusSmartNozzleBlobNeedAuto) { // advisory — Send stays enabled
Enable_Refresh_Button(true); Enable_Refresh_Button(true);
Enable_Send_Button(true); Enable_Send_Button(true);
} else if (status == PrintStatusHasFilamentInBlackListError) { } else if (status == PrintStatusHasFilamentInBlackListError) {
@@ -2948,8 +2948,8 @@ void SelectMachineDialog::EnableEditing(bool enable)
iter.second->enable(enable); iter.second->enable(enable);
} }
// Orca: grey the best-position "saves X" tip when editing is disabled so an error transition // Grey the best-position "saves X" tip when editing is disabled so an error transition
// doesn't leave a stale clickable tip (resync). // doesn't leave a stale clickable tip.
if (m_saveTimeText) enable ? m_saveTimeText->Enable() : m_saveTimeText->Disable(); if (m_saveTimeText) enable ? m_saveTimeText->Enable() : m_saveTimeText->Disable();
} }
@@ -3627,9 +3627,9 @@ void SelectMachineDialog::on_send_print()
timelapse_option = m_checkbox_list["timelapse"]->getValue() == "on"; timelapse_option = m_checkbox_list["timelapse"]->getValue() == "on";
} }
// Orca: PA-profile-sharing mode (extrude_cali_manual_mode): 0 = share (toggle on), 1 = per-nozzle. // PA-profile-sharing mode (extrude_cali_manual_mode): 0 = share (toggle on), 1 = per-nozzle.
// Only sent for pa_mode-capable printers; -1 keeps the field omitted for everyone else, matching // Shared PA (0) is the deliberate default for pa_mode printers even while the toggle is hidden;
// Orca's prior behavior (this field was never populated before). // -1 keeps the field omitted for every other printer, which was the prior behavior.
int pa_manual_mode = -1; int pa_manual_mode = -1;
if (obj_->is_support_pa_mode) { if (obj_->is_support_pa_mode) {
pa_manual_mode = (m_checkbox_list["pa_value"]->getValue() == "on") ? 0 : 1; pa_manual_mode = (m_checkbox_list["pa_value"]->getValue() == "on") ? 0 : 1;
@@ -4091,8 +4091,8 @@ void SelectMachineDialog::on_timer(wxTimerEvent &event)
update_print_status_msg(); update_print_status_msg();
//update_scroll_area_size();/*STUDIO-12867 the page maybe blank in some platform. FIXME*/ //update_scroll_area_size();/*STUDIO-12867 the page maybe blank in some platform. FIXME*/
// Orca: refresh the best-position "saves X" tip after the status update (resync). Placed here (not // Refresh the best-position "saves X" tip after the status update. Placed here (not inside
// inside update_show_status) so it still runs when update_show_status returns early on an error. // update_show_status) so it still runs when update_show_status returns early on an error.
// No-op for printers without a filament switcher. // No-op for printers without a filament switcher.
refresh_save_time(obj_); refresh_save_time(obj_);
} }
@@ -4680,7 +4680,7 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
} }
/* multi color external change assist*/ /* multi color external change assist*/
// Orca: REF-additive, now ported — A/P-series expose this via flag3 bit-16 (is_support_ext_change_assist_old) // A/P-series expose this via flag3 bit-16 (is_support_ext_change_assist_old)
bool is_support_mutile_color = obj_->is_support_ext_change_assist_old || obj_->is_support_ext_change_assist; bool is_support_mutile_color = obj_->is_support_ext_change_assist_old || obj_->is_support_ext_change_assist;
if (is_support_mutile_color && !m_check_ext_change_assist->IsShown()) { if (is_support_mutile_color && !m_check_ext_change_assist->IsShown()) {
m_check_ext_change_assist->Show(true); m_check_ext_change_assist->Show(true);
@@ -4741,10 +4741,9 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
show_status(PrintDialogStatus::PrintStatusNoSdcard); show_status(PrintDialogStatus::PrintStatusNoSdcard);
return; return;
} }
// Orca: gate against the printer's real max filament-color count instead of a hardcoded 16, so // Gate against the printer's real max filament-color count, floored at 16 so printers that
// high-color firmware (is_support_filament_32_colors -> 32) isn't wrongly blocked. Floor at 16 so // report 0 (e.g. series X/O) keep that limit. The max is passed as a param so the %s message
// printers that report 0 (e.g. series X/O) keep their prior limit; every other class is unchanged. // shows the actual count.
// The real max is passed as a param so the %s message shows the actual count.
int max_color = obj_->get_max_filament_color_count(); int max_color = obj_->get_max_filament_color_count();
if (max_color < 16) max_color = 16; if (max_color < 16) max_color = 16;
if (wxGetApp().preset_bundle->filament_presets.size() > (size_t)max_color && m_print_type != PrintFromType::FROM_SDCARD_VIEW) { if (wxGetApp().preset_bundle->filament_presets.size() > (size_t)max_color && m_print_type != PrintFromType::FROM_SDCARD_VIEW) {
@@ -4770,10 +4769,9 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
} }
} }
// Orca: TPU/Aero flow-cali gate on printers that don't support PA auto-cali (REF parity). Only the // TPU/Aero flow-cali gate on printers that don't support PA auto-cali: "auto" blocks; "on" is a
// "auto" case BLOCKS (AutoCali). The "on" case is a non-blocking ADVISORY (CaliOn): the printer uses // non-blocking advisory (the printer falls back to the previous cali value and skips flow
// the previous cali value and skips, so Send stays enabled and we do NOT return (matches REF, which // calibration), so Send stays enabled and there is no return.
// puts CaliOn in the warning band and only returns on is_error).
if (!can_support_pa_auto_cali() && m_checkbox_list["flow_cali"]->IsShown()) { if (!can_support_pa_auto_cali() && m_checkbox_list["flow_cali"]->IsShown()) {
if (m_checkbox_list["flow_cali"]->getValue() == "auto") { if (m_checkbox_list["flow_cali"]->getValue() == "auto") {
show_status(PrintDialogStatus::PrintStatusTPUUnsupportAutoCali); show_status(PrintDialogStatus::PrintStatusTPUUnsupportAutoCali);
@@ -4856,9 +4854,12 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
// H2-series firmware gate: block Send when TPU is mapped to the left (deputy) extruder on firmware // H2-series firmware gate: block Send when TPU is mapped to the left (deputy) extruder on firmware
// that can't print it. Inert unless the printer JSON opts in via support_print_check_firmware_for_tpu_left. // that can't print it. Inert unless the printer JSON opts in via support_print_check_firmware_for_tpu_left.
// Fail-closed on purpose: a mapping entry missing from the tray list blocks as
// AmsMappingInvalid, and value_or(false) blocks TPU-left until the first fun2 push arrives;
// both self-clear on the next status refresh.
if (DevPrinterConfigUtil::support_print_check_firmware_for_tpu_left(obj_->printer_type)) { if (DevPrinterConfigUtil::support_print_check_firmware_for_tpu_left(obj_->printer_type)) {
// Orca: read the raw string members fila.ams_id/fila.slot_id (no int round-trip, which would throw on an // Read the raw string members fila.ams_id/fila.slot_id — an int round-trip would throw on
// unmapped filament); upstream's jump-to-upgrade button styling on the message is dropped for the plain message. // an unmapped filament. Orca: the jump-to-upgrade button styling is not ported.
bool has_tpu_left = false; bool has_tpu_left = false;
for (const auto& fila : m_ams_mapping_result) { for (const auto& fila : m_ams_mapping_result) {
const auto& ams_id = fila.ams_id; const auto& ams_id = fila.ams_id;
@@ -4994,11 +4995,9 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
show_status(PrintDialogStatus::PrintStatusFilamentCrossExtruderWarning, { warning_msg }); show_status(PrintDialogStatus::PrintStatusFilamentCrossExtruderWarning, { warning_msg });
} }
// Orca: smart-nozzle-blob pre-send suggestion (resync). When the file has stringing-prone filament // Suggest switching nozzle clumping detection to Auto when the file has stringing-prone
// and the printer's clumping detection isn't already Auto, offer a clickable "Switch" that sets the // filament. The message is passed as a literal (no get_pre_state_msg entry) so the tail add()
// detection to Auto (mode 2). Rendered via the Orca callback-link path (add_with_link) with the // doesn't also push a second, linkless copy.
// message passed as a literal (no get_pre_state_msg entry) so the tail add() doesn't also push a
// second, linkless copy — mirrors the TimelapseStorageLow convention.
if (!CheckWarningSmartNozzleBlobAuto(obj_)) { if (!CheckWarningSmartNozzleBlobAuto(obj_)) {
show_status(PrintDialogStatus::PrintStatusSmartNozzleBlobNeedAuto); show_status(PrintDialogStatus::PrintStatusSmartNozzleBlobNeedAuto);
m_pre_print_checker.add_with_link( m_pre_print_checker.add_with_link(
@@ -5013,9 +5012,9 @@ void SelectMachineDialog::update_show_status(MachineObject* obj_)
}); });
} }
// Orca: TPU flow-cali advisory (resync, non-blocking). When Flow Dynamics Calibration is Auto/On and // Non-blocking: when Flow Dynamics Calibration is Auto/On and a mapped filament is in the
// a mapped filament is in the printer's auto_on_cali_warning_tpu_filaments list, warn that the system // printer's auto_on_cali_warning_tpu_filaments list, warn that the system will use the
// will use the manual/default value and skip flow calibration. Send stays enabled. // manual/default value and skip flow calibration. Send stays enabled.
if (obj_ && m_checkbox_list.count("flow_cali") && m_checkbox_list["flow_cali"]->IsShown() if (obj_ && m_checkbox_list.count("flow_cali") && m_checkbox_list["flow_cali"]->IsShown()
&& m_checkbox_list["flow_cali"]->getValue() != "off") { && m_checkbox_list["flow_cali"]->getValue() != "off") {
const auto& warning_tpu_filaments = const auto& warning_tpu_filaments =
@@ -6158,7 +6157,7 @@ void SelectMachineDialog::set_default_from_sdcard()
::sprintf(weight, "%.2f g", float_weight); // ORCA remove spacing before text ::sprintf(weight, "%.2f g", float_weight); // ORCA remove spacing before text
m_stext_time->SetLabel(time); m_stext_time->SetLabel(time);
m_stext_weight->SetLabel(weight); m_stext_weight->SetLabel(weight);
refresh_save_time(obj_); // Orca: mirrors REF; no-op for FROM_SDCARD_VIEW (refresh_save_time early-returns) refresh_save_time(obj_); // no-op for FROM_SDCARD_VIEW (refresh_save_time early-returns)
} }
catch (...) {} catch (...) {}
} }

View File

@@ -45,7 +45,7 @@
#include "Widgets/ScrolledWindow.hpp" #include "Widgets/ScrolledWindow.hpp"
#include "Widgets/PopupWindow.hpp" #include "Widgets/PopupWindow.hpp"
#include "Widgets/HyperLink.hpp" // ORCA #include "Widgets/HyperLink.hpp" // ORCA
#include "DeviceTab/uiAMSBestPositionPopup.hpp" // Orca: AMS best-position popup (resync) #include "DeviceTab/uiAMSBestPositionPopup.hpp" // AMS best-position popup
#include "DeviceCore/DevFilaSwitch.h" // Orca: DevFilaSwitch::SwitchPos for best-position helpers #include "DeviceCore/DevFilaSwitch.h" // Orca: DevFilaSwitch::SwitchPos for best-position helpers
#include <optional> #include <optional>
#include <wx/simplebook.h> #include <wx/simplebook.h>
@@ -399,7 +399,7 @@ protected:
wxStaticText* m_rename_text{nullptr}; wxStaticText* m_rename_text{nullptr};
Label* m_stext_time{ nullptr }; Label* m_stext_time{ nullptr };
Label* m_stext_weight{ nullptr }; Label* m_stext_weight{ nullptr };
Label* m_saveTimeText{ nullptr }; // Orca: best-position "saves X" clickable tip (resync) Label* m_saveTimeText{ nullptr }; // best-position "saves X" clickable tip
PrinterMsgPanel * m_statictext_ams_msg{nullptr}; PrinterMsgPanel * m_statictext_ams_msg{nullptr};
Label* m_txt_change_filament_times{ nullptr }; Label* m_txt_change_filament_times{ nullptr };
CheckBox* m_check_ext_change_assist{ nullptr }; CheckBox* m_check_ext_change_assist{ nullptr };
@@ -446,7 +446,7 @@ protected:
wxGridSizer* m_sizer_ams_mapping_right{ nullptr }; wxGridSizer* m_sizer_ams_mapping_right{ nullptr };
PrePrintChecker m_pre_print_checker; PrePrintChecker m_pre_print_checker;
ReselectMachineDialog* m_best_pos_dialog{ nullptr }; // Orca: AMS best-position popup (resync) ReselectMachineDialog* m_best_pos_dialog{ nullptr }; // AMS best-position popup
public: public:
static std::vector<wxString> MACHINE_BED_TYPE_STRING; static std::vector<wxString> MACHINE_BED_TYPE_STRING;
@@ -553,10 +553,10 @@ public:
// Warn (without blocking) when a mapped filament would be printed from both extruders on a // Warn (without blocking) when a mapped filament would be printed from both extruders on a
// dual-extruder printer, so per-nozzle manual K-value can't follow it across the whole print. // dual-extruder printer, so per-nozzle manual K-value can't follow it across the whole print.
bool CheckWarningFilamentCrossExtruder(MachineObject* obj_); bool CheckWarningFilamentCrossExtruder(MachineObject* obj_);
// Orca: smart-nozzle-blob pre-send suggestion (resync). Recommends switching nozzle clumping // Recommends switching nozzle clumping detection to Auto when the file has stringing-prone
// detection to Auto when the file has stringing-prone filament and the printer isn't in Auto. // filament and the printer isn't in Auto.
bool CheckWarningSmartNozzleBlobAuto(MachineObject* obj_); bool CheckWarningSmartNozzleBlobAuto(MachineObject* obj_);
// Orca: AMS best-switch-position popup (resync). Suggests the filament arrangement that minimizes // AMS best-switch-position popup: suggests the filament arrangement that minimizes
// filament-change time on filament-switcher printers; no-op for printers without a switcher. // filament-change time on filament-switcher printers; no-op for printers without a switcher.
void on_reselect_dialog_btn_clicked(wxMouseEvent&); void on_reselect_dialog_btn_clicked(wxMouseEvent&);
void update_best_pos_dialog(wxCommandEvent& evt); void update_best_pos_dialog(wxCommandEvent& evt);

View File

@@ -1896,7 +1896,7 @@ void SendToPrinterDialog::CreateMediaAbilityJob()
} }
}); });
}); });
// Orca: guard against a null transfer tunnel before dereferencing (resync). // Guard against a null transfer tunnel before dereferencing.
if (m_filetransfer_tunnel) { if (m_filetransfer_tunnel) {
m_filetransfer_mediability_job->start_on(*m_filetransfer_tunnel); m_filetransfer_mediability_job->start_on(*m_filetransfer_tunnel);
} else { } else {
@@ -1941,7 +1941,7 @@ void SendToPrinterDialog::CreateUploadFileJob(const std::string &path, const std
} }
}); });
}); });
// Orca: guard against a null transfer tunnel before dereferencing (resync). // Guard against a null transfer tunnel before dereferencing.
if (m_filetransfer_tunnel) { if (m_filetransfer_tunnel) {
m_filetransfer_uploadfile_job->start_on(*m_filetransfer_tunnel); m_filetransfer_uploadfile_job->start_on(*m_filetransfer_tunnel);
} else { } else {

View File

@@ -5432,7 +5432,7 @@ void StatusPanel::update_filament_loading_panel(MachineObject* obj)
bool ams_loading_state = false; bool ams_loading_state = false;
auto ams_status_sub = obj->ams_status_sub; auto ams_status_sub = obj->ams_status_sub;
// Orca: skip busy-loading detection during a cold pull (backing enum/parse landed in cluster 2) // Skip busy-loading detection during a cold pull.
if (obj->is_enable_np && obj->ams_status_main != AMS_STATUS_MAIN_COLD_PULL) { if (obj->is_enable_np && obj->ams_status_main != AMS_STATUS_MAIN_COLD_PULL) {
ams_loading_state = obj->GetExtderSystem()->IsBusyLoading(); ams_loading_state = obj->GetExtderSystem()->IsBusyLoading();
} else if (obj->ams_status_main == AMS_STATUS_MAIN_FILAMENT_CHANGE) { } else if (obj->ams_status_main == AMS_STATUS_MAIN_FILAMENT_CHANGE) {

View File

@@ -372,9 +372,8 @@ void SyncAmsInfoDialog::update_map_when_change_map_mode()
m_cur_colors_in_thumbnail = m_back_cur_colors_in_thumbnail; m_cur_colors_in_thumbnail = m_back_cur_colors_in_thumbnail;
} else if (m_map_mode == MapModeEnum::Override) { } else if (m_map_mode == MapModeEnum::Override) {
if (m_ams_combo_info.empty()) { if (m_ams_combo_info.empty()) {
// Orca: the reference passes has_selector() here to skip ext-spool colors in Override mode; // Orca: the reference's has_selector overload (skips ext-spool colors in Override mode) is
// that overload lives in libslic3r/PresetBundle (out of this cluster's scope), so we keep the // not ported, so with an FTS installed, ext-spool colors still appear in the Override combo.
// 1-arg form. Minor: with an FTS installed, ext-spool colors still appear in the Override combo.
wxGetApp().preset_bundle->get_ams_cobox_infos(m_ams_combo_info); wxGetApp().preset_bundle->get_ams_cobox_infos(m_ams_combo_info);
} }
for (size_t i = 0; i < m_ams_combo_info.ams_filament_colors.size(); i++) { for (size_t i = 0; i < m_ams_combo_info.ams_filament_colors.size(); i++) {
@@ -1225,8 +1224,8 @@ void SyncAmsInfoDialog::sync_ams_mapping_result(std::vector<FilamentInfo> &resul
} }
} }
// Orca: ported FTS "selector" check — a Filament Track Switch, once installed and ready, feeds both // A Filament Track Switch, once installed and ready, feeds both nozzles from one AMS set,
// nozzles from one AMS set, so the mapping collapses to a single dynamic panel and skips ext spools. // so the mapping collapses to a single dynamic panel and skips ext spools.
bool SyncAmsInfoDialog::has_selector(MachineObject *obj_) const bool SyncAmsInfoDialog::has_selector(MachineObject *obj_) const
{ {
if (!obj_) { if (!obj_) {
@@ -2661,7 +2660,7 @@ void SyncAmsInfoDialog::reset_and_sync_ams_list()
MachineObject *obj_ = dev_manager->get_selected_machine(); MachineObject *obj_ = dev_manager->get_selected_machine();
bool is_selector = false; bool is_selector = false;
if (get_is_double_extruder()) { if (get_is_double_extruder()) {
if (has_selector(obj_)) { // Orca: ported FTS combined view — one dynamic panel when a switch is installed+ready if (has_selector(obj_)) { // FTS combined view — one dynamic panel when a switch is installed+ready
m_mapping_popup.set_show_type(ShowType::LEFT_AND_RIGHT_DYNAMIC); m_mapping_popup.set_show_type(ShowType::LEFT_AND_RIGHT_DYNAMIC);
is_selector = true; is_selector = true;
} else { } else {

View File

@@ -1236,7 +1236,6 @@ void MachineInfoPanel::update_filatrack(MachineObject* obj)
} }
} }
// Orca: accessory firmware version display (backing parse landed in cluster 2)
void MachineInfoPanel::update_rotary(MachineObject* obj) void MachineInfoPanel::update_rotary(MachineObject* obj)
{ {
if (obj && obj->rotary_version_info.isValid()) if (obj && obj->rotary_version_info.isValid())
@@ -1250,7 +1249,6 @@ void MachineInfoPanel::update_rotary(MachineObject* obj)
} }
} }
// Orca: accessory firmware version display (backing parse landed in cluster 2)
void MachineInfoPanel::update_exhaustfan(MachineObject* obj) void MachineInfoPanel::update_exhaustfan(MachineObject* obj)
{ {
if (obj && obj->exhaustfan_version_info.isValid()) if (obj && obj->exhaustfan_version_info.isValid())
@@ -1264,8 +1262,7 @@ void MachineInfoPanel::update_exhaustfan(MachineObject* obj)
} }
} }
// Orca: AMS-hub / filament-buffer firmware version display (backing parse landed in cluster 2). // Shown only when the m_ahb_panel path (module_vers["ahb"]) does NOT fire, so no printer gets a
// Shown only when the kept m_ahb_panel path (module_vers["ahb"]) does NOT fire, so no printer gets a
// double AMS-hub row. X2D/P2S report the buffer via amshub_version_info.product_name instead of module_vers. // double AMS-hub row. X2D/P2S report the buffer via amshub_version_info.product_name instead of module_vers.
void MachineInfoPanel::update_amshub(MachineObject* obj) void MachineInfoPanel::update_amshub(MachineObject* obj)
{ {

View File

@@ -187,10 +187,9 @@ int BBLNetworkPlugin::initialize(bool using_backup, const std::string& version)
int BBLNetworkPlugin::unload() int BBLNetworkPlugin::unload()
{ {
// Orca: destroy the plugin agent while its creating DLL is still loaded, so the void* handle // Orca: destroy the plugin agent while its creating DLL is still loaded, so the void* handle
// never dangles into freed memory. Skipping this makes a network-plugin hot reload (unload + // never dangles into freed memory. A stale m_agent surviving the unload makes create_agent()
// reload) crash: the stale m_agent survives the unload, create_agent() then short-circuits on // short-circuit on has_agent() after a hot reload, and the next call into the freshly loaded
// has_agent() and keeps the dangling old-DLL handle, and the next call into the freshly loaded // DLL dereferences the old-DLL handle -> access violation.
// DLL (e.g. install_device_cert from the device-refresh timer) dereferences it -> access violation.
destroy_agent(); destroy_agent();
UnloadFTModule(); UnloadFTModule();