ソースを参照

PFW-1362 Change isSpoolJoinEnabled to return bool

Guðni Már Gilbert 1 年間 前
コミット
94119744ad
2 ファイル変更5 行追加4 行削除
  1. 3 3
      Firmware/SpoolJoin.cpp
  2. 2 1
      Firmware/SpoolJoin.h

+ 3 - 3
Firmware/SpoolJoin.cpp

@@ -51,12 +51,12 @@ void SpoolJoin::toggleSpoolJoin()
     }
 }
 
-uint8_t SpoolJoin::isSpoolJoinEnabled()
+bool SpoolJoin::isSpoolJoinEnabled()
 {
     if(eeprom_read_byte((uint8_t*)EEPROM_AUTO_DEPLETE) == (uint8_t)EEPROM::Enabled) {
-        return 1;
+        return true;
     } else {
-        return 0;
+        return false;
     }
 }
 

+ 2 - 1
Firmware/SpoolJoin.h

@@ -31,7 +31,8 @@ public:
     static void toggleSpoolJoin();
 
     /// @brief Check if SpoolJoin is enabled
-    uint8_t isSpoolJoinEnabled();
+    /// @returns true if enabled, false if disabled
+    bool isSpoolJoinEnabled();
 
     /// @brief Update the saved MMU slot number so SpoolJoin can determine the next slot to use
     /// @param slot number of the slot to set