Add RawProgressCode & ProgressCode::_cnt

pull/316/head v3.0.2
Daniel Čejchan 2024-01-03 13:59:06 +01:00 committed by DRracer
parent 58577b832d
commit d510e1e482
1 changed files with 10 additions and 3 deletions

View File

@ -2,10 +2,13 @@
#pragma once
#include <stdint.h>
/// Base class for ProgressCode and its extensions
using RawProgressCode = uint_fast8_t;
/// A complete set of progress codes which may be reported while running a high-level command/operation
/// This header file shall be included in the printer's firmware as well as a reference,
/// therefore the progress codes have been extracted to one place
enum class ProgressCode : uint_fast8_t {
enum class ProgressCode : RawProgressCode {
OK = 0, ///< finished ok
EngagingIdler, // P1
@ -37,7 +40,7 @@ enum class ProgressCode : uint_fast8_t {
RetractingFromFinda, // P25
Homing, // P26
MovingSelector, // P27
MovingSelector, // P2
FeedingToFSensor, // P28
@ -50,5 +53,9 @@ enum class ProgressCode : uint_fast8_t {
HWTestDisplay, // P35
ErrHwTestFailed, // P36
/// Keep as the last item (except for Empty)
/// Used for extending the progress codes on the printer side
_cnt,
Empty = 0xff // dummy empty state
};