OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::DevNozzleRack Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/DeviceCore/DevNozzleRack.h>

Inheritance diagram for Slic3r::DevNozzleRack:
Collaboration diagram for Slic3r::DevNozzleRack:

Public Types

enum  RackStatus : int {
  RACK_STATUS_UNKNOWN = -1 , RACK_STATUS_IDLE = 0 , RACK_STATUS_HOTEND_CENTRE = 1 , RACK_STATUS_TOOLHEAD_CENTRE = 2 ,
  RACK_STATUS_CALIBRATE_HOTEND_RACK = 3 , RACK_STATUS_CUT_MATERIAL = 4 , RACK_STATUS_UNLOCK_HOTEND = 5 , RACK_STATUS_LIFT_HOTEND_RACK = 6 ,
  RACK_STATUS_PLACE_HOTEND = 7 , RACK_STATUS_PICK_HOTEND = 8 , RACK_STATUS_LOCK_HOTEND = 9 , RACK_STATUS_END
}
enum  RackPos : int {
  RACK_POS_UNKNOWN = 0 , RACK_POS_A_TOP = 1 , RACK_POS_B_TOP = 2 , RACK_POS_CENTRE = 3 ,
  RACK_POS_END
}
enum  RackCaliStatus { Rack_CALI_UNKNOWN = -1 , Rack_CALI_NOT = 0 , Rack_CALI_OK = 1 }

Public Member Functions

 DevNozzleRack (DevNozzleSystem *nozzle_system)
 ~DevNozzleRack ()=default
bool IsSupported () const
void SetSupported (bool supported)
DevNozzleSystem * GetNozzleSystem () const
RackPos GetPosition () const
RackStatus GetStatus () const
RackCaliStatus GetCaliStatus () const
DevNozzle GetNozzle (int idx) const
const std::map< int, DevNozzle > & GetRackNozzles () const
bool HasUnreliableNozzles () const
bool HasUnknownNozzles () const
int GetKnownNozzleCount () const
int GetReadingIdx () const
int GetReadingCount () const
void SendReadingFinished ()
void AddNozzleFirmwareInfo (int nozzle_id, const DevFirmwareVersionInfo &info)
void ClearNozzleFirmwareInfo ()
DevFirmwareVersionInfo GetNozzleFirmwareInfo (int nozzle_id) const
void Reset ()
void AddRackNozzle (DevNozzle &nozzle)
void ClearRackNozzles ()
void ParseRackInfo (const nlohmann::json &rack_info)
void CtrlRackPosMove (RackPos new_pos) const
void CtrlRackPosGoHome () const
void CtrlRackConfirmNozzle (int rack_nozzle_id) const
void CtrlRackConfirmAll () const
void CrtlRackReadNozzle (int rack_nozzle_id) const
void CtrlRackReadAll (bool gui_check=false) const
bool CtrlCanReadAll () const
int CtrlRackUpgradeExtruderNozzle () const
int CtrlRackUpgradeRackNozzle (int rack_nozzle_id) const
int CtrlRackUpgradeAll () const
bool CtrlCanUpdateAll () const

Private Member Functions

void ParseRackInfoV1_0 (const nlohmann::json &rack_info)
int CtrlRackUpgrade (const std::string &module_str) const
bool CheckRackMoveWarningDlg () const

Private Attributes

DevNozzleSystem * m_nozzle_system = nullptr
bool m_is_supported = false
RackPos m_position = RACK_POS_UNKNOWN
RackStatus m_status = RACK_STATUS_UNKNOWN
RackCaliStatus m_cali_status = Rack_CALI_UNKNOWN
std::map< int, DevNozzle > m_rack_nozzles
std::map< int, DevFirmwareVersionInfo > m_rack_nozzles_firmware

Detailed Description

Member Enumeration Documentation

◆ RackCaliStatus

