Distinct enumerated MF states
This commit is contained in:
parent
cca5844ba9
commit
03184e1c31
@ -57,17 +57,17 @@ void minkill(const bool steppers_off=false);
|
|||||||
// Global State of the firmware
|
// Global State of the firmware
|
||||||
enum MarlinState : uint8_t {
|
enum MarlinState : uint8_t {
|
||||||
MF_INITIALIZING = 0,
|
MF_INITIALIZING = 0,
|
||||||
MF_RUNNING = _BV(0),
|
MF_STOPPED,
|
||||||
MF_PAUSED = _BV(1),
|
MF_KILLED,
|
||||||
MF_WAITING = _BV(2),
|
MF_RUNNING,
|
||||||
MF_STOPPED = _BV(3),
|
MF_SD_COMPLETE,
|
||||||
MF_SD_COMPLETE = _BV(4),
|
MF_PAUSED,
|
||||||
MF_KILLED = _BV(7)
|
MF_WAITING,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern MarlinState marlin_state;
|
extern MarlinState marlin_state;
|
||||||
inline bool IsRunning() { return marlin_state == MF_RUNNING; }
|
inline bool IsRunning() { return marlin_state >= MF_RUNNING; }
|
||||||
inline bool IsStopped() { return marlin_state != MF_RUNNING; }
|
inline bool IsStopped() { return marlin_state == MF_STOPPED; }
|
||||||
|
|
||||||
bool printingIsActive();
|
bool printingIsActive();
|
||||||
bool printingIsPaused();
|
bool printingIsPaused();
|
||||||
|
Loading…
Reference in New Issue
Block a user