FIX: auto mapping for N3S

JIRA: [STUDIO-13844]
Change-Id: I9840e120c9857dc33923858b022da439e5b92784
(cherry picked from commit d8a07b47fbfa2b628d56658e9c45b0926eb6fcd8)
This commit is contained in:
xin.zhang
2025-08-06 09:55:59 +08:00
committed by Noisyfox
parent bdf413fb58
commit 52e9e0ae08
3 changed files with 34 additions and 23 deletions

View File

@@ -24,14 +24,6 @@ public:
id = tray_id;
}
static wxColour decode_color(const std::string& color);
bool operator==(DevAmsTray const& o) const
{
return id == o.id && type == o.type && filament_setting_id == o.filament_setting_id && color == o.color;
}
bool operator!=(DevAmsTray const& o) const { return !operator==(o); }
std::string id;
std::string tag_uid; // tag_uid
std::string setting_id; // tray_info_idx
@@ -61,16 +53,30 @@ public:
int hold_count = 0;
int remain = 0; // filament remain: 0 ~ 100
void set_hold_count() { hold_count = HOLD_COUNT_MAX; }
void UpdateColorFromStr(const std::string& color);
wxColour get_color();
public:
// operators
bool operator==(DevAmsTray const& o) const
{
return id == o.id && type == o.type && filament_setting_id == o.filament_setting_id && color == o.color;
}
bool operator!=(DevAmsTray const& o) const { return !operator==(o); }
// setters
void reset();
void UpdateColorFromStr(const std::string& color);
void set_hold_count() { hold_count = HOLD_COUNT_MAX; }
bool is_tray_info_ready();
bool is_unset_third_filament();
std::string get_display_filament_type();
// getter
bool is_tray_info_ready() const;
bool is_unset_third_filament() const;
wxColour get_color() const { return decode_color(color); };
std::string get_display_filament_type() const;
std::string get_filament_type();
// static
static wxColour decode_color(const std::string& color);
};
class DevAms