Enumerator
Rack_CALI_UNKNOWN 
Rack_CALI_NOT 
Rack_CALI_OK 
52 {
54 Rack_CALI_NOT = 0,
55 Rack_CALI_OK = 1,
56 };
@ Rack_CALI_NOT
Definition DevNozzleRack.h:54
@ Rack_CALI_OK
Definition DevNozzleRack.h:55
@ Rack_CALI_UNKNOWN
Definition DevNozzleRack.h:53

◆ RackPos

Enumerator
RACK_POS_UNKNOWN 
RACK_POS_A_TOP 
RACK_POS_B_TOP 
RACK_POS_CENTRE 
RACK_POS_END 
43 {
49 };
@ RACK_POS_UNKNOWN
Definition DevNozzleRack.h:44
@ RACK_POS_A_TOP
Definition DevNozzleRack.h:45
@ RACK_POS_B_TOP
Definition DevNozzleRack.h:46
@ RACK_POS_END
Definition DevNozzleRack.h:48
@ RACK_POS_CENTRE
Definition DevNozzleRack.h:47

◆ RackStatus

Enumerator
RACK_STATUS_UNKNOWN 
RACK_STATUS_IDLE 
RACK_STATUS_HOTEND_CENTRE 
RACK_STATUS_TOOLHEAD_CENTRE 
RACK_STATUS_CALIBRATE_HOTEND_RACK 
RACK_STATUS_CUT_MATERIAL 
RACK_STATUS_UNLOCK_HOTEND 
RACK_STATUS_LIFT_HOTEND_RACK 
RACK_STATUS_PLACE_HOTEND 
RACK_STATUS_PICK_HOTEND 
RACK_STATUS_LOCK_HOTEND 
RACK_STATUS_END 
27 {
40 };
@ RACK_STATUS_CALIBRATE_HOTEND_RACK
Definition DevNozzleRack.h:32
@ RACK_STATUS_LIFT_HOTEND_RACK
Definition DevNozzleRack.h:35
@ RACK_STATUS_CUT_MATERIAL
Definition DevNozzleRack.h:33
@ RACK_STATUS_UNKNOWN
Definition DevNozzleRack.h:28
@ RACK_STATUS_END
Definition DevNozzleRack.h:39
@ RACK_STATUS_LOCK_HOTEND
Definition DevNozzleRack.h:38
@ RACK_STATUS_IDLE
Definition DevNozzleRack.h:29
@ RACK_STATUS_UNLOCK_HOTEND
Definition DevNozzleRack.h:34
@ RACK_STATUS_PLACE_HOTEND
Definition DevNozzleRack.h:36
@ RACK_STATUS_PICK_HOTEND
Definition DevNozzleRack.h:37
@ RACK_STATUS_TOOLHEAD_CENTRE
Definition DevNozzleRack.h:31
@ RACK_STATUS_HOTEND_CENTRE
Definition DevNozzleRack.h:30

Constructor & Destructor Documentation

◆ DevNozzleRack()

Slic3r::DevNozzleRack::DevNozzleRack ( DevNozzleSystem * nozzle_system)
15 : wxEvtHandler(), m_nozzle_system(nozzle_system)
16{
17
18}
DevNozzleSystem * m_nozzle_system
Definition DevNozzleRack.h:125

References m_nozzle_system.

◆ ~DevNozzleRack()

Slic3r::DevNozzleRack::~DevNozzleRack ( )
default

Member Function Documentation

◆ AddNozzleFirmwareInfo()

void Slic3r::DevNozzleRack::AddNozzleFirmwareInfo ( int nozzle_id,
const DevFirmwareVersionInfo & info )
inline
88{ m_rack_nozzles_firmware[nozzle_id] = info; }
std::map< int, DevFirmwareVersionInfo > m_rack_nozzles_firmware
Definition DevNozzleRack.h:133

References m_rack_nozzles_firmware.

◆ AddRackNozzle()

void Slic3r::DevNozzleRack::AddRackNozzle ( DevNozzle & nozzle)
inline
94{ nozzle.SetOnRack(true); m_rack_nozzles[nozzle.m_nozzle_id] = nozzle; };
std::map< int, DevNozzle > m_rack_nozzles
Definition DevNozzleRack.h:132

