mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-20 07:11:12 -06:00
ENH:add humidity display/surplus material
Change-Id: I1a04df257c9b09fef7ff06cfa192644478a30716
This commit is contained in:
parent
3a9397307d
commit
3925ceb9f4
9 changed files with 218 additions and 31 deletions
|
@ -21,6 +21,7 @@
|
|||
#define AMS_CONTROL_WHITE_COLOUR wxColour(255, 255, 255)
|
||||
#define AMS_CONTROL_BLACK_COLOUR wxColour(0, 0, 0)
|
||||
#define AMS_CONTROL_DEF_BLOCK_BK_COLOUR wxColour(238, 238, 238)
|
||||
#define AMS_CONTROL_DEF_LIB_BK_COLOUR wxColour(248, 248, 248)
|
||||
#define AMS_EXTRUDER_DEF_COLOUR wxColour(234, 234, 234)
|
||||
#define AMS_CONTROL_MAX_COUNT 4
|
||||
#define AMS_CONTRO_CALIBRATION_BUTTON_SIZE wxSize(FromDIP(150), FromDIP(28))
|
||||
|
@ -94,7 +95,7 @@ enum FilamentStep {
|
|||
|
||||
#define AMS_ITEM_CUBE_SIZE wxSize(FromDIP(14), FromDIP(14))
|
||||
#define AMS_ITEM_SIZE wxSize(FromDIP(82), FromDIP(27))
|
||||
#define AMS_ITEM_HUMIDITY_SIZE wxSize(FromDIP(150), FromDIP(27))
|
||||
#define AMS_ITEM_HUMIDITY_SIZE wxSize(FromDIP(120), FromDIP(27))
|
||||
#define AMS_CAN_LIB_SIZE wxSize(FromDIP(58), FromDIP(80))
|
||||
#define AMS_CAN_ROAD_SIZE wxSize(FromDIP(66), FromDIP(60))
|
||||
#define AMS_CAN_ITEM_HEIGHT_SIZE FromDIP(27)
|
||||
|
@ -111,18 +112,19 @@ struct Caninfo
|
|||
wxString material_name;
|
||||
wxColour material_colour = {*wxWHITE};
|
||||
AMSCanType material_state;
|
||||
int material_remain = 100;
|
||||
};
|
||||
|
||||
struct AMSinfo
|
||||
{
|
||||
public:
|
||||
std::string ams_id;
|
||||
std::vector<Caninfo> cans;
|
||||
|
||||
std::string current_can_id;
|
||||
AMSPassRoadSTEP current_step;
|
||||
AMSAction current_action;
|
||||
int curreent_filamentstep;
|
||||
std::string ams_id;
|
||||
std::vector<Caninfo> cans;
|
||||
std::string current_can_id;
|
||||
AMSPassRoadSTEP current_step;
|
||||
AMSAction current_action;
|
||||
int curreent_filamentstep;
|
||||
int ams_humidity = 0;
|
||||
|
||||
bool parse_ams_info(Ams *ams);
|
||||
};
|
||||
|
@ -268,6 +270,7 @@ public:
|
|||
void create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize);
|
||||
|
||||
public:
|
||||
AMSinfo m_amsinfo;
|
||||
Caninfo m_info;
|
||||
int m_canindex = {0};
|
||||
AMSRoadMode m_rode_mode = {AMSRoadMode::AMS_ROAD_MODE_LEFT_RIGHT};
|
||||
|
@ -277,7 +280,15 @@ public:
|
|||
double m_radius = {4};
|
||||
wxColour m_road_def_color;
|
||||
wxColour m_road_color;
|
||||
void Update(Caninfo info, int canindex, int maxcan);
|
||||
void Update(AMSinfo amsinfo, Caninfo info, int canindex, int maxcan);
|
||||
|
||||
ScalableBitmap ams_humidity_0;
|
||||
ScalableBitmap ams_humidity_1;
|
||||
ScalableBitmap ams_humidity_2;
|
||||
ScalableBitmap ams_humidity_3;
|
||||
ScalableBitmap ams_humidity_4;
|
||||
bool m_show_humidity = { false };
|
||||
int m_humidity = { 0 };
|
||||
|
||||
void SetPassRoadColour(wxColour col);
|
||||
void SetMode(AMSRoadMode mode);
|
||||
|
@ -313,7 +324,13 @@ public:
|
|||
void HideHumidity();
|
||||
void SetHumidity(int humidity);
|
||||
virtual bool Enable(bool enable = true);
|
||||
|
||||
AMSinfo m_amsinfo;
|
||||
ScalableBitmap ams_humidity_0;
|
||||
ScalableBitmap ams_humidity_1;
|
||||
ScalableBitmap ams_humidity_2;
|
||||
ScalableBitmap ams_humidity_3;
|
||||
ScalableBitmap ams_humidity_4;
|
||||
|
||||
protected:
|
||||
wxSize m_cube_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue