Sfoglia il codice sorgente

PFW-1403 Rename ReportErrorSource to ErrorSource for shorter code

Guðni Már Gilbert 2 anni fa
parent
commit
d6e0f47739
2 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 1 1
      Firmware/mmu2.cpp
  2. 4 4
      Firmware/mmu2.h

+ 1 - 1
Firmware/mmu2.cpp

@@ -795,7 +795,7 @@ void MMU2::execute_extruder_sequence(const E_Step *sequence, uint8_t steps) {
     }
     }
 }
 }
 
 
-void MMU2::ReportError(ErrorCode ec, ReportErrorSource res) {
+void MMU2::ReportError(ErrorCode ec, ErrorSource res) {
     // Due to a potential lossy error reporting layers linked to this hook
     // Due to a potential lossy error reporting layers linked to this hook
     // we'd better report everything to make sure especially the error states
     // we'd better report everything to make sure especially the error states
     // do not get lost. 
     // do not get lost. 

+ 4 - 4
Firmware/mmu2.h

@@ -70,7 +70,7 @@ public:
     };
     };
 
 
     /// Source of operation error
     /// Source of operation error
-    enum ReportErrorSource: uint8_t {
+    enum ErrorSource: uint8_t {
         ErrorSourcePrinter = 0,
         ErrorSourcePrinter = 0,
         ErrorSourceMMU = 1,
         ErrorSourceMMU = 1,
         ErrorSourceNone = 0xFF,
         ErrorSourceNone = 0xFF,
@@ -166,7 +166,7 @@ public:
     inline ErrorCode MMUCurrentErrorCode() const { return logic.Error(); }
     inline ErrorCode MMUCurrentErrorCode() const { return logic.Error(); }
 
 
     /// @returns Last error source
     /// @returns Last error source
-    inline ReportErrorSource MMULastErrorSource() const { return lastErrorSource; }
+    inline ErrorSource MMULastErrorSource() const { return lastErrorSource; }
 
 
     /// @returns the version of the connected MMU FW.
     /// @returns the version of the connected MMU FW.
     /// In the future we'll return the trully detected FW version
     /// In the future we'll return the trully detected FW version
@@ -222,7 +222,7 @@ private:
     /// Reports an error into attached ExtUIs
     /// Reports an error into attached ExtUIs
     /// @param ec error code, see ErrorCode
     /// @param ec error code, see ErrorCode
     /// @param res reporter error source, is either Printer (0) or MMU (1)
     /// @param res reporter error source, is either Printer (0) or MMU (1)
-    void ReportError(ErrorCode ec, ReportErrorSource res);
+    void ReportError(ErrorCode ec, ErrorSource res);
 
 
     /// Reports progress of operations into attached ExtUIs
     /// Reports progress of operations into attached ExtUIs
     /// @param pc progress code, see ProgressCode
     /// @param pc progress code, see ProgressCode
@@ -268,7 +268,7 @@ private:
     
     
     ProgressCode lastProgressCode = ProgressCode::OK;
     ProgressCode lastProgressCode = ProgressCode::OK;
     ErrorCode lastErrorCode = ErrorCode::MMU_NOT_RESPONDING;
     ErrorCode lastErrorCode = ErrorCode::MMU_NOT_RESPONDING;
-    ReportErrorSource lastErrorSource = ReportErrorSource::ErrorSourceNone;
+    ErrorSource lastErrorSource = ErrorSource::ErrorSourceNone;
     Buttons lastButton = Buttons::NoButton;
     Buttons lastButton = Buttons::NoButton;
 
 
     StepStatus logicStepLastStatus;
     StepStatus logicStepLastStatus;