References Slic3r::DevNozzle::m_nozzle_id, m_rack_nozzles, and Slic3r::DevNozzle::SetOnRack().

Here is the call graph for this function:

◆ CheckRackMoveWarningDlg()

bool Slic3r::DevNozzleRack::CheckRackMoveWarningDlg ( ) const
private
65{
66 if (wxThread::IsMain())
67 {
68 static bool s_show_move_warning = true;
69 if (s_show_move_warning)
70 {
71 Slic3r::GUI::MessageDialog dlg(nullptr, _L("The toolhead and hotend rack may move. Please keep your hands away from the chamber."),
72 _L("Warning"), wxICON_WARNING | wxOK);
73 dlg.show_dsa_button();
74 if (dlg.ShowModal() != wxID_OK)
75 {
76 s_show_move_warning = !dlg.get_checkbox_state();
77 return false;
78 }
79
80 s_show_move_warning = !dlg.get_checkbox_state();
81 }
82 }
83
84 return true;
85}
#define _L(s)
Definition OBJ.cpp:34

References _L, Slic3r::GUI::MsgDialog::get_checkbox_state(), Slic3r::GUI::MsgDialog::show_dsa_button(), and Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by CtrlRackPosGoHome(), CtrlRackPosMove(), and CtrlRackReadAll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearNozzleFirmwareInfo()

void Slic3r::DevNozzleRack::ClearNozzleFirmwareInfo ( )
inline

◆ ClearRackNozzles()

void Slic3r::DevNozzleRack::ClearRackNozzles ( )
inline
95{ m_rack_nozzles.clear(); }

References m_rack_nozzles.

◆ CrtlRackReadNozzle()

void Slic3r::DevNozzleRack::CrtlRackReadNozzle ( int rack_nozzle_id) const
106{
107 json j;
108 j["print"]["command"] = "holder_nozzle_refresh";
109 j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
110 j["print"]["id"] = (rack_nozzle_id + 16); // from 0x16
111 m_nozzle_system->GetOwner()->publish_json(j);
112}
static int m_sequence_id
Definition DeviceManager.hpp:197
nlohmann::json json
Definition AssembleList.cpp:42

References m_nozzle_system, and Slic3r::MachineObject::m_sequence_id.

◆ CtrlCanReadAll()

bool Slic3r::DevNozzleRack::CtrlCanReadAll ( ) const
116{
117 //is in print
118 if (m_nozzle_system->GetOwner()->is_in_printing())
119 {
120 return false;
121 }
122
123 if (m_nozzle_system->GetOwner()->is_in_upgrading()) {
124 return false;
125 }
126
127 //if have nozzle
128 bool has_nozzle_on_rack = false;
129 for (const auto &nozzle_pair : m_rack_nozzles)
130 {
131 if (!nozzle_pair.second.IsEmpty())
132 {
133 has_nozzle_on_rack = true;
134 break;
135 }
136 }
137
138 bool has_nozzle_on_ext = false;
139 if (m_nozzle_system->ContainsExtNozzle(MAIN_EXTRUDER_ID)) {
140 has_nozzle_on_ext = true;
141 }
142
143 if (!has_nozzle_on_rack && !has_nozzle_on_ext) {
144 return false;
145 }
146
147 //if is in loading
148 if (m_nozzle_system->GetOwner()->ams_status_main == AMS_STATUS_MAIN_FILAMENT_CHANGE)
149 {
150 return false;
151 }
152
153 auto ext = m_nozzle_system->GetOwner()->GetExtderSystem();
154 if (ext && ext->IsBusyLoading()) return false;
155
156 if (GetReadingCount() > 0)
157 {
158 return false;
159 }
160
161 return m_status == RACK_STATUS_IDLE;
162}
#define MAIN_EXTRUDER_ID
Definition DevDefs.h:101
RackStatus m_status
Definition DevNozzleRack.h:129
int GetReadingCount() const
Definition DevNozzleRack.h:84
@ AMS_STATUS_MAIN_FILAMENT_CHANGE
Definition DevDefs.h:47

