Sfoglia il codice sorgente

FIx: missed reading auto 5 min shutoff

Jon Fawcett 5 anni fa
parent
commit
bce721d8f9
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      LoopFollow/Controllers/Alarms.swift

+ 2 - 1
LoopFollow/Controllers/Alarms.swift

@@ -347,7 +347,8 @@ extension MainViewController {
         let bgSeconds = bgData.last!.date
         let bgSeconds = bgData.last!.date
         let now = Date().timeIntervalSince1970
         let now = Date().timeIntervalSince1970
         let secondsAgo = now - bgSeconds
         let secondsAgo = now - bgSeconds
-        let timerLength = 290 - secondsAgo
+        var timerLength = 290 - secondsAgo
+        if timerLength < 10 { timerLength = 290}
         startAlarmPlayingTimer(time: timerLength)
         startAlarmPlayingTimer(time: timerLength)
     }
     }