Browse Source

Distinct enumerated MF states

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
03184e1c31
  1. 18
      Marlin/src/MarlinCore.h

18
Marlin/src/MarlinCore.h

@ -56,18 +56,18 @@ 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…
Cancel
Save