mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
PrintHost: Basic SL1 support
This commit is contained in:
parent
59b01b4908
commit
66b5deccf5
8 changed files with 255 additions and 196 deletions
|
@ -24,13 +24,15 @@ PrintHost::~PrintHost() {}
|
|||
|
||||
PrintHost* PrintHost::get_print_host(DynamicPrintConfig *config)
|
||||
{
|
||||
PrintHostType kind = config->option<ConfigOptionEnum<PrintHostType>>("host_type")->value;
|
||||
if (kind == htOctoPrint) {
|
||||
return new OctoPrint(config);
|
||||
} else if (kind == htDuet) {
|
||||
return new Duet(config);
|
||||
const auto opt = config->option<ConfigOptionEnum<PrintHostType>>("host_type");
|
||||
if (opt == nullptr) { return nullptr; }
|
||||
|
||||
switch (opt->value) {
|
||||
case htOctoPrint: return new OctoPrint(config);
|
||||
case htSL1: return new SL1Host(config);
|
||||
case htDuet: return new Duet(config);
|
||||
default: return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue