mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-28 11:21:30 +00:00
refactor
This commit is contained in:
@@ -22,16 +22,6 @@ public:
|
||||
bool fetch_filament_info(std::string dev_id) override;
|
||||
|
||||
private:
|
||||
// Qidi-specific device info (extends base MoonrakerDeviceInfo with model_id)
|
||||
struct QidiSlotInfo
|
||||
{
|
||||
int slot_index = 0;
|
||||
int color_index = 0;
|
||||
int filament_type = 0;
|
||||
int vendor_type = 0;
|
||||
bool filament_exists = false;
|
||||
};
|
||||
|
||||
struct QidiFilamentDict
|
||||
{
|
||||
std::map<int, std::string> colors;
|
||||
@@ -39,11 +29,13 @@ private:
|
||||
};
|
||||
|
||||
// Qidi-specific methods
|
||||
bool fetch_slot_info(const std::string& base_url,
|
||||
const std::string& api_key,
|
||||
std::vector<QidiSlotInfo>& slots,
|
||||
int& box_count,
|
||||
std::string& error) const;
|
||||
bool fetch_slot_info(const std::string& base_url,
|
||||
const std::string& api_key,
|
||||
const QidiFilamentDict& dict,
|
||||
const std::string& series_id,
|
||||
std::vector<AmsTrayData>& trays,
|
||||
int& box_count,
|
||||
std::string& error);
|
||||
bool fetch_filament_dict(const std::string& base_url, const std::string& api_key, QidiFilamentDict& dict, std::string& error) const;
|
||||
std::string normalize_filament_type(const std::string& filament_type);
|
||||
std::string infer_series_id(const std::string& model_id, const std::string& dev_name);
|
||||
@@ -52,7 +44,6 @@ private:
|
||||
// Static helpers
|
||||
static void parse_ini_section(const std::string& content, const std::string& section_name, std::map<int, std::string>& result);
|
||||
static void parse_filament_sections(const std::string& content, std::map<int, std::string>& result);
|
||||
static std::string normalize_color(const std::string& color);
|
||||
static std::string map_filament_type_to_setting_id(const std::string& filament_type);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user