mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-22 14:50:59 +00:00
1 parent
b8f4aa782e
commit
a5d3aaefd3
14 files changed
+107
-51
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "CrealityHostDiscovery.hpp"
|
||||
#include "CrealityPrint.hpp"
|
||||
#include "cxmdns.h"
|
||||
#include "Http.hpp"
|
||||
|
||||
@@ -11,25 +12,16 @@ namespace Slic3r {
|
||||
|
||||
namespace {
|
||||
|
||||
struct ModelEntry { const char* code; const char* name; };
|
||||
constexpr ModelEntry kCfsCapableModels[] = {
|
||||
{"F008", "K2 Plus"},
|
||||
{"F012", "K2 Pro"},
|
||||
{"F021", "K2"},
|
||||
};
|
||||
|
||||
// Model capability/name lookups live in CrealityPrint (one table shared
|
||||
// with the print host) so discovery can't drift out of sync again.
|
||||
bool is_cfs_capable(const std::string& code)
|
||||
{
|
||||
for (const auto& m : kCfsCapableModels)
|
||||
if (code == m.code) return true;
|
||||
return false;
|
||||
return CrealityPrint::model_supports_multi_color(code);
|
||||
}
|
||||
|
||||
std::string model_name_for(const std::string& code)
|
||||
{
|
||||
for (const auto& m : kCfsCapableModels)
|
||||
if (code == m.code) return m.name;
|
||||
return {};
|
||||
return CrealityPrint::model_display_name(code);
|
||||
}
|
||||
|
||||
// Extract the device suffix from a service name like
|
||||
|
||||
Reference in new issue
Block a user