Support upload g-code to third-party printers (#2)

* wip

* fix cmake warning

* add UI and config options for Moonraker connection

* wip: copy whole print host UI from PS

* add more needed options

* wip 2

* fix string issue on Mac

* wip3
This commit is contained in:
SoftFever 2022-08-20 15:09:05 +08:00 committed by GitHub
parent 159ff850e4
commit dc5e0eed34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 5543 additions and 19 deletions

View file

@ -724,7 +724,13 @@ static std::vector<std::string> s_Preset_printer_options {
"silent_mode",
// BBS
"scan_first_layer", "machine_load_filament_time", "machine_unload_filament_time", "machine_pause_gcode",
"nozzle_type", "auxiliary_fan", "nozzle_volume"
"nozzle_type", "auxiliary_fan", "nozzle_volume",
//SoftFever
"connection_moonraker_url","connection_port", "host_type", "print_host", "printhost_apikey",
"printhost_cafile","printhost_port","printhost_authorization_type",
"printhost_user",
"printhost_password",
"printhost_ssl_ignore_revoke"
};
static std::vector<std::string> s_Preset_sla_print_options {
@ -2519,6 +2525,16 @@ static std::vector<std::string> s_PhysicalPrinter_opts {
"preset_name", // temporary option to compatibility with older Slicer
"preset_names",
"printer_technology",
"host_type",
"print_host",
"printhost_apikey",
"printhost_cafile",
"printhost_port",
"printhost_authorization_type",
// HTTP digest authentization (RFC 2617)
"printhost_user",
"printhost_password",
"printhost_ssl_ignore_revoke"
};
const std::vector<std::string>& PhysicalPrinter::printer_options()
@ -2682,6 +2698,8 @@ void PhysicalPrinterCollection::load_printers(
// see https://github.com/prusa3d/PrusaSlicer/issues/732
boost::filesystem::path dir = boost::filesystem::absolute(boost::filesystem::path(dir_path) / subdir).make_preferred();
m_dir_path = dir.string();
if(!boost::filesystem::exists(dir))
return;
std::string errors_cummulative;
// Store the loaded printers into a new vector, otherwise the binary search for already existing presets would be broken.
std::deque<PhysicalPrinter> printers_loaded;