diff --git a/src/logic/progress_codes.h b/src/logic/progress_codes.h index edc18e55..50bf84b9 100644 --- a/src/logic/progress_codes.h +++ b/src/logic/progress_codes.h @@ -2,16 +2,19 @@ #pragma once #include +/// 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 @@ -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 };