mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-01 15:22:21 +00:00
Merge branch 'main' into dev/p2s-pr
# Conflicts: # src/slic3r/GUI/Jobs/PrintJob.cpp # src/slic3r/GUI/SelectMachine.cpp # src/slic3r/GUI/SendToPrinter.cpp # src/slic3r/Utils/CalibUtils.cpp
This commit is contained in:
@@ -579,12 +579,34 @@ void PrintJob::process(Ctl &ctl)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this->has_sdcard || this->could_emmc_print) {
|
||||
if (this->could_emmc_print) {
|
||||
ctl.update_status(curr_percent, _u8L("Sending print job over LAN"));
|
||||
result = m_agent->start_local_print(params, update_fn, cancel_fn);
|
||||
} else {
|
||||
ctl.update_status(curr_percent, _u8L("Storage needs to be inserted before printing via LAN."));
|
||||
return;
|
||||
switch(this->sdcard_state) {
|
||||
case DevStorage::SdcardState::NO_SDCARD:
|
||||
ctl.update_status(curr_percent, _u8L("A Storage needs to be inserted before printing via LAN."));
|
||||
return;
|
||||
case DevStorage::SdcardState::HAS_SDCARD_ABNORMAL:
|
||||
if(this->has_sdcard) {
|
||||
// means the storage is abnormal but can be used option is enabled
|
||||
ctl.update_status(curr_percent, _u8L("Sending print job over LAN, but the Storage in the printer is abnormal and print-issues may be caused by this."));
|
||||
result = m_agent->start_local_print(params, update_fn, cancel_fn);
|
||||
break;
|
||||
}
|
||||
ctl.update_status(curr_percent, _u8L("The Storage in the printer is abnormal. Please replace it with a normal Storage before sending print job to printer."));
|
||||
return;
|
||||
case DevStorage::SdcardState::HAS_SDCARD_READONLY:
|
||||
ctl.update_status(curr_percent, _u8L("The Storage in the printer is read-only. Please replace it with a normal Storage before sending print job to printer."));
|
||||
return;
|
||||
case DevStorage::SdcardState::HAS_SDCARD_NORMAL:
|
||||
ctl.update_status(curr_percent, _u8L("Sending print job over LAN"));
|
||||
result = m_agent->start_local_print(params, update_fn, cancel_fn);
|
||||
break;
|
||||
default:
|
||||
ctl.update_status(curr_percent, _u8L("Encountered an unknown error with the Storage status. Please try again."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include "Job.hpp"
|
||||
#include "slic3r/GUI/DeviceCore/DevStorage.h"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
@@ -84,6 +85,8 @@ public:
|
||||
bool has_sdcard { false };
|
||||
bool could_emmc_print { false };
|
||||
bool task_use_ams { true };
|
||||
|
||||
DevStorage::SdcardState sdcard_state = DevStorage::SdcardState::NO_SDCARD;
|
||||
bool task_ext_change_assist { false };
|
||||
|
||||
int auto_bed_leveling{0};
|
||||
|
||||
@@ -297,13 +297,30 @@ void SendJob::process(Ctl &ctl)
|
||||
ctl.update_status(curr_percent, _u8L("Sending G-code file over LAN"));
|
||||
}
|
||||
} else {
|
||||
if (this->has_sdcard) {
|
||||
ctl.update_status(curr_percent, _u8L("Sending G-code file over LAN"));
|
||||
result = m_agent->start_send_gcode_to_sdcard(params, update_fn, cancel_fn, nullptr);
|
||||
} else {
|
||||
ctl.update_status(curr_percent, _u8L("Storage needs to be inserted before sending to printer."));
|
||||
return;
|
||||
}
|
||||
switch(this->sdcard_state) {
|
||||
case DevStorage::SdcardState::NO_SDCARD:
|
||||
ctl.update_status(curr_percent, _u8L("Storage needs to be inserted before sending to printer."));
|
||||
return;
|
||||
case DevStorage::SdcardState::HAS_SDCARD_ABNORMAL:
|
||||
if(this->has_sdcard) {
|
||||
// means the sdcard is abnormal but can be used option is enabled
|
||||
ctl.update_status(curr_percent, _u8L("Sending G-code file over LAN, but the Storage in the printer is abnormal and print-issues may be caused by this."));
|
||||
result = m_agent->start_send_gcode_to_sdcard(params, update_fn, cancel_fn, nullptr);
|
||||
break;
|
||||
}
|
||||
ctl.update_status(curr_percent, _u8L("The Storage in the printer is abnormal. Please replace it with a normal Storage before sending to printer."));
|
||||
return;
|
||||
case DevStorage::SdcardState::HAS_SDCARD_READONLY:
|
||||
ctl.update_status(curr_percent, _u8L("The Storage in the printer is read-only. Please replace it with a normal Storage before sending to printer."));
|
||||
return;
|
||||
case DevStorage::SdcardState::HAS_SDCARD_NORMAL:
|
||||
ctl.update_status(curr_percent, _u8L("Sending G-code file over LAN"));
|
||||
result = m_agent->start_send_gcode_to_sdcard(params, update_fn, cancel_fn, nullptr);
|
||||
break;
|
||||
default:
|
||||
ctl.update_status(curr_percent, _u8L("Encountered an unknown error with the Storage status. Please try again."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ctl.was_canceled()) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include "slic3r/GUI/DeviceCore/DevStorage.h"
|
||||
#include "Job.hpp"
|
||||
#include "PrintJob.hpp"
|
||||
|
||||
@@ -46,6 +47,8 @@ public:
|
||||
bool has_sdcard { false };
|
||||
bool task_use_ams { true };
|
||||
|
||||
DevStorage::SdcardState sdcard_state = DevStorage::SdcardState::NO_SDCARD;
|
||||
|
||||
wxWindow* m_parent{nullptr};
|
||||
|
||||
int status_range() const
|
||||
|
||||
Reference in New Issue
Block a user