mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 09:07:39 +00:00
Add elegoo centauri carbon profile (#8405)
* Added Elegoolink connection * Set Elegoo CC default bed to btPTE * Friendly output of some error codes of PrintHost * feat: Add elegoo centauri carbon profile * fix: Fix the issue where the bed type in the printer configuration does not match the bed temperature settings when multiple bed types are not supported. * feat: Modify the elegoo process parameters to disable slowdown_for_curled_perimeters. * feat: Update comment to clarify plate visibility for multi bed support, BBL printer, and selected bed type. * fix: Optimize ElegooLink upload; The code is clearer than before. * feat: Format the ElegooPrintHostSendDialog code. * fix: Remove the unnecessary instantiation attribute in the Elegoo process. * fix: Flatpak compilation failed --------- Co-authored-by: anjis <anjis.zhou@elegoo.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "Obico.hpp"
|
||||
#include "Flashforge.hpp"
|
||||
#include "SimplyPrint.hpp"
|
||||
#include "ElegooLink.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
using boost::optional;
|
||||
@@ -65,6 +66,7 @@ PrintHost* PrintHost::get_print_host(DynamicPrintConfig *config)
|
||||
case htObico: return new Obico(config);
|
||||
case htFlashforge: return new Flashforge(config);
|
||||
case htSimplyPrint: return new SimplyPrint(config);
|
||||
case htElegooLink: return new ElegooLink(config);
|
||||
default: return nullptr;
|
||||
}
|
||||
} else {
|
||||
@@ -78,7 +80,16 @@ wxString PrintHost::format_error(const std::string &body, const std::string &err
|
||||
auto wxbody = wxString::FromUTF8(body.data());
|
||||
return wxString::Format("HTTP %u: %s", status, wxbody);
|
||||
} else {
|
||||
return wxString::FromUTF8(error.data());
|
||||
if (error.find("curl:Timeout was reached") != std::string::npos) {
|
||||
return _L("Connection timed out. Please check if the printer and computer network are functioning properly, and confirm that they are on the same network.");
|
||||
}else if(error.find("curl:Couldn't resolve host name")!= std::string::npos){
|
||||
return _L("The Hostname/IP/URL could not be parsed, please check it and try again.");
|
||||
} else if (error.find("Connection was reset") != std::string::npos){
|
||||
return _L("File/data transfer interrupted. Please check the printer and network, then try it again.");
|
||||
}
|
||||
else {
|
||||
return wxString::FromUTF8(error.data());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user