fix #198 Watch agenda option leads to higher battery consumption with FSL2Direct
In WatchManager the variable timeStampLastProcessedReading was not set. This variable is needed to check if a new event needs to be created in the calendar or not. Two readings must be at least 4.75 minutes away from each other
This commit is contained in:
parent
c7b92abe82
commit
b0702068e3
|
@ -115,9 +115,15 @@ class WatchManager: NSObject {
|
|||
event.calendar = calendar
|
||||
|
||||
do{
|
||||
|
||||
try eventStore.save(event, span: .thisEvent)
|
||||
|
||||
timeStampLastProcessedReading = lastReading[0].timeStamp
|
||||
|
||||
} catch let error {
|
||||
|
||||
trace("in createCalendarEvent, error while saving : %{public}@", log: log, category: ConstantsLog.categoryWatchManager, type: .error, error.localizedDescription)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue