FIX: the load filament steps shown fault

jira: [STUDIO-9684]
Change-Id: Ic238993302156788200482ed34e3092b9ab94dfd
(cherry picked from commit f8b4949353fbb4cead3249d5e8f6beb06859164c)
This commit is contained in:
xin.zhang authored and Noisyfox committed 2025-09-10 07:27:48 +08:00
1 parent 9f831d7536
commit 34e06c2b4f
7 files changed
+43 -30

No files matched your search

+12 -1
View File
@@ -3522,7 +3522,7 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
}
/*the param is invalid in np for Yeshu*/
if (jj.contains("hw_switch_state")) {
if (!check_enable_np(jj) && jj.contains("hw_switch_state")) {
hw_switch_state = jj["hw_switch_state"].get<int>();
m_extder_data.extders[MAIN_NOZZLE_ID].ext_has_filament = hw_switch_state;
}
@@ -5548,6 +5548,17 @@ NozzleFlowType MachineObject::get_nozzle_flow_type(int extruder_id) const
return NozzleFlowType::NONE_FLOWTYPE;
}
const Extder& MachineObject::get_current_extruder() const
{
if (m_extder_data.extders.size() <= m_extder_data.current_extder_id)
{
BOOST_LOG_TRIVIAL(error) << "get_current_extruder() failed";
return Extder();
}
return m_extder_data.extders[m_extder_data.current_extder_id];
}
void MachineObject::converse_to_duct(bool is_suppt_part_fun, bool is_suppt_aux_fun, bool is_suppt_cham_fun)
{
m_air_duct_data.modes.clear();