ENH: support E3D nozzle flow type

Jira: [STUDIO-13934]
Change-Id: I3818c3881e8a926209f2bac321550f3c7a1a9f0d
(cherry picked from commit 5bb1c2e66ad5bddfcba6898d9bc330217e912e48)
This commit is contained in:
hemai
2025-08-08 15:29:45 +08:00
committed by Noisyfox
parent ce19cf92cb
commit d8f695076a
3 changed files with 22 additions and 3 deletions

View File

@@ -62,6 +62,7 @@ static void s_parse_nozzle_type(const std::string& nozzle_type_str, DevNozzle& n
void DevNozzleSystemParser::ParseV1_0(const nlohmann::json& nozzletype_json,
const nlohmann::json& diameter_json,
const int& nozzle_flow_type,
DevNozzleSystem* system)
{
//Since both the old and new protocols push data.
@@ -98,6 +99,17 @@ void DevNozzleSystemParser::ParseV1_0(const nlohmann::json& nozzletype_json,
}
}
{
if (nozzle_flow_type != -1) {
// 0: BBL S_FLOW; 1:E3D H_FLOW (only P)
if (nozzle_flow_type == 1) {
nozzle.m_nozzle_flow = NozzleFlowType::H_FLOW;
} else {
nozzle.m_nozzle_flow = NozzleFlowType::S_FLOW;
}
}
}
system->m_nozzles[nozzle.m_nozzle_id] = nozzle;
}