forked from prusa3d/Prusa-Firmware
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
29e3ea5
commit a65f8b1
Showing
7 changed files
with
88 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//! @file | ||
//! @brief Printer State | ||
//! @param GetPrinterState get current printer state | ||
//! @param SetPrinterState set printer state | ||
|
||
#include "printer_state.h" | ||
|
||
static PrinterState printer_state; | ||
|
||
PrinterState GetPrinterState() { | ||
return printer_state; | ||
} | ||
|
||
PrinterState SetPrinterState(PrinterState status) { | ||
return printer_state = status; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//! @file | ||
//! @brief Printer States | ||
//! @param NotReady | ||
//! @param IsReady | ||
//! @param Idle | ||
//! @param SDPrintingFinished | ||
//! @param HostPrintingFinished | ||
//! @param IsSDPrinting | ||
//! @param IsHostPrinting | ||
//! @todo Pause/Resume states, Heating states and more | ||
|
||
#pragma once | ||
#include "macros.h" | ||
|
||
enum class PrinterState : uint8_t | ||
{ | ||
NotReady = 0, //Lowest state to simplify queries | ||
IsReady = 1, // | ||
Idle = 2, | ||
SDPrintingFinished = 3, | ||
HostPrintingFinished = 4, | ||
IsSDPrinting = 5, | ||
IsHostPrinting = 6, | ||
}; | ||
|
||
PrinterState GetPrinterState(); | ||
PrinterState SetPrinterState(PrinterState status); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters