Add setting to enable uploads to abnormal Storage; improve sd_card_state error reporting (#10981)
* Add option to allow upload to SD-Cards marked as abnormal, also add better error description + Adds the options under the Network Settings to allow upload to abnormal SD-Card. + If not enabled user will now see why the upload is stuck at 10% depending on the sd_card_state (Readonly/Abnormal) * Merging with current branch, and updateing "sd-card" to "storage" * Generate localization and also change remaining sd_card_abnormal states to _storage_abnormal * Fix issues from merge, and other bugfixes. * Regenerate localization files. * Improve Missing Storage Message, Add skip for abnormal storage in printer select dialog
This commit is contained in:
@@ -560,15 +560,32 @@ void PrintJob::process(Ctl &ctl)
|
||||
ctl.update_status(curr_percent, _u8L("Sending print job through cloud service"));
|
||||
result = m_agent->start_print(params, update_fn, cancel_fn, wait_fn);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this->has_sdcard) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
if (result < 0) {
|
||||
|
||||
Reference in New Issue
Block a user