mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
ENH: change extruder icon colour when loading filament
Change-Id: Ifd1e9c868702352790de9ddf25f256d504875785
This commit is contained in:
parent
633d14e711
commit
d97db7e617
6 changed files with 56 additions and 0 deletions
|
@ -358,6 +358,7 @@ MachineObject::MachineObject(NetworkAgent* agent, std::string name, std::string
|
|||
mc_print_sub_stage = 0;
|
||||
mc_left_time = 0;
|
||||
home_flag = -1;
|
||||
hw_switch_state = 0;
|
||||
printing_speed_lvl = PrintingSpeedLevel::SPEED_LEVEL_INVALID;
|
||||
}
|
||||
|
||||
|
@ -1046,6 +1047,18 @@ bool MachineObject::is_axis_at_home(std::string axis)
|
|||
}
|
||||
}
|
||||
|
||||
bool MachineObject::is_filament_at_extruder()
|
||||
{
|
||||
if (hw_switch_state == 1)
|
||||
return true;
|
||||
else if (hw_switch_state == 0)
|
||||
return false;
|
||||
else {
|
||||
//default
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
wxString MachineObject::get_curr_stage()
|
||||
{
|
||||
if (stage_list_info.empty()) {
|
||||
|
@ -1820,6 +1833,9 @@ int MachineObject::parse_json(std::string payload)
|
|||
if (jj.contains("home_flag")) {
|
||||
home_flag = jj["home_flag"].get<int>();
|
||||
}
|
||||
if (jj.contains("hw_switch_state")) {
|
||||
hw_switch_state = jj["hw_switch_state"].get<int>();
|
||||
}
|
||||
|
||||
if (jj.contains("mc_remaining_time")) {
|
||||
if (jj["mc_remaining_time"].is_string())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue