22 lines
442 B
C++
22 lines
442 B
C++
|
#include "PrintHostFactory.hpp"
|
||
|
#include "OctoPrint.hpp"
|
||
|
#include "Duet.hpp"
|
||
|
|
||
|
#include "libslic3r/PrintConfig.hpp"
|
||
|
|
||
|
namespace Slic3r {
|
||
|
|
||
|
|
||
|
PrintHost * PrintHostFactory::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);
|
||
|
}
|
||
|
return NULL;
|
||
|
}
|
||
|
|
||
|
}
|