Creality K1-family CFS support (K1 SE) — follow-up to #13752 (#14089)

This commit is contained in:
Grant Harkness authored and GitHub committed 2026-09-21 11:37:50 +08:00
1 parent b8f4aa782e
commit a5d3aaefd3
14 files changed
+107 -51

No files matched your search

+5 -13
View File
@@ -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