@@ -70,9 +70,10 @@ class MMU2 {
70
70
};
71
71
72
72
// / Source of operation error
73
- enum ReportErrorSource : uint8_t {
73
+ enum ErrorSource : uint8_t {
74
74
ErrorSourcePrinter = 0 ,
75
75
ErrorSourceMMU = 1 ,
76
+ ErrorSourceNone = 0xFF ,
76
77
};
77
78
78
79
// / Perform a reset of the MMU
@@ -164,6 +165,9 @@ class MMU2 {
164
165
// / @returns Current error code
165
166
inline ErrorCode MMUCurrentErrorCode () const { return logic.Error (); }
166
167
168
+ // / @returns Last error source
169
+ inline ErrorSource MMULastErrorSource () const { return lastErrorSource; }
170
+
167
171
// / @returns the version of the connected MMU FW.
168
172
// / In the future we'll return the trully detected FW version
169
173
Version GetMMUFWVersion ()const {
@@ -218,7 +222,7 @@ class MMU2 {
218
222
// / Reports an error into attached ExtUIs
219
223
// / @param ec error code, see ErrorCode
220
224
// / @param res reporter error source, is either Printer (0) or MMU (1)
221
- void ReportError (ErrorCode ec, uint8_t res);
225
+ void ReportError (ErrorCode ec, ErrorSource res);
222
226
223
227
// / Reports progress of operations into attached ExtUIs
224
228
// / @param pc progress code, see ProgressCode
@@ -264,6 +268,7 @@ class MMU2 {
264
268
265
269
ProgressCode lastProgressCode = ProgressCode::OK;
266
270
ErrorCode lastErrorCode = ErrorCode::MMU_NOT_RESPONDING;
271
+ ErrorSource lastErrorSource = ErrorSource::ErrorSourceNone;
267
272
Buttons lastButton = Buttons::NoButton;
268
273
269
274
StepStatus logicStepLastStatus;
0 commit comments