ENH: set 4 status of monitor extruder icon
Change-Id: I2739c7079268409975a9bd6ed1efb6cf47868438
Before Width: | Height: | Size: 1.3 KiB |
|
@ -1,28 +0,0 @@
|
||||||
<svg width="48" height="96" viewBox="0 0 48 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M30.3173 3.97868V52.786H19.0943V3.97868C19.0943 3.97863 19.0943 3.97857 19.0943 3.97852C19.0945 2.8858 21.6068 2 24.7058 2C27.8048 2 30.317 2.8858 30.3173 3.97852C30.3173 3.97857 30.3173 3.97863 30.3173 3.97868Z" fill="url(#paint0_linear_2_41)" fill-opacity="0.2"/>
|
|
||||||
<line x1="30.579" y1="3.66391" x2="30.579" y2="52.7091" stroke="url(#paint1_linear_2_41)" stroke-width="0.523139" stroke-linecap="round"/>
|
|
||||||
<line x1="18.8885" y1="3.66391" x2="18.8885" y2="52.7091" stroke="url(#paint2_linear_2_41)" stroke-width="0.523139" stroke-linecap="round"/>
|
|
||||||
<path d="M21.4326 21.6406L24.3655 24.1546C24.5615 24.3225 24.8505 24.3225 25.0465 24.1546L27.9794 21.6406" stroke="#00AE42" stroke-opacity="0.3" stroke-width="1.04628" stroke-linecap="round"/>
|
|
||||||
<path d="M21.4326 35.2012L24.3655 37.7151C24.5615 37.883 24.8505 37.883 25.0465 37.7151L27.9794 35.2012" stroke="#00AE42" stroke-opacity="0.8" stroke-width="1.04628" stroke-linecap="round"/>
|
|
||||||
<path d="M21.5264 45.0547L24.3601 47.1156C24.5436 47.249 24.7921 47.249 24.9755 47.1156L27.8093 45.0547" stroke="#00AE42" stroke-width="1.04628" stroke-linecap="round"/>
|
|
||||||
<path d="M16.2881 84.6172H32.2809L31.1386 89.1866H17.4304L16.2881 84.6172Z" fill="#ACACAC"/>
|
|
||||||
<rect x="6" y="52.502" width="36.9424" height="33.2014" rx="2.61569" fill="#D3D3D3"/>
|
|
||||||
<circle cx="24.4712" cy="68.6343" r="9.1187" fill="#AEAEAE"/>
|
|
||||||
<circle cx="24.3879" cy="68.6242" r="8.56757" fill="#E3E3E3"/>
|
|
||||||
<circle cx="24.4411" cy="68.6266" r="6.28289" fill="#F8F8F8"/>
|
|
||||||
<rect x="23.3022" y="89.1875" width="2.28469" height="3.9982" fill="#939191"/>
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="paint0_linear_2_41" x1="24.7058" y1="2" x2="24.7058" y2="52.786" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#00AE42" stop-opacity="0"/>
|
|
||||||
<stop offset="1" stop-color="#00AE42"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint1_linear_2_41" x1="30.3174" y1="51.0642" x2="30.3174" y2="3.40234" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#00AE42"/>
|
|
||||||
<stop offset="1" stop-color="#00AE42" stop-opacity="0"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint2_linear_2_41" x1="18.627" y1="51.0642" x2="18.627" y2="3.40234" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#00AE42"/>
|
|
||||||
<stop offset="1" stop-color="#00AE42" stop-opacity="0"/>
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 2.3 KiB |
BIN
resources/images/monitor_extruder_empty_load.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
resources/images/monitor_extruder_empty_unload.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
resources/images/monitor_extruder_filled_load.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
resources/images/monitor_extruder_filled_unload.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.5 KiB |
|
@ -1,28 +0,0 @@
|
||||||
<svg width="28" height="70" viewBox="0 0 28 70" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.4305 1.49971V38.4918H9.92413V1.49971M9.92413 1.49887C9.92542 0.67099 11.8291 0 14.1773 0L9.92413 1.49887ZM14.1773 0C16.5255 0 18.4292 0.67099 18.4305 1.49887L14.1773 0Z" fill="url(#paint0_linear_8143_31825)" fill-opacity="0.2"/>
|
|
||||||
<line x1="18.6913" y1="1.32383" x2="18.6913" y2="38.3703" stroke="url(#paint1_linear_8143_31825)" stroke-width="0.523139" stroke-linecap="round"/>
|
|
||||||
<line x1="9.83127" y1="1.32383" x2="9.83127" y2="38.3703" stroke="url(#paint2_linear_8143_31825)" stroke-width="0.523139" stroke-linecap="round"/>
|
|
||||||
<path d="M11.6962 14.887L13.8367 16.7217C14.0326 16.8897 14.3217 16.8897 14.5176 16.7217L16.6582 14.887" stroke="#00AE42" stroke-opacity="0.3" stroke-width="1.04628" stroke-linecap="round"/>
|
|
||||||
<path d="M11.6962 25.1636L13.8367 26.9983C14.0326 27.1663 14.3217 27.1663 14.5176 26.9983L16.6582 25.1636" stroke="#00AE42" stroke-opacity="0.8" stroke-width="1.04628" stroke-linecap="round"/>
|
|
||||||
<path d="M11.7663 32.6333L13.8396 34.1412C14.0231 34.2746 14.2716 34.2746 14.455 34.1412L16.5283 32.6333" stroke="#00AE42" stroke-width="1.04628" stroke-linecap="round"/>
|
|
||||||
<path d="M7.79767 62.6204H19.9192L19.0534 66.0837H8.66349L7.79767 62.6204Z" fill="#ACACAC"/>
|
|
||||||
<rect y="38.2791" width="28" height="25.1646" rx="2.61569" fill="#D3D3D3"/>
|
|
||||||
<circle cx="14.0008" cy="50.5056" r="6.91139" fill="#AEAEAE"/>
|
|
||||||
<circle cx="13.9372" cy="50.4983" r="6.49367" fill="#E3E3E3"/>
|
|
||||||
<circle cx="13.9779" cy="50.5003" r="4.76203" fill="#00AE42"/>
|
|
||||||
<rect x="13.1147" y="66.0845" width="1.73165" height="3.03038" fill="#939191"/>
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="paint0_linear_8143_31825" x1="14.1773" y1="0" x2="14.1773" y2="38.4918" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#00AE42" stop-opacity="0"/>
|
|
||||||
<stop offset="1" stop-color="#00AE42"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint1_linear_8143_31825" x1="18.4297" y1="37.1869" x2="18.4297" y2="1.06226" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#00AE42"/>
|
|
||||||
<stop offset="1" stop-color="#00AE42" stop-opacity="0"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint2_linear_8143_31825" x1="9.56971" y1="37.1869" x2="9.5697" y2="1.06226" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#00AE42"/>
|
|
||||||
<stop offset="1" stop-color="#00AE42" stop-opacity="0"/>
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 2.3 KiB |
|
@ -1443,6 +1443,7 @@ int MachineObject::command_axis_control(std::string axis, double unit, double va
|
||||||
}
|
}
|
||||||
else if (axis.compare("E") == 0) {
|
else if (axis.compare("E") == 0) {
|
||||||
sprintf(cmd, "M83 \nG0 %s%0.1f F%d\n", axis.c_str(), value * unit, speed);
|
sprintf(cmd, "M83 \nG0 %s%0.1f F%d\n", axis.c_str(), value * unit, speed);
|
||||||
|
extruder_axis_status = (value >= 0.0f)? LOAD : UNLOAD;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1634,6 +1635,7 @@ void MachineObject::reset()
|
||||||
print_status = "";
|
print_status = "";
|
||||||
last_mc_print_stage = -1;
|
last_mc_print_stage = -1;
|
||||||
m_new_ver_list_exist = false;
|
m_new_ver_list_exist = false;
|
||||||
|
extruder_axis_status = LOAD;
|
||||||
|
|
||||||
subtask_ = nullptr;
|
subtask_ = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -310,6 +310,13 @@ public:
|
||||||
UpgradingFinished = 3
|
UpgradingFinished = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ExtruderAxisStatus {
|
||||||
|
LOAD = 0,
|
||||||
|
UNLOAD =1,
|
||||||
|
STATUS_NUMS = 2
|
||||||
|
};
|
||||||
|
enum ExtruderAxisStatus extruder_axis_status = LOAD;
|
||||||
|
|
||||||
class ModuleVersionInfo
|
class ModuleVersionInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -179,8 +179,10 @@ void StatusBasePanel::init_bitmaps()
|
||||||
m_thumbnail_placeholder = ScalableBitmap(this, "monitor_placeholder", 120);
|
m_thumbnail_placeholder = ScalableBitmap(this, "monitor_placeholder", 120);
|
||||||
m_thumbnail_sdcard = ScalableBitmap(this, "monitor_sdcard_thumbnail", 120);
|
m_thumbnail_sdcard = ScalableBitmap(this, "monitor_sdcard_thumbnail", 120);
|
||||||
//m_bitmap_camera = create_scaled_bitmap("monitor_camera", nullptr, 18);
|
//m_bitmap_camera = create_scaled_bitmap("monitor_camera", nullptr, 18);
|
||||||
m_bitmap_extruder = *cache.load_png("monitor_extruder", FromDIP(28), FromDIP(70), false, false);
|
m_bitmap_extruder_empty_load = *cache.load_png("monitor_extruder_empty_load", FromDIP(28), FromDIP(70), false, false);
|
||||||
m_bitmap_extruder_load = *cache.load_png("monitor_extruder_load", FromDIP(28), FromDIP(70), false, false);
|
m_bitmap_extruder_filled_load = *cache.load_png("monitor_extruder_filled_load", FromDIP(28), FromDIP(70), false, false);
|
||||||
|
m_bitmap_extruder_empty_unload = *cache.load_png("monitor_extruder_empty_unload", FromDIP(28), FromDIP(70), false, false);
|
||||||
|
m_bitmap_extruder_filled_unload = *cache.load_png("monitor_extruder_filled_unload", FromDIP(28), FromDIP(70), false, false);
|
||||||
m_bitmap_sdcard_state_on = create_scaled_bitmap("sdcard_state_on", nullptr, 20);
|
m_bitmap_sdcard_state_on = create_scaled_bitmap("sdcard_state_on", nullptr, 20);
|
||||||
m_bitmap_sdcard_state_off = create_scaled_bitmap("sdcard_state_off", nullptr, 20);
|
m_bitmap_sdcard_state_off = create_scaled_bitmap("sdcard_state_off", nullptr, 20);
|
||||||
}
|
}
|
||||||
|
@ -916,7 +918,7 @@ wxBoxSizer *StatusBasePanel::create_extruder_control(wxWindow *parent)
|
||||||
bSizer_e_ctrl->Add(m_bpButton_e_10, 0, wxALIGN_CENTER_HORIZONTAL, 0);
|
bSizer_e_ctrl->Add(m_bpButton_e_10, 0, wxALIGN_CENTER_HORIZONTAL, 0);
|
||||||
bSizer_e_ctrl->Add(0, FromDIP(7), 0, 0, 0);
|
bSizer_e_ctrl->Add(0, FromDIP(7), 0, 0, 0);
|
||||||
|
|
||||||
m_bitmap_extruder_img = new wxStaticBitmap(panel, wxID_ANY, m_bitmap_extruder, wxDefaultPosition, wxDefaultSize, 0);
|
m_bitmap_extruder_img = new wxStaticBitmap(panel, wxID_ANY, m_bitmap_extruder_empty_load, wxDefaultPosition, wxDefaultSize, 0);
|
||||||
m_bitmap_extruder_img->SetMinSize(EXTRUDER_IMAGE_SIZE);
|
m_bitmap_extruder_img->SetMinSize(EXTRUDER_IMAGE_SIZE);
|
||||||
|
|
||||||
bSizer_e_ctrl->Add(m_bitmap_extruder_img, 0, wxALIGN_CENTER_HORIZONTAL | wxTOP | wxBOTTOM, FromDIP(5));
|
bSizer_e_ctrl->Add(m_bitmap_extruder_img, 0, wxALIGN_CENTER_HORIZONTAL | wxTOP | wxBOTTOM, FromDIP(5));
|
||||||
|
@ -1311,13 +1313,6 @@ void StatusPanel::update(MachineObject *obj)
|
||||||
update_temp_ctrl(obj);
|
update_temp_ctrl(obj);
|
||||||
update_misc_ctrl(obj);
|
update_misc_ctrl(obj);
|
||||||
|
|
||||||
if (obj && obj->is_filament_at_extruder()) {
|
|
||||||
m_bitmap_extruder_img->SetBitmap(m_bitmap_extruder_load);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_bitmap_extruder_img->SetBitmap(m_bitmap_extruder);
|
|
||||||
}
|
|
||||||
|
|
||||||
// BBS hide tasklist info
|
// BBS hide tasklist info
|
||||||
// update_tasklist(obj);
|
// update_tasklist(obj);
|
||||||
update_ams(obj);
|
update_ams(obj);
|
||||||
|
@ -1550,6 +1545,9 @@ void StatusPanel::update_misc_ctrl(MachineObject *obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update extruder icon
|
||||||
|
update_extruder_status(obj);
|
||||||
|
|
||||||
// nozzle fan
|
// nozzle fan
|
||||||
if (m_switch_nozzle_fan_timeout > 0)
|
if (m_switch_nozzle_fan_timeout > 0)
|
||||||
m_switch_nozzle_fan_timeout--;
|
m_switch_nozzle_fan_timeout--;
|
||||||
|
@ -1582,6 +1580,23 @@ void StatusPanel::update_misc_ctrl(MachineObject *obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StatusPanel::update_extruder_status(MachineObject* obj)
|
||||||
|
{
|
||||||
|
if (!obj) return;
|
||||||
|
if (obj->is_filament_at_extruder()) {
|
||||||
|
if (obj->extruder_axis_status == MachineObject::ExtruderAxisStatus::LOAD)
|
||||||
|
m_bitmap_extruder_img->SetBitmap(m_bitmap_extruder_filled_load);
|
||||||
|
else
|
||||||
|
m_bitmap_extruder_img->SetBitmap(m_bitmap_extruder_filled_unload);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (obj->extruder_axis_status == MachineObject::ExtruderAxisStatus::LOAD)
|
||||||
|
m_bitmap_extruder_img->SetBitmap(m_bitmap_extruder_empty_load);
|
||||||
|
else
|
||||||
|
m_bitmap_extruder_img->SetBitmap(m_bitmap_extruder_empty_unload);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void StatusPanel::update_ams(MachineObject *obj)
|
void StatusPanel::update_ams(MachineObject *obj)
|
||||||
{
|
{
|
||||||
// update obj in sub dlg
|
// update obj in sub dlg
|
||||||
|
@ -2619,7 +2634,7 @@ void StatusPanel::msw_rescale()
|
||||||
m_bpButton_xy->SetMinSize(AXIS_MIN_SIZE);
|
m_bpButton_xy->SetMinSize(AXIS_MIN_SIZE);
|
||||||
m_bpButton_xy->SetSize(AXIS_MIN_SIZE);
|
m_bpButton_xy->SetSize(AXIS_MIN_SIZE);
|
||||||
m_temp_extruder_line->SetSize(wxSize(FromDIP(1), -1));
|
m_temp_extruder_line->SetSize(wxSize(FromDIP(1), -1));
|
||||||
m_bitmap_extruder_img->SetBitmap(m_bitmap_extruder);
|
update_extruder_status(obj);
|
||||||
m_bitmap_extruder_img->SetMinSize(EXTRUDER_IMAGE_SIZE);
|
m_bitmap_extruder_img->SetMinSize(EXTRUDER_IMAGE_SIZE);
|
||||||
|
|
||||||
for (Button *btn : m_buttons) { btn->Rescale(); }
|
for (Button *btn : m_buttons) { btn->Rescale(); }
|
||||||
|
|
|
@ -80,8 +80,10 @@ protected:
|
||||||
ScalableBitmap m_bitmap_fan_off;
|
ScalableBitmap m_bitmap_fan_off;
|
||||||
ScalableBitmap m_bitmap_use_time;
|
ScalableBitmap m_bitmap_use_time;
|
||||||
ScalableBitmap m_bitmap_use_weight;
|
ScalableBitmap m_bitmap_use_weight;
|
||||||
wxBitmap m_bitmap_extruder;
|
wxBitmap m_bitmap_extruder_empty_load;
|
||||||
wxBitmap m_bitmap_extruder_load;
|
wxBitmap m_bitmap_extruder_filled_load;
|
||||||
|
wxBitmap m_bitmap_extruder_empty_unload;
|
||||||
|
wxBitmap m_bitmap_extruder_filled_unload;
|
||||||
|
|
||||||
CameraRecordingStatus m_state_recording{CameraRecordingStatus::RECORDING_NONE};
|
CameraRecordingStatus m_state_recording{CameraRecordingStatus::RECORDING_NONE};
|
||||||
CameraTimelapseStatus m_state_timelapse{CameraTimelapseStatus::TIMELAPSE_NONE};
|
CameraTimelapseStatus m_state_timelapse{CameraTimelapseStatus::TIMELAPSE_NONE};
|
||||||
|
@ -340,6 +342,7 @@ protected:
|
||||||
void update_temp_ctrl(MachineObject *obj);
|
void update_temp_ctrl(MachineObject *obj);
|
||||||
void update_misc_ctrl(MachineObject *obj);
|
void update_misc_ctrl(MachineObject *obj);
|
||||||
void update_ams(MachineObject* obj);
|
void update_ams(MachineObject* obj);
|
||||||
|
void update_extruder_status(MachineObject* obj);
|
||||||
void update_cali(MachineObject* obj);
|
void update_cali(MachineObject* obj);
|
||||||
|
|
||||||
void reset_printing_values();
|
void reset_printing_values();
|
||||||
|
|