References Slic3r::AMS_STATUS_MAIN_FILAMENT_CHANGE, GetReadingCount(), m_nozzle_system, m_rack_nozzles, m_status, MAIN_EXTRUDER_ID, and RACK_STATUS_IDLE.

Here is the call graph for this function:

◆ CtrlCanUpdateAll()

bool Slic3r::DevNozzleRack::CtrlCanUpdateAll ( ) const
205{
206 if (m_nozzle_system->GetOwner()->is_in_printing())
207 {
208 return false;
209 }
210
211 auto ext_nozzle = m_nozzle_system->GetExtNozzle(MAIN_EXTRUDER_ID);
212 if (ext_nozzle.IsAbnormal())
213 {
214 return true;
215 }
216
217 auto ext_nozzle_firmware = m_nozzle_system->GetExtruderNozzleFirmware();
218 if (!ext_nozzle_firmware.sw_new_ver.empty() &&
219 ext_nozzle_firmware.sw_new_ver != ext_nozzle_firmware.sw_ver)
220 {
221 return true;
222 }
223
224 for (auto val : m_rack_nozzles_firmware)
225 {
226 const auto& firmware_info = val.second;
227 if (!firmware_info.sw_new_ver.empty() && firmware_info.sw_new_ver != firmware_info.sw_ver)
228 {
229 return true;
230 }
231 else if (GetNozzle(val.first).IsAbnormal())
232 {
233 return true;
234 }
235 }
236
237 return false;
238}
DevNozzle GetNozzle(int idx) const
Definition DevNozzleRack.cpp:35
bool IsAbnormal() const
Definition DevNozzleSystem.cpp:131

References GetNozzle(), Slic3r::DevNozzle::IsAbnormal(), m_nozzle_system, m_rack_nozzles_firmware, and MAIN_EXTRUDER_ID.

Here is the call graph for this function:

◆ CtrlRackConfirmAll()

void Slic3r::DevNozzleRack::CtrlRackConfirmAll ( ) const
97{
98 json j;
99 j["print"]["command"] = "nozzle_info_confirm";
100 j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
101 j["print"]["id"] = 0xff;
102 m_nozzle_system->GetOwner()->publish_json(j);
103}

References m_nozzle_system, and Slic3r::MachineObject::m_sequence_id.

Referenced by CtrlRackReadAll().

Here is the caller graph for this function:

◆ CtrlRackConfirmNozzle()

void Slic3r::DevNozzleRack::CtrlRackConfirmNozzle ( int rack_nozzle_id) const
88{
89 json j;
90 j["print"]["command"] = "nozzle_info_confirm";
91 j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
92 j["print"]["id"] = (rack_nozzle_id + 16); // from 0x16
93 m_nozzle_system->GetOwner()->publish_json(j);
94}

References m_nozzle_system, and Slic3r::MachineObject::m_sequence_id.

◆ CtrlRackPosGoHome()

void Slic3r::DevNozzleRack::CtrlRackPosGoHome ( ) const
51{
53 {
54 return;
55 }
56
57 json j;
58 j["print"]["command"] = "nozzle_holder_ctrl";
59 j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
60 j["print"]["action"] = 0;
61 m_nozzle_system->GetOwner()->publish_json(j);
62}
bool CheckRackMoveWarningDlg() const
Definition DevNozzleRackCtrl.cpp:64

References CheckRackMoveWarningDlg(), m_nozzle_system, and Slic3r::MachineObject::m_sequence_id.

Here is the call graph for this function:

◆ CtrlRackPosMove()

void Slic3r::DevNozzleRack::CtrlRackPosMove ( RackPos new_pos) const
23{
25 {
26 return;
27 }
28
29 int action_id = -1;
30 if (new_pos == RACK_POS_A_TOP)
31 {
32 action_id = 1;
33 }
34 else if(new_pos == RACK_POS_B_TOP)
35 {
36 action_id = 2;
37 }
38
39 if (action_id != -1)
40 {
41 json j;
42 j["print"]["command"] = "nozzle_holder_ctrl";
43 j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
44 j["print"]["action"] = action_id;
45 m_nozzle_system->GetOwner()->publish_json(j);
46 }
47}

