Skip to content

Commit

Permalink
Merge pull request loopandlearn#326 from loopandlearn/filter_out_cal
Browse files Browse the repository at this point in the history
Filter out cal entries
  • Loading branch information
marionbarker authored Sep 24, 2024
2 parents 3505fcc + 1318735 commit bd098b1
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 bd098b1

Please sign in to comment.