mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-26 16:13:58 -06:00
NEW:add printer arch type
Change-Id: I4fedd3df960648d4ad1df32111431ccf126ef120
This commit is contained in:
parent
1453d196d8
commit
11f0fb6016
2 changed files with 36 additions and 1 deletions
|
@ -171,6 +171,18 @@ void split_string(std::string s, std::vector<std::string>& v) {
|
|||
v.push_back(t);
|
||||
}
|
||||
|
||||
PrinterArch get_printer_arch_by_str(std::string arch_str)
|
||||
{
|
||||
if (arch_str == "i3") {
|
||||
return PrinterArch::ARCH_I3;
|
||||
}
|
||||
else if (arch_str == "core_xy") {
|
||||
return PrinterArch::ARCH_CORE_XY;
|
||||
}
|
||||
|
||||
return PrinterArch::ARCH_CORE_XY;
|
||||
}
|
||||
|
||||
void AmsTray::update_color_from_str(std::string color)
|
||||
{
|
||||
if (color.empty()) return;
|
||||
|
@ -453,6 +465,11 @@ PrinterSeries MachineObject::get_printer_series() const
|
|||
return PrinterSeries::SERIES_P1P;
|
||||
}
|
||||
|
||||
PrinterArch MachineObject::get_printer_arch() const
|
||||
{
|
||||
return DeviceManager::get_printer_arch(printer_type);
|
||||
}
|
||||
|
||||
MachineObject::MachineObject(NetworkAgent* agent, std::string name, std::string id, std::string ip)
|
||||
:dev_name(name),
|
||||
dev_id(id),
|
||||
|
@ -2339,6 +2356,13 @@ bool MachineObject::is_printing_finished()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool MachineObject::is_core_xy()
|
||||
{
|
||||
if (get_printer_arch() == PrinterArch::ARCH_CORE_XY)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void MachineObject::reset_update_time()
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(trace) << "reset reset_update_time, dev_id =" << dev_id;
|
||||
|
@ -5092,7 +5116,10 @@ std::string DeviceManager::get_ftp_folder(std::string type_str)
|
|||
{
|
||||
return get_string_from_config(type_str, "ftp_folder");
|
||||
}
|
||||
|
||||
PrinterArch DeviceManager::get_printer_arch(std::string type_str)
|
||||
{
|
||||
return get_printer_arch_by_str(get_string_from_config(type_str, "printer_arch"));
|
||||
}
|
||||
std::string DeviceManager::get_printer_thumbnail_img(std::string type_str)
|
||||
{
|
||||
return get_string_from_config(type_str, "printer_thumbnail_image");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue