mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +00:00
ENH: clean codes about device
JIRA: [STUDIO-13609] Change-Id: I591de7033360b9570600006cfbce2148a8d031d5 (cherry picked from commit e9c774be8f4c89b8dafa14ef56913612fb68bd0c)
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
#pragma once
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
//Previous definitions
|
||||
class MachineObject;
|
||||
|
||||
enum PrinterFirmwareType
|
||||
{
|
||||
FIRMWARE_TYPE_ENGINEER = 0,
|
||||
FIRMWARE_TYPE_PRODUCTION,
|
||||
FIRMEARE_TYPE_UKNOWN,
|
||||
};
|
||||
|
||||
|
||||
class FirmwareInfo
|
||||
{
|
||||
public:
|
||||
std::string module_type; // ota or ams
|
||||
std::string version;
|
||||
std::string url;
|
||||
std::string name;
|
||||
std::string description;
|
||||
};
|
||||
|
||||
|
||||
class DevFirmwareVersionInfo
|
||||
{
|
||||
public:
|
||||
std::string name;
|
||||
wxString product_name;
|
||||
std::string sn;
|
||||
std::string hw_ver;
|
||||
std::string sw_ver;
|
||||
std::string sw_new_ver;
|
||||
int firmware_flag = 0;
|
||||
|
||||
public:
|
||||
bool isValid() const { return !sn.empty(); }
|
||||
bool isAirPump() const { return product_name.Contains("Air Pump"); }
|
||||
bool isLaszer() const { return product_name.Contains("Laser"); }
|
||||
bool isCuttingModule() const { return product_name.Contains("Cutting Module"); }
|
||||
};
|
||||
|
||||
|
||||
class DevFirmware
|
||||
{
|
||||
public:
|
||||
DevFirmware(MachineObject* obj) : m_owner(obj) {}
|
||||
|
||||
private:
|
||||
MachineObject* m_owner = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
Reference in New Issue
Block a user