mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 10:21:00 +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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user