References CheckRackMoveWarningDlg(), m_nozzle_system, Slic3r::MachineObject::m_sequence_id, RACK_POS_A_TOP, and RACK_POS_B_TOP.

Here is the call graph for this function:

◆ CtrlRackReadAll()

void Slic3r::DevNozzleRack::CtrlRackReadAll ( bool gui_check = false) const
165{
166 if (gui_check && wxThread::IsMain())
167 {
168#if 0
169 if (!HasUnknownNozzles()) {
170 Slic3r::GUI::MessageDialog dlg(nullptr, _L("Hotend information may be inaccurate. "
171 "Would you like to re-read the hotend? (Hotend information may change during power-off)."),
172 _L("Warning"), wxICON_WARNING | wxOK | wxYES);
173 dlg.SetButtonLabel(wxID_OK, _L("I confirm all"));
174 dlg.SetButtonLabel(wxID_YES, _L("Re-read all"));
175
176 int rtn = dlg.ShowModal();
177 if (rtn == wxID_OK) {
179 } else if (rtn == wxID_YES) {
181 CtrlRackReadAll(false);
182 }
183 }
184
185 return;
186 }
187#endif
188
190 CtrlRackReadAll(false);
191 }
192
193 return;
194 }
195
196 json j;
197 j["print"]["command"] = "holder_nozzle_refresh";
198 j["print"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
199 j["print"]["id"] = 0xff;
200 m_nozzle_system->GetOwner()->publish_json(j);
201}
bool HasUnknownNozzles() const
Definition DevNozzleRack.cpp:66
void CtrlRackConfirmAll() const
Definition DevNozzleRackCtrl.cpp:96
void CtrlRackReadAll(bool gui_check=false) const
Definition DevNozzleRackCtrl.cpp:164

References _L, CheckRackMoveWarningDlg(), CtrlRackConfirmAll(), CtrlRackReadAll(), HasUnknownNozzles(), m_nozzle_system, Slic3r::MachineObject::m_sequence_id, Slic3r::GUI::MsgDialog::SetButtonLabel(), and Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by CtrlRackReadAll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CtrlRackUpgrade()

int Slic3r::DevNozzleRack::CtrlRackUpgrade ( const std::string & module_str) const
private
256{
257 if (wxThread::IsMain())
258 {
259 if (GetReadingCount() > 0)
260 {
261 Slic3r::GUI::MessageDialog dlg(nullptr, _L("Reading the hotends, please wait."), _L("Warning"), wxICON_WARNING | wxOK);
262 dlg.ShowModal();
263 return -1;
264 }
265
266 static bool s_show_upgrade_warning = true;
267 if (s_show_upgrade_warning)
268 {
269 Slic3r::GUI::MessageDialog dlg(nullptr, _L("During the hotend upgrade, the toolhead will move. Don't reach into the chamber."),
270 _L("Warning"), wxICON_WARNING | wxOK | wxCANCEL);
271 dlg.show_dsa_button();
272 dlg.SetButtonLabel(wxID_OK, _L("Update"));
273 int rtn = dlg.ShowModal();
274 s_show_upgrade_warning = !dlg.get_checkbox_state();
275 if (rtn != wxID_OK)
276 {
277 return -1;
278 }
279 }
280 }
281
282 json j;
283 j["upgrade"]["command"] = "wtm_upgrade";
284 j["upgrade"]["module"] = module_str;
285 j["upgrade"]["src_id"] = 1;
286 j["upgrade"]["sequence_id"] = std::to_string(MachineObject::m_sequence_id++);
287 return m_nozzle_system->GetOwner()->publish_json(j);
288}

