mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-26 18:31:11 +00:00
Move axis, calib, chamber, status and upgrade handling into DeviceCore
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
#include <optional>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "slic3r/Utils/json_diff.hpp"
|
||||
|
||||
#include "DevDefs.h"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
enum DevJobState
|
||||
{
|
||||
JobStateIdle = 0,
|
||||
JobStateSlicing = 1,
|
||||
JobStatePrepare = 2,
|
||||
JobStateStarting = 3,
|
||||
JobStateRunning = 4,
|
||||
JobStatePause = 5,
|
||||
JobStatePausing = 6,
|
||||
JobStateResuming = 7,
|
||||
JobStateFinish = 8,
|
||||
JobStateFailed = 9,
|
||||
JobStateFinishing = 10,
|
||||
JobStateStoppping = 11,
|
||||
};
|
||||
|
||||
class MachineObject;
|
||||
class DevStatus
|
||||
{
|
||||
public:
|
||||
DevStatus(MachineObject* owner) : m_owner(owner) {};
|
||||
|
||||
public:
|
||||
std::optional<DevJobState> GetJobState() const { return m_job_state; }
|
||||
|
||||
// Parse
|
||||
void ParseStatus(const nlohmann::json& print_jj);
|
||||
|
||||
private:
|
||||
MachineObject *m_owner = nullptr;
|
||||
std::optional<DevJobState> m_job_state; // could be nullopt for some old firmware
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
Reference in New Issue
Block a user