Skip to content

Commit

Permalink
Add RawProgressCode & ProgressCode::_cnt
Browse files Browse the repository at this point in the history
  • Loading branch information
CZDanol-prusa committed Jan 3, 2024
1 parent 58577b8 commit 3975548
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/logic/progress_codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
#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
DisengagingIdler, // P2
UnloadingToFinda, // P3
UnloadingToPulley, //P4
UnloadingToPulley, // P4
FeedingToFinda, // P5
FeedingToBondtech, // P6
FeedingToNozzle, // P7
Expand All @@ -37,7 +40,7 @@ enum class ProgressCode : uint_fast8_t {
RetractingFromFinda, // P25

Homing, // P26
MovingSelector, // P27
MovingSelector, // P2

FeedingToFSensor, // P28

Expand All @@ -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
};

0 comments on commit 3975548

Please sign in to comment.