Skip to content

Commit

Permalink
Filter out cal entries
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorkert committed Sep 24, 2024
1 parent 3505fcc commit 1318735
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LoopFollow/Controllers/Nightscout/BGData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ extension MainViewController {
let date = Calendar.current.date(byAdding: .day, value: -1 * UserDefaultsRepository.downloadDays.value, to: Date())!
parameters["count"] = "\(UserDefaultsRepository.downloadDays.value * 2 * 24 * 60 / 5)"
parameters["find[dateString][$gte]"] = utcISODateFormatter.string(from: date)

// Exclude 'cal' entries
parameters["find[type][$ne]"] = "cal"

NightscoutUtils.executeRequest(eventType: .sgv, parameters: parameters) { (result: Result<[ShareGlucoseData], Error>) in
switch result {
Expand Down

0 comments on commit 1318735

Please sign in to comment.