mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-16 23:42:11 +00:00
refactor: promote DevAmsType to global enum, rename DUMMY to EXT_SPOOL
Matches BambuStudio's DevAmsType naming convention.
This commit is contained in:
@@ -40,6 +40,15 @@ enum AmsStatusMain
|
||||
AMS_STATUS_MAIN_UNKNOWN = 0xFF,
|
||||
};
|
||||
|
||||
enum DevAmsType : int
|
||||
{
|
||||
EXT_SPOOL = 0, // EXT
|
||||
AMS = 1, // AMS1
|
||||
AMS_LITE = 2, // AMS-Lite
|
||||
N3F = 3, // N3F, AMS 2PRO
|
||||
N3S = 4, // N3S, AMS HT
|
||||
};
|
||||
|
||||
// Slots and Tray
|
||||
#define VIRTUAL_TRAY_MAIN_ID 255
|
||||
#define VIRTUAL_TRAY_DEPUTY_ID 254
|
||||
|
||||
@@ -111,7 +111,7 @@ DevAms::DevAms(const std::string& ams_id, int nozzle_id, int type)
|
||||
m_ams_id = ams_id;
|
||||
m_ext_id = nozzle_id;
|
||||
m_ams_type = (AmsType)type;
|
||||
assert(DUMMY < type && m_ams_type <= N3S);
|
||||
assert(EXT_SPOOL < type && m_ams_type <= N3S);
|
||||
}
|
||||
|
||||
DevAms::~DevAms()
|
||||
|
||||
@@ -130,14 +130,12 @@ class DevAms
|
||||
{
|
||||
friend class DevFilaSystemParser;
|
||||
public:
|
||||
enum AmsType : int
|
||||
{
|
||||
DUMMY = 0,
|
||||
AMS = 1, // AMS
|
||||
AMS_LITE = 2, // AMS-Lite
|
||||
N3F = 3, // N3F
|
||||
N3S = 4, // N3S
|
||||
};
|
||||
using AmsType = DevAmsType;
|
||||
static constexpr AmsType EXT_SPOOL = DevAmsType::EXT_SPOOL;
|
||||
static constexpr AmsType AMS = DevAmsType::AMS;
|
||||
static constexpr AmsType AMS_LITE = DevAmsType::AMS_LITE;
|
||||
static constexpr AmsType N3F = DevAmsType::N3F;
|
||||
static constexpr AmsType N3S = DevAmsType::N3S;
|
||||
|
||||
public:
|
||||
DevAms(const std::string& ams_id, int extruder_id, AmsType type);
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace Slic3r
|
||||
}
|
||||
}
|
||||
FilamentInfo info;
|
||||
_parse_tray_info(atoi(tray.id.c_str()), 0, DevAms::DUMMY, tray, info);
|
||||
_parse_tray_info(atoi(tray.id.c_str()), 0, DevAms::EXT_SPOOL, tray, info);
|
||||
tray_filaments.emplace(std::make_pair(info.tray_id, info));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user