FIX: the humidity display

jira: [STUDIO-10481]
Change-Id: Ib4bec6db6afbe40199c401c539b13a0e8459bbad
This commit is contained in:
xin.zhang 2025-02-18 10:53:09 +08:00 committed by lane.wei
parent 1865dcd1b9
commit 658a8ab7ef
14 changed files with 142 additions and 76 deletions

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.27344 34.1635C7.27344 26.4127 22.669 1.65849 27.1317 1.65869C31.5945 1.6589 46.321 27.519 46.321 34.1635C46.321 40.8081 40.4667 50.0032 27.1317 50.0032C13.7968 50.0032 7.27344 41.9144 7.27344 34.1635Z" fill="#23A4DC"/>
<path d="M7.27344 34.1635C7.27344 26.4127 22.669 1.65849 27.1317 1.65869C31.5945 1.6589 46.321 27.519 46.321 34.1635C46.321 40.8081 40.4667 50.0032 27.1317 50.0032C13.7968 50.0032 7.27344 41.9144 7.27344 34.1635Z" stroke="#E1E1E1" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 590 B

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.61035 34.1635C7.61035 26.4127 23.0059 1.65849 27.4687 1.65869C31.9314 1.6589 46.6579 27.519 46.6579 34.1635C46.6579 40.8081 40.8036 50.0032 27.4687 50.0032C14.1337 50.0032 7.61035 41.9144 7.61035 34.1635Z" fill="#94DFFF"/>
<path d="M7.61035 34.1635C7.61035 26.4127 23.0059 1.65849 27.4687 1.65869C31.9314 1.6589 46.6579 27.519 46.6579 34.1635C46.6579 40.8081 40.8036 50.0032 27.4687 50.0032C14.1337 50.0032 7.61035 41.9144 7.61035 34.1635Z" stroke="#858585" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 598 B

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.8177 13.3564C11.9966 20.8737 7.52637 29.9872 7.52637 34.1637C7.52637 41.1347 12.803 48.3791 23.566 49.7663H30.9709C41.7752 48.2859 46.5739 40.1795 46.5739 34.1637C46.5739 31.0433 43.3259 23.6848 39.4184 16.7571C38.3607 16.9126 37.2908 17.0035 36.2378 17.0035C32.9251 17.0035 30.7479 16.1408 28.4868 15.245C26.0445 14.2774 23.5044 13.271 19.3299 13.271C18.4201 13.271 17.5852 13.3021 16.8177 13.3564Z" fill="#23A4DC"/>
<path d="M7.52637 34.1635C7.52637 26.4127 22.9219 1.65849 27.3846 1.65869C31.8473 1.6589 46.5738 27.519 46.5738 34.1635C46.5738 40.8081 40.7195 50.0032 27.3846 50.0032C14.0497 50.0032 7.52637 41.9144 7.52637 34.1635Z" stroke="#E1E1E1" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 834 B

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.058 13.3564C12.2368 20.8737 7.7666 29.9872 7.7666 34.1637C7.7666 41.1347 13.0433 48.3791 23.8063 49.7663H31.2111C42.0155 48.2859 46.8141 40.1795 46.8141 34.1637C46.8141 31.0433 43.5662 23.6848 39.6587 16.7571C38.6009 16.9126 37.5311 17.0035 36.478 17.0035C33.1654 17.0035 30.9881 16.1408 28.727 15.245C26.2847 14.2774 23.7446 13.271 19.5702 13.271C18.6604 13.271 17.8254 13.3021 17.058 13.3564Z" fill="#94DFFF"/>
<path d="M7.7666 34.1635C7.7666 26.4127 23.1621 1.65849 27.6249 1.65869C32.0876 1.6589 46.8141 27.519 46.8141 34.1635C46.8141 40.8081 40.9598 50.0032 27.6249 50.0032C14.2899 50.0032 7.7666 41.9144 7.7666 34.1635Z" stroke="#858585" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 825 B

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.64246 26.445C8.28889 29.5939 7.44238 32.3463 7.44238 34.1637C7.44238 41.1349 12.7194 48.3796 23.4831 49.7665H30.8858C41.6909 48.2864 46.4899 40.1797 46.4899 34.1637C46.4899 32.6463 45.7218 30.1267 44.4834 27.1419C41.9629 27.9537 38.9972 28.6158 36.1537 28.6158C32.8411 28.6158 30.6638 27.7531 28.4027 26.8573C25.9604 25.8897 23.4203 24.8833 19.2459 24.8833C14.3193 24.8833 11.5866 25.7959 9.88929 26.3627C9.80448 26.3911 9.72225 26.4185 9.64246 26.445Z" fill="#23A4DC"/>
<path d="M7.44141 34.1635C7.44141 26.4127 22.8369 1.65849 27.2997 1.65869C31.7624 1.6589 46.4889 27.519 46.4889 34.1635C46.4889 40.8081 40.6346 50.0032 27.2997 50.0032C13.9647 50.0032 7.44141 41.9144 7.44141 34.1635Z" stroke="#E1E1E1" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 886 B

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.80164 26.445C8.44807 29.5939 7.60156 32.3463 7.60156 34.1637C7.60156 41.1349 12.8786 48.3796 23.6424 49.7665H31.045C41.8501 48.2864 46.6491 40.1797 46.6491 34.1637C46.6491 32.6463 45.8811 30.1267 44.6426 27.1419C42.1221 27.9537 39.1564 28.6158 36.313 28.6158C33.0003 28.6158 30.8231 27.7531 28.562 26.8573C26.1197 25.8897 23.5796 24.8833 19.4051 24.8833C14.4785 24.8833 11.7458 25.7959 10.0485 26.3627C9.96366 26.3911 9.88143 26.4185 9.80164 26.445Z" fill="#94DFFF"/>
<path d="M7.60156 34.1635C7.60156 26.4127 22.9971 1.65849 27.4598 1.65869C31.9225 1.6589 46.649 27.519 46.649 34.1635C46.649 40.8081 40.7948 50.0032 27.4598 50.0032C14.1249 50.0032 7.60156 41.9144 7.60156 34.1635Z" stroke="#858585" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 880 B

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M45.7086 38.3054C43.803 44.0794 37.9191 50.0032 27.216 50.0032C16.4343 50.0032 10.1055 44.7154 8.07715 38.5937L8.50611 38.3614C8.86437 38.2886 9.28619 38.1477 9.80459 37.9746C11.5019 37.4078 14.2346 36.4951 19.1612 36.4951C23.3357 36.4951 25.8758 37.5015 28.3181 38.4692C30.5792 39.365 32.7564 40.2276 36.0691 40.2276C39.4225 40.2276 42.9459 39.3068 45.7086 38.3054Z" fill="#23A4DC"/>
<path d="M7.35742 34.1635C7.35742 26.4127 22.753 1.65849 27.2157 1.65869C31.6784 1.6589 46.4049 27.519 46.4049 34.1635C46.4049 40.8081 40.5507 50.0032 27.2157 50.0032C13.8808 50.0032 7.35742 41.9144 7.35742 34.1635Z" stroke="#E1E1E1" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 796 B

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M45.7887 38.3054C43.8831 44.0794 37.9992 50.0032 27.296 50.0032C16.5143 50.0032 10.1855 44.7154 8.15723 38.5937L8.58618 38.3614C8.94444 38.2886 9.36627 38.1477 9.88467 37.9746C11.582 37.4078 14.3146 36.4951 19.2413 36.4951C23.4157 36.4951 25.9558 37.5015 28.3981 38.4692C30.6592 39.365 32.8365 40.2276 36.1491 40.2276C39.5025 40.2276 43.026 39.3068 45.7887 38.3054Z" fill="#94DFFF"/>
<path d="M7.4375 34.1635C7.4375 26.4127 22.8331 1.65849 27.2958 1.65869C31.7585 1.6589 46.485 27.519 46.485 34.1635C46.485 40.8081 40.6308 50.0032 27.2958 50.0032C13.9609 50.0032 7.4375 41.9144 7.4375 34.1635Z" stroke="#858585" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 789 B

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.3142 49.5303C18.1414 48.867 14.2358 46.8574 11.5742 44.1787C13.8735 43.9569 17.1377 43.7527 21.0554 43.7527C25.2299 43.7527 27.2367 44.4203 29.1662 45.0623C30.9526 45.6566 32.6727 46.2288 35.9854 46.2288C37.3008 46.2288 38.6423 46.1035 39.9539 45.8977C37.5855 47.6741 34.5244 49.0114 30.718 49.5303H23.3142Z" fill="#23A4DC"/>
<path d="M7.27344 34.0042C7.27344 26.2914 22.669 1.65849 27.1317 1.65869C31.5945 1.6589 46.321 27.3923 46.321 34.0042C46.321 40.6162 40.4667 49.7662 27.1317 49.7662C13.7968 49.7662 7.27344 41.717 7.27344 34.0042Z" stroke="#E1E1E1" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 738 B

View File

@ -0,0 +1,4 @@
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.3142 49.5303C18.1414 48.867 14.2358 46.8574 11.5742 44.1787C13.8735 43.9569 17.1377 43.7527 21.0554 43.7527C25.2299 43.7527 27.2367 44.4203 29.1662 45.0623C30.9526 45.6566 32.6727 46.2288 35.9854 46.2288C37.3008 46.2288 38.6423 46.1035 39.9539 45.8977C37.5855 47.6741 34.5244 49.0114 30.718 49.5303H23.3142Z" fill="#94DFFF"/>
<path d="M7.27344 34.0042C7.27344 26.2914 22.669 1.65849 27.1317 1.65869C31.5945 1.6589 46.321 27.3923 46.321 34.0042C46.321 40.6162 40.4667 49.7662 27.1317 49.7662C13.7968 49.7662 7.27344 41.717 7.27344 34.0042Z" stroke="#858585" stroke-width="1.65888"/>
</svg>

After

Width:  |  Height:  |  Size: 738 B

View File

@ -655,7 +655,6 @@ MachineObject::MachineObject(NetworkAgent* agent, std::string name, std::string
ams_insert_flag = false;
ams_power_on_flag = false;
ams_calibrate_remain_flag = false;
ams_humidity = 5;
/* signals */
wifi_signal = "";
@ -4358,16 +4357,6 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
}
if (jj["ams"].contains("ams_rfid_status"))
ams_rfid_status = jj["ams"]["ams_rfid_status"].get<int>();
if (jj["ams"].contains("humidity")) {
if (jj["ams"]["humidity"].is_string()) {
std::string humidity_str = jj["ams"]["humidity"].get<std::string>();
try {
ams_humidity = atoi(humidity_str.c_str());
} catch (...) {
;
}
}
}
if (jj["ams"].contains("insert_flag") || jj["ams"].contains("power_on_flag")
|| jj["ams"].contains("calibrate_remain_flag")) {
@ -4467,6 +4456,16 @@ int MachineObject::parse_json(std::string payload, bool key_field_only)
}
}
if (it->contains("humidity_raw"))
{
std::string humidity_raw = (*it)["humidity_raw"].get<std::string>();
try {
curr_ams->humidity_raw = atoi(humidity_raw.c_str());
} catch (...) {
;
}
}
if (it->contains("tray")) {
std::set<std::string> tray_id_set;

View File

@ -363,6 +363,7 @@ public:
}
std::string id;
int humidity = 5;
int humidity_raw = -1;// the percentage, -1 means invalid. eg. 100 means 100%
bool startup_read_opt{true};
bool tray_read_opt{false};
bool is_exists{false};
@ -680,7 +681,6 @@ public:
bool ams_auto_switch_filament_flag { false };
bool ams_air_print_status { false };
bool ams_support_virtual_tray { true };
int ams_humidity;
time_t ams_user_setting_start = 0;
time_t ams_switch_filament_start = 0;
AmsStatusMain ams_status_main;

