Sfoglia il codice sorgente

Revert changes in RecBolusCondition.swift

Jonas Björkert 1 anno fa
parent
commit
52095e4539
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      LoopFollow/Alarm/AlarmCondition/RecBolusCondition.swift

+ 2 - 2
LoopFollow/Alarm/AlarmCondition/RecBolusCondition.swift

@@ -20,10 +20,10 @@ struct RecBolusCondition: AlarmCondition {
         }
 
         // ────────────────────────────────
-        // 1. has it DECREASED past the last-notified value?
+        // 1. has it INCREASED past the last-notified value?
         // ────────────────────────────────
         if let last = Storage.shared.lastRecBolusNotified.value {
-            if rec < last { return false }
+            if rec <= last + 1e-4 { return false }
         }
 
         Storage.shared.lastRecBolusNotified.value = rec