Fix latent popup defects and mark the unwired device modules

This commit is contained in:
SoftFever
2026-07-17 13:20:41 +08:00
parent 38ab986c5f
commit 1b722de6e7
5 changed files with 11 additions and 5 deletions

View File

@@ -272,7 +272,7 @@ void AMSSetting::create()
m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(10));
m_sizer_main->Add(m_static_ams_settings, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(24));
m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(10));
m_sizer_main->Add(m_panel_body, 1, wxBottom | wxLEFT | wxRIGHT | wxEXPAND, FromDIP(24));
m_sizer_main->Add(m_panel_body, 1, wxBOTTOM | wxLEFT | wxRIGHT | wxEXPAND, FromDIP(24)); // Orca: wxBOTTOM (REF uses the wxEdge enum by mistake)
this->SetSizer(m_sizer_main);
this->Layout();

View File

@@ -957,7 +957,7 @@ AmsMapingPopup::AmsMapingPopup(wxWindow *parent, bool use_in_sync_dialog) :
m_sizer_ams_v->Add(m_reset_btn, 0, wxALIGN_RIGHT);
m_sizer_ams_v->Add(m_sizer_ams, 0, wxEXPAND | wxBOTTOM, FromDIP(30));
m_sizer_ams_v->AddStretchSpacer();
m_sizer_ams_v->Add(m_ams_tips_msg_panel, 0, wxEXPAND | wxBottom, FromDIP(10));
m_sizer_ams_v->Add(m_ams_tips_msg_panel, 0, wxEXPAND | wxBOTTOM, FromDIP(10)); // Orca: wxBOTTOM (REF uses the wxEdge enum by mistake)
m_sizer_main_h->Add(m_sizer_ams_v, 0, wxEXPAND | wxRIGHT, FromDIP(10));
m_sizer_main_h->Add(m_rack_nozzle_select, 0, wxEXPAND | wxTOP | wxLEFT, FromDIP(15));

View File

@@ -67,9 +67,9 @@ void AmsMapingPopup::update(MachineObject* obj,
bool use_dynamic_switch,
std::optional<PrintFromType> print_type)
{
BOOST_LOG_TRIVIAL(info) << "ams_mapping total count " << obj->GetFilaSystem()->GetAmsCount();
if (!obj) { return; } // Orca: guard before use (REF logs before its null check)
if (!obj) { return; }
BOOST_LOG_TRIVIAL(info) << "ams_mapping total count " << obj->GetFilaSystem()->GetAmsCount();
for (auto& ams_container : m_amsmapping_container_list) {
ams_container->Destroy();

View File

@@ -1,6 +1,6 @@
#pragma once
#include <optional>
#include <unordered_map> // Orca: for m_firmwares (kept unordered for not-yet-resynced AMSSetting.cpp)
#include <unordered_map> // Orca: for m_firmwares / GetSuppotedFirmwares() — the unordered_map AMSSetting.cpp mirrors and iterates
#include <nlohmann/json.hpp>
#include "DevCtrl.h"

View File

@@ -163,6 +163,12 @@ public:
void set_agent(NetworkAgent* agent) { m_agent = agent; }
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
// constructed in the ctor and axis/chamber/status are fed every MQTT push (ParseAxis/ParseChamber/
// ParseStatus), but NO GUI consumer reads them yet. For calib/upgrade the module parse is NOT
// routed — the legacy inline parse in DeviceManager.cpp remains authoritative. Migration is parked
// (follow-up issue); do NOT wire DevUpgrade naively: its ParseUpgradeDisplayState would duplicate
// 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<DevChamber> GetChamber() const { return m_chamber; }