View File

@ -47,9 +47,11 @@ bool AMSinfo::parse_ams_info(MachineObject *obj, Ams *ams, bool remain_flag, boo
if (ams->type == 1 || ams->type == 3){
this->ams_humidity = ams->humidity;
this->humidity_raw = ams->humidity_raw;
}
else{
this->ams_humidity = -1;
this->humidity_raw = -1;
}
this->ams_type = AMSModel(ams->type);
@ -2752,18 +2754,13 @@ AMSHumidity::AMSHumidity() {}
AMSHumidity::AMSHumidity(wxWindow* parent, wxWindowID id, AMSinfo info, const wxPoint& pos, const wxSize& size)
: AMSHumidity()
{
m_amsinfo = info;
// road type
for (int i = 1; i <= 5; i++) { ams_humidity_imgs.push_back(ScalableBitmap(this, "hum_level" + std::to_string(i) + "_light", 16));}
for (int i = 1; i <= 5; i++) { ams_humidity_dark_imgs.push_back(ScalableBitmap(this, "hum_level" + std::to_string(i) + "_dark", 16));}
for (int i = 1; i <= 5; i++) { ams_humidity_no_num_imgs.push_back(ScalableBitmap(this, "hum_level" + std::to_string(i) + "_no_num_light", 16)); }
for (int i = 1; i <= 5; i++) { ams_humidity_no_num_dark_imgs.push_back(ScalableBitmap(this, "hum_level" + std::to_string(i) + "_no_num_dark", 16)); }
for (int i = 1; i <= 5; i++) {
ams_humidity_img.push_back(ScalableBitmap(this, "hum_level" + std::to_string(i) + "_light", 16));
}
for (int i = 1; i <= 5; i++) {
ams_humidity_img.push_back(ScalableBitmap(this, "hum_level" + std::to_string(i) + "_dark", 16));
}
ams_sun_img = ScalableBitmap(this, "ams_drying", 16);
create(parent, id, pos, AMS_HUMIDITY_SIZE);
create(parent, id, pos, wxDefaultSize);
Bind(wxEVT_PAINT, &AMSHumidity::paintEvent, this);
//wxWindow::SetBackgroundColour(AMS_CONTROL_DEF_HUMIDITY_BK_COLOUR);
@ -2787,21 +2784,36 @@ AMSHumidity::AMSHumidity(wxWindow* parent, wxWindowID id, AMSinfo info, const wx
}
}
});
Update(info);
}
void AMSHumidity::create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size) {
wxWindow::Create(parent, id, pos, size);
SetSize(size);
SetMinSize(size);
SetBackgroundColour(StateColor::darkModeColorFor(AMS_CONTROL_DEF_LIB_BK_COLOUR));
Refresh();
}
void AMSHumidity::Update(AMSinfo amsinfo)
{
m_amsinfo = amsinfo;
Refresh();
if (m_amsinfo != amsinfo)
{
m_amsinfo = amsinfo;
if (m_amsinfo.humidity_raw != -1)
{
SetSize(AMS_HUMIDITY_SIZE);
SetMinSize(AMS_HUMIDITY_SIZE);
SetMaxSize(AMS_HUMIDITY_SIZE);
}
else
{
SetSize(AMS_HUMIDITY_NO_PERCENT_SIZE);
SetMinSize(AMS_HUMIDITY_NO_PERCENT_SIZE);
SetMaxSize(AMS_HUMIDITY_NO_PERCENT_SIZE);
}
Refresh();
}
}
@ -2841,42 +2853,61 @@ void AMSHumidity::doRender(wxDC& dc)
// left mode
if (m_amsinfo.ams_humidity >= 1 && m_amsinfo.ams_humidity <= 5) { m_show_humidity = true; }
else { m_show_humidity = false; }
if (m_amsinfo.ams_humidity >= 1 && m_amsinfo.ams_humidity <= 5) {
if (m_show_humidity) {
//background
dc.SetPen(wxPen(*wxTRANSPARENT_PEN));
dc.SetBrush(wxBrush(StateColor::darkModeColorFor(AMS_CONTROL_DEF_BLOCK_BK_COLOUR)));
dc.DrawRoundedRectangle(0, 0, (size.x), (size.y), (size.y / 2));
//hum image
int hum_idx = m_amsinfo.ams_humidity - 1;
if (wxGetApp().dark_mode()) {
hum_idx += 5;
}
if (hum_idx >= ams_humidity_img.size() || hum_idx < 0){
BOOST_LOG_TRIVIAL(trace) << "humidity error";
}
auto hum_img = ams_humidity_img[hum_idx];
auto pot = wxPoint(FromDIP(5), ((size.y - hum_img.GetBmpSize().y) / 2));
dc.DrawBitmap(hum_img.bmp(), pot);
wxPoint pot;
if (m_amsinfo.humidity_raw != -1) /*image with no number + percentage*/
{
// hum image
ScalableBitmap hum_img;
if (!wxGetApp().dark_mode()) {
hum_img = ams_humidity_no_num_imgs[m_amsinfo.ams_humidity - 1];
} else {
hum_img = ams_humidity_no_num_dark_imgs[m_amsinfo.ams_humidity - 1];
}
//percentage
wxString hum_percentage = _L(std::to_string(20 * (5 - m_amsinfo.ams_humidity + 1)));
auto tsize = dc.GetMultiLineTextExtent(hum_percentage);
dc.SetPen(wxPen(*wxTRANSPARENT_PEN));
dc.SetFont(Label::Body_14);
dc.SetTextForeground(StateColor::darkModeColorFor(AMS_CONTROL_BLACK_COLOUR));
//pot = wxPoint(FromDIP(size.x * 0.3), FromDIP((size.y - tsize.y) / 2));
pot.x = pot.x + hum_img.GetBmpSize().x + FromDIP(3);
dc.DrawText(hum_percentage, pot);
pot = wxPoint(FromDIP(5), ((size.y - hum_img.GetBmpSize().y) / 2));
dc.DrawBitmap(hum_img.bmp(), pot);
pot.x += (tsize.x + FromDIP(5));
dc.SetFont(Label::Body_12);
tsize = dc.GetMultiLineTextExtent(_L("%"));
pot.y += (tsize.y / 2 - FromDIP(4));
dc.DrawText(_L("%"), pot);
// percentage
wxString hum_percentage(std::to_string(m_amsinfo.humidity_raw));
auto tsize = dc.GetMultiLineTextExtent(hum_percentage);
dc.SetPen(wxPen(*wxTRANSPARENT_PEN));
dc.SetFont(Label::Body_14);
dc.SetTextForeground(StateColor::darkModeColorFor(AMS_CONTROL_BLACK_COLOUR));
// pot = wxPoint(FromDIP(size.x * 0.3), FromDIP((size.y - tsize.y) / 2));
pot.x = pot.x + hum_img.GetBmpSize().x + FromDIP(3);
dc.DrawText(hum_percentage, pot);
pot.x += (tsize.x + FromDIP(5));
dc.SetFont(Label::Body_12);
tsize = dc.GetMultiLineTextExtent(_L("%"));
pot.y += (tsize.y / 2 - FromDIP(4));
dc.DrawText(_L("%"), pot);
pot.x = pot.x + tsize.x + FromDIP(2);
}
else /*image with number*/
{
// hum image
ScalableBitmap hum_img;
if (!wxGetApp().dark_mode()) {
hum_img = ams_humidity_imgs[m_amsinfo.ams_humidity - 1];
} else {
hum_img = ams_humidity_dark_imgs[m_amsinfo.ams_humidity - 1];
}
pot = wxPoint(FromDIP(5), ((size.y - hum_img.GetBmpSize().y) / 2));
dc.DrawBitmap(hum_img.bmp(), pot);
pot.x = pot.x + hum_img.GetBmpSize().x + FromDIP(3);
}
//vertical line
pot.x = pot.x + tsize.x + FromDIP(2);
dc.SetPen(wxPen(wxColour(194, 194, 194)));
dc.SetBrush(wxBrush(wxColour(194, 194, 194)));
//dc.DrawLine(FromDIP(GetSize().x * 0.64), FromDIP(GetSize().y / 2 - 10), FromDIP(GetSize().x * 0.64), FromDIP(GetSize().y / 2 + 10));
@ -2897,15 +2928,11 @@ void AMSHumidity::doRender(wxDC& dc)
}
void AMSHumidity::msw_rescale() {
for (int i = 0; i < ams_humidity_img.size(); i++) {
if (i < ams_humidity_img.size() / 2){
ams_humidity_img[i] = ScalableBitmap(this, "hum_level" + std::to_string(i + 1) + "_light", 16);
}
else{
ams_humidity_img[i] = ScalableBitmap(this, "hum_level" + std::to_string((i - ams_humidity_img.size() / 2 + 1)) + "_dark", 16);
}
}
ams_sun_img = ScalableBitmap(this, "ams_drying", 16);
for (auto& img : ams_humidity_imgs) { img.msw_rescale();}
for (auto& img : ams_humidity_dark_imgs) { img.msw_rescale(); }
for (auto &img : ams_humidity_no_num_imgs) { img.msw_rescale(); }
for (auto &img : ams_humidity_no_num_dark_imgs) { img.msw_rescale(); }
ams_sun_img.msw_rescale();
Layout();
Refresh();
@ -3184,18 +3211,10 @@ void AmsItem::Update(AMSinfo info)
m_info = info;
m_can_count = info.cans.size();
// for (auto refresh_it : m_can_refresh_list) {
// int i = 0;
// AMSrefresh *refresh = refresh_it.second;
// if (i < m_can_count) {
// refresh->Update(info.ams_id, info.cans[i]);
// refresh->Show();
// } else {
// refresh->Hide();
// }
// i++;
// }
if (m_humidity)
{
m_humidity->Update(m_info);
}
for (int i = 0; i < m_can_count; i++) {
auto it = m_can_refresh_list.find(std::to_string(i));
@ -3228,6 +3247,7 @@ void AmsItem::Update(AMSinfo info)
/*m_panel_road->Update(m_info, info.cans[0]);
m_panel_road->Show();*/
}
Layout();
}

View File

@ -161,6 +161,7 @@ enum FilamentStepType {
#define AMS_BODY_SIZE wxSize(FromDIP(36), FromDIP(55))
#define AMS_DOWN_ROAD_SIZE wxSize(FromDIP(568), FromDIP(10))
#define AMS_HUMIDITY_SIZE wxSize(FromDIP(93), FromDIP(26))
#define AMS_HUMIDITY_NO_PERCENT_SIZE wxSize(FromDIP(60), FromDIP(26))
#define AMS_PANEL_SIZE wxSize(FromDIP(264), FromDIP(150))
#define GENERIC_AMS_SLOT_NUM 4
@ -213,6 +214,7 @@ public:
AMSAction current_action;
int curreent_filamentstep;
int ams_humidity = 0;
int humidity_raw = -1;
AMSModel ams_type = AMSModel::GENERIC_AMS;
AMSModelOriginType ext_type = AMSModelOriginType::GENERIC_EXT;
@ -711,7 +713,12 @@ public:
double m_radius = { 12 };
void Update(AMSinfo amsinfo);
std::vector<ScalableBitmap> ams_humidity_img;
std::vector<ScalableBitmap> ams_humidity_imgs;
std::vector<ScalableBitmap> ams_humidity_dark_imgs;
std::vector<ScalableBitmap> ams_humidity_no_num_imgs;
std::vector<ScalableBitmap> ams_humidity_no_num_dark_imgs;
ScalableBitmap ams_sun_img;