Selaa lähdekoodia

PFW-1362 Change isSpoolJoinEnabled to return bool

Guðni Már Gilbert 1 vuosi sitten
vanhempi
commit
94119744ad
2 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  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