mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 20:02:17 +00:00
Support file uploads and the device details page for Elegoo Centauri Carbon 2 (#13212)
* Support file uploads and the device details page for CC2 printers. * Resolved build issues for Linux and macOS. * 1. Added `ElegooPrinterWebViewHandler` to handle WebUI messages for Elegoo printers. Other printers will keep the current behavior. 2. Added a static `get_print_host_webui` method in `PrintHost` to retrieve the printer WebUI URL. * Improved timeout handling for CC2 file upload and SN info APIs. --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
@@ -81,6 +81,7 @@
|
||||
#include "GUI_Utils.hpp"
|
||||
#include "GUI_Factories.hpp"
|
||||
#include "wxExtensions.hpp"
|
||||
#include "../Utils/PrintHost.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
#include "format.hpp"
|
||||
#include "3DScene.hpp"
|
||||
@@ -2483,13 +2484,11 @@ void Sidebar::update_all_preset_comboboxes()
|
||||
p->m_bpButton_ams_filament->Hide();
|
||||
|
||||
auto print_btn_type = MainFrame::PrintSelectType::eExportGcode;
|
||||
wxString url = cfg.opt_string("print_host_webui").empty() ? cfg.opt_string("print_host") : cfg.opt_string("print_host_webui");
|
||||
wxString url = from_u8(PrintHost::get_print_host_webui(&cfg));
|
||||
wxString apikey;
|
||||
if(url.empty())
|
||||
url = wxString::Format("file://%s/web/orca/missing_connection.html", from_u8(resources_dir()));
|
||||
else {
|
||||
if (!url.Lower().starts_with("http"))
|
||||
url = wxString::Format("http://%s", url);
|
||||
const auto host_type = cfg.option<ConfigOptionEnum<PrintHostType>>("host_type")->value;
|
||||
if (cfg.has("printhost_apikey") && (host_type != htSimplyPrint))
|
||||
apikey = cfg.opt_string("printhost_apikey");
|
||||
|
||||
Reference in New Issue
Block a user