From 563342c4502265f70c7c821a841be27ac6e5bc1f Mon Sep 17 00:00:00 2001 From: tao wang Date: Sun, 29 Jan 2023 11:04:23 +0800 Subject: [PATCH] ENH:output new error: no space left on printer sd card Change-Id: If4ced6dcb1d6e2ccb5b1ad950744b9958d298fc7 --- src/slic3r/GUI/Jobs/SendJob.cpp | 7 +++++-- src/slic3r/Utils/bambu_networking.hpp | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Jobs/SendJob.cpp b/src/slic3r/GUI/Jobs/SendJob.cpp index ebd4bce80..507262fea 100644 --- a/src/slic3r/GUI/Jobs/SendJob.cpp +++ b/src/slic3r/GUI/Jobs/SendJob.cpp @@ -18,6 +18,7 @@ static wxString file_over_size_str = _L("The print file exceeds the max static wxString print_canceled_str = _L("Task canceled"); static wxString upload_failed_str = _L("Failed uploading print file"); static wxString upload_login_failed_str = _L("Wrong Access code"); +static wxString upload_no_space_left_str = _L("No space left on Printer SD card"); static wxString sending_over_lan_str = _L("Sending gcode file over LAN"); @@ -313,9 +314,11 @@ void SendJob::process() } if (result < 0) { - if (result == BAMBU_NETWORK_ERR_FTP_LOGIN_DENIED) { + if (result == BAMBU_NETWORK_ERR_NO_SPACE_LEFT_ON_DEVICE) { + msg_text = upload_no_space_left_str; + } else if (result == BAMBU_NETWORK_ERR_FTP_LOGIN_DENIED) { msg_text = upload_login_failed_str; - } if (result == BAMBU_NETWORK_ERR_FILE_NOT_EXIST) { + } else if (result == BAMBU_NETWORK_ERR_FILE_NOT_EXIST) { msg_text = file_is_not_exists_str; } else if (result == BAMBU_NETWORK_ERR_FILE_OVER_SIZE) { msg_text = file_over_size_str; diff --git a/src/slic3r/Utils/bambu_networking.hpp b/src/slic3r/Utils/bambu_networking.hpp index de1f34eaa..178234351 100644 --- a/src/slic3r/Utils/bambu_networking.hpp +++ b/src/slic3r/Utils/bambu_networking.hpp @@ -36,6 +36,7 @@ namespace BBL { #define BAMBU_NETWORK_ERR_GET_MODEL_MALL_HOME_PAGE -27 #define BAMBU_NETWORK_ERR_GET_USER_INFO -28 #define BAMBU_NETWORK_ERR_WRONG_IP_ADDRESS -29 +#define BAMBU_NETWORK_ERR_NO_SPACE_LEFT_ON_DEVICE -30 #define BAMBU_NETWORK_LIBRARY "bambu_networking"