References _L, Slic3r::GUI::MsgDialog::get_checkbox_state(), GetReadingCount(), m_nozzle_system, Slic3r::MachineObject::m_sequence_id, Slic3r::GUI::MsgDialog::SetButtonLabel(), Slic3r::GUI::MsgDialog::show_dsa_button(), and Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by CtrlRackUpgradeAll(), CtrlRackUpgradeExtruderNozzle(), and CtrlRackUpgradeRackNozzle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CtrlRackUpgradeAll()

int Slic3r::DevNozzleRack::CtrlRackUpgradeAll ( ) const
251{
252 return CtrlRackUpgrade("wtm_all");
253}
int CtrlRackUpgrade(const std::string &module_str) const
Definition DevNozzleRackCtrl.cpp:255

References CtrlRackUpgrade().

Here is the call graph for this function:

◆ CtrlRackUpgradeExtruderNozzle()

int Slic3r::DevNozzleRack::CtrlRackUpgradeExtruderNozzle ( ) const
241{
242 return CtrlRackUpgrade("wtm");
243}

References CtrlRackUpgrade().

Here is the call graph for this function:

◆ CtrlRackUpgradeRackNozzle()

int Slic3r::DevNozzleRack::CtrlRackUpgradeRackNozzle ( int rack_nozzle_id) const
246{
247 return CtrlRackUpgrade("wtm/" + std::to_string(0x10 + rack_nozzle_id));
248}

References CtrlRackUpgrade().

Here is the call graph for this function:

◆ GetCaliStatus()

RackCaliStatus Slic3r::DevNozzleRack::GetCaliStatus ( ) const
inline
72{ return m_cali_status;}
RackCaliStatus m_cali_status
Definition DevNozzleRack.h:130

References m_cali_status.

◆ GetKnownNozzleCount()

int Slic3r::DevNozzleRack::GetKnownNozzleCount ( ) const
79{
80 int count = 0;
81 for (const auto& nozzle : m_rack_nozzles)
82 {
83 if (!nozzle.second.IsEmpty() && !nozzle.second.IsUnknown())
84 {
85 count++;
86 }
87 }
88
89 return count;
90}
static unsigned int count
Definition AuxiliaryDataViewModel.cpp:246

References count, and m_rack_nozzles.

◆ GetNozzle()

DevNozzle Slic3r::DevNozzleRack::GetNozzle ( int idx) const
36{
37 auto iter = m_rack_nozzles.find(idx);
38 if (iter == m_rack_nozzles.end()) {
39 DevNozzle nozzle;
40 nozzle.SetOnRack(true);
41 return nozzle;
42 }
43
44 return iter->second;
45}

References m_rack_nozzles, and Slic3r::DevNozzle::SetOnRack().

Referenced by CtrlCanUpdateAll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNozzleFirmwareInfo()

DevFirmwareVersionInfo Slic3r::DevNozzleRack::GetNozzleFirmwareInfo ( int nozzle_id) const
48{
49 auto iter = m_rack_nozzles_firmware.find(nozzle_id);
50 return iter != m_rack_nozzles_firmware.end() ? iter->second : DevFirmwareVersionInfo();
51}

References m_rack_nozzles_firmware.

◆ GetNozzleSystem()

DevNozzleSystem * Slic3r::DevNozzleRack::GetNozzleSystem ( ) const
inline
68{ return m_nozzle_system; }

References m_nozzle_system.

◆ GetPosition()

RackPos Slic3r::DevNozzleRack::GetPosition ( ) const
inline
70{ return m_position; }
RackPos m_position
Definition DevNozzleRack.h:128

References m_position.

◆ GetRackNozzles()

const std::map< int, DevNozzle > & Slic3r::DevNozzleRack::GetRackNozzles ( ) const
inline
75{ return m_rack_nozzles; }

References m_rack_nozzles.

◆ GetReadingCount()

int Slic3r::DevNozzleRack::GetReadingCount ( ) const
inline
84{ return m_nozzle_system->GetReadingCount(); }

References m_nozzle_system.

Referenced by CtrlCanReadAll(), and CtrlRackUpgrade().

Here is the caller graph for this function:

◆ GetReadingIdx()

int Slic3r::DevNozzleRack::GetReadingIdx ( ) const
inline
83{ return m_nozzle_system->GetReadingIdx(); }

