mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 11:52:05 +00:00
ENH: clean codes about device
JIRA: [STUDIO-13609] Change-Id: I591de7033360b9570600006cfbce2148a8d031d5 (cherry picked from commit e9c774be8f4c89b8dafa14ef56913612fb68bd0c)
This commit is contained in:
36
src/slic3r/GUI/DeviceCore/DevStorage.h
Normal file
36
src/slic3r/GUI/DeviceCore/DevStorage.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class MachineObject;
|
||||
|
||||
|
||||
class DevStorage
|
||||
{
|
||||
public:
|
||||
DevStorage(MachineObject *obj) : m_owner(obj){}
|
||||
|
||||
public:
|
||||
|
||||
enum SdcardState : int {
|
||||
NO_SDCARD = 0,
|
||||
HAS_SDCARD_NORMAL = 1,
|
||||
HAS_SDCARD_ABNORMAL = 2,
|
||||
HAS_SDCARD_READONLY = 3,
|
||||
SDCARD_STATE_NUM = 4
|
||||
};
|
||||
|
||||
/* sdcard */
|
||||
SdcardState get_sdcard_state() const { return m_sdcard_state; };
|
||||
SdcardState set_sdcard_state(int state);
|
||||
|
||||
static void ParseV1_0(const json &print_json, DevStorage *system);
|
||||
|
||||
private:
|
||||
MachineObject *m_owner;
|
||||
SdcardState m_sdcard_state { NO_SDCARD };
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
Reference in New Issue
Block a user