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:
Seref
2025-10-29 20:32:38 +08:00
committed by GitHub
parent dedfd9d4ed
commit 4b7b81a0a2
33 changed files with 7547 additions and 4836 deletions
+24 -7
View File
@@ -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()) {