mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-10 01:01:57 +00:00
## Summary
Follow-up to the feature/OrcaSonar review. Scopes the new behavior to the OrcaSonar agent, fixes several AMS-sync and lifecycle bugs, and makes the MQTT tests run in CI. Non-OrcaSonar agents keep their existing behavior. ## Changes Discovery - Gate the background SSDP scan to a configured OrcaSonar machine instead of running for every non-BBL profile; drive discovery on demand from the machine-select popup and back off idle rounds from 5s to 60s. - Add NSLocalNetworkUsageDescription and NSBonjourServices to both macOS Info.plist templates. AMS sync - Resolve id-less printer-set trays by material type in get_ams_cobox_infos and the sidebar badge loop, matching sync_ams_list, so combo arrays and badges stay aligned. - Keep a printer-set tray that resolved by type out of the "unknown or incompatible filaments" dialog. AMS device UI - Gate the "Empty" tray classification, and the editable temperature fields, to the OrcaSonar agent; Bambu keeps "?" and read-only presets. - Validate AMS material temps on confirm: reject out-of-range values and min > max before the command is sent. Storage tab - Bind the show/hide handler on the panel's ancestors (StoragePanel and MonitorPanel) and unbind on destruction, so the Bambu file system stops when the tab is left. Transport - Load /etc/ssl/cert.pem on macOS in add_platform_root_certificates, after set_default_verify_paths. - Release lifecycle_mutex before start()'s connect wait so stop() can cancel the attempt and signal completion instead of stalling the UI thread. Localization - Add OrcaFilesPanel.cpp to list.txt and regenerate the catalogs. ## Tests - Un-hide the loopback MockBroker integration tests (ephemeral port, no network) so ctest registers and runs them. - Mock broker tracks SUBSCRIBE/UNSUBSCRIBE and delivers push_report only to a subscribed topic; the reconnect test asserts the re-SUBSCRIBE. - Add bbl empty-tray cases, an AMS combo-alignment case, and unknowns assertions to the AMS sync tests.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "GUI_App.hpp"
|
||||
#include "GUI.hpp"
|
||||
#include "slic3r/Utils/NetworkAgent.hpp"
|
||||
#include "slic3r/Utils/NetworkAgentFactory.hpp"
|
||||
#include "libslic3r/Preset.hpp"
|
||||
#include "I18N.hpp"
|
||||
#include <algorithm>
|
||||
@@ -473,9 +474,11 @@ void AMSMaterialsSetting::update_filament_editing(bool is_printing)
|
||||
}
|
||||
|
||||
// A third-party tray owns its temp range; BBL RFID trays keep the read-only preset values.
|
||||
// Only the OrcaSonar agent accepts the temp fields, so other agents stay read-only.
|
||||
const bool is_orca_agent = obj && obj->printer_agent_id == ORCA_PRINTER_AGENT_ID;
|
||||
const bool can_edit = !is_printing || obj->is_support_filament_setting_inprinting;
|
||||
m_input_nozzle_min->Enable(m_is_third && can_edit);
|
||||
m_input_nozzle_max->Enable(m_is_third && can_edit);
|
||||
m_input_nozzle_min->Enable(m_is_third && can_edit && is_orca_agent);
|
||||
m_input_nozzle_max->Enable(m_is_third && can_edit && is_orca_agent);
|
||||
|
||||
if (!m_is_third) {
|
||||
m_tip_readonly->SetLabelText(wxEmptyString);
|
||||
@@ -730,6 +733,21 @@ void AMSMaterialsSetting::on_select_ok(wxCommandEvent &event)
|
||||
return;
|
||||
}
|
||||
|
||||
if (nozzle_temp_min_int < FILAMENT_MIN_TEMP || nozzle_temp_min_int > FILAMENT_MAX_TEMP ||
|
||||
nozzle_temp_max_int < FILAMENT_MIN_TEMP || nozzle_temp_max_int > FILAMENT_MAX_TEMP) {
|
||||
MessageDialog msg_dlg(nullptr,
|
||||
wxString::Format(_L("The input value should be greater than %1% and less than %2%"), FILAMENT_MIN_TEMP, FILAMENT_MAX_TEMP),
|
||||
wxEmptyString, wxICON_WARNING | wxOK);
|
||||
msg_dlg.ShowModal();
|
||||
return;
|
||||
}
|
||||
if (nozzle_temp_min_int > nozzle_temp_max_int) {
|
||||
MessageDialog msg_dlg(nullptr, _L("The minimum temperature cannot be greater than the maximum temperature."),
|
||||
wxEmptyString, wxICON_WARNING | wxOK);
|
||||
msg_dlg.ShowModal();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Orca: log the tray payload this dialog hands the printer, so the filament_id resolved from the
|
||||
// dropdown selection can be checked against the tray_info_idx the AMS actually receives. A
|
||||
|
||||
Reference in New Issue
Block a user