References m_nozzle_system.

◆ GetStatus()

RackStatus Slic3r::DevNozzleRack::GetStatus ( ) const
inline
71{ return m_status; }

References m_status.

◆ HasUnknownNozzles()

bool Slic3r::DevNozzleRack::HasUnknownNozzles ( ) const
67{
68 for (const auto& nozzle : m_rack_nozzles)
69 {
70 if (nozzle.second.IsUnknown())
71 {
72 return true;
73 }
74 }
75 return false;
76}

References m_rack_nozzles.

Referenced by CtrlRackReadAll().

Here is the caller graph for this function:

◆ HasUnreliableNozzles()

bool Slic3r::DevNozzleRack::HasUnreliableNozzles ( ) const
55{
56 for (const auto& nozzle : m_rack_nozzles)
57 {
58 if (!nozzle.second.IsInfoReliable())
59 {
60 return true;
61 }
62 }
63 return false;
64}

References m_rack_nozzles.

◆ IsSupported()

bool Slic3r::DevNozzleRack::IsSupported ( ) const
inline
64{ return m_is_supported; };
bool m_is_supported
Definition DevNozzleRack.h:127

References m_is_supported.

◆ ParseRackInfo()

void Slic3r::DevNozzleRack::ParseRackInfo ( const nlohmann::json & rack_info)
93{
94 ParseRackInfoV1_0(rack_info);
95}
void ParseRackInfoV1_0(const nlohmann::json &rack_info)
Definition DevNozzleRack.cpp:97

References ParseRackInfoV1_0().

Here is the call graph for this function:

◆ ParseRackInfoV1_0()

void Slic3r::DevNozzleRack::ParseRackInfoV1_0 ( const nlohmann::json & rack_info)
private
98{
101 {
102 m_status = RACK_STATUS_UNKNOWN; // Reset to default if out of range
103 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": Invalid rack status: " << m_status << ", reset";
104 }
105
108 {
109 m_position = RACK_POS_UNKNOWN; // Reset to default if out of range
110 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": Invalid rack position: " << m_position << ", reset";
111 }
112
113 DevJsonValParser::ParseVal(rack_info, "info", m_cali_status);
114}
static void ParseVal(const nlohmann::json &j, const std::string &key, T &val)
Definition DevUtil.h:76

References m_cali_status, m_position, m_status, Slic3r::DevJsonValParser::ParseVal(), RACK_POS_END, RACK_POS_UNKNOWN, RACK_STATUS_END, and RACK_STATUS_UNKNOWN.

Referenced by ParseRackInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reset()

void Slic3r::DevNozzleRack::Reset ( )

◆ SendReadingFinished()

void Slic3r::DevNozzleRack::SendReadingFinished ( )
29{
30 wxCommandEvent evt(DEV_RACK_EVENT_READING_FINISHED);
31 evt.SetEventObject(this);
32 wxPostEvent(this, evt);
33}

◆ SetSupported()

void Slic3r::DevNozzleRack::SetSupported ( bool supported)
inline
65{ m_is_supported = supported; }

References m_is_supported.

Member Data Documentation

◆ m_cali_status

RackCaliStatus Slic3r::DevNozzleRack::m_cali_status = Rack_CALI_UNKNOWN
private

Referenced by GetCaliStatus(), and ParseRackInfoV1_0().

◆ m_is_supported

bool Slic3r::DevNozzleRack::m_is_supported = false
private

Referenced by IsSupported(), and SetSupported().

◆ m_nozzle_system

◆ m_position

RackPos Slic3r::DevNozzleRack::m_position = RACK_POS_UNKNOWN
private

◆ m_rack_nozzles

◆ m_rack_nozzles_firmware

std::map<int, DevFirmwareVersionInfo> Slic3r::DevNozzleRack::m_rack_nozzles_firmware
private

◆ m_status

RackStatus Slic3r::DevNozzleRack::m_status = RACK_STATUS_UNKNOWN
private

The documentation for this class was generated from the following files: