Commit Graph

8 Commits

Author SHA1 Message Date
Paul Plant 3fe3259467 update default Nightscout URL
Previously we had an example Heroku URL but this service is now no longer the default option for most users, so let's just leave it blank.

Change from "https://yoursitename.herokuapp.com" to "https://"
2023-12-14 18:05:34 +01:00
Paul Plant 87d2ae296f implement BG Check treatments
- BG Checks (finger prick) can be entered as a treatment
- will be converted and stored in coredata as mg/dl (to avoid having to add units to the treatment coredata model)
- will be converted and shown locally in the correct unit
- will be synced with Nightscout in the original unit
- Nightscout uploads will add the "GlucoseType"="Finger" and "units" attributes to align with BG checks entered via Care Portal.
- BG checks displayed on the main chart as a red circle with gray border as per Nightscout style
- observer added to refresh treatment table (values/units) if the bg unit is changed by the user
2022-05-20 13:22:33 +02:00
Johan Degraeve f9e5d7a7e8 treatments : download 24 hours of treatments 2022-04-28 23:43:09 +02:00
Johan Degraeve 5c54bfc479 improvements treatments (not finished)
- TreatmentNSResponse : changed type of createdAt from String to Date
- TreatmentEntryAccessor : functions that use howOld as parameter, changed type from Int to TimeInterval
- created constant for maximum days to upload for treatments, default 7 days
- increased maximum amount of treatments to show in TreatmentsViewController to 100 days
- removed TODO : check that hTTPURLResponse.statusCode is 200
- removed checkIfDisReConnectAfterTimeStampFunction in comments of initializer NightScoutUploadManager (seems not used anymore)
- in DexcomShareUploadManager and NightScoutUploadManager : renamed upload to uploadLatestBgReadings to make clear distinction with other upload functions
- deleted xdrip/Texts/TextsNFCLibre.swift because it's not used (not related to treatments)
- renamed xdrip/Texts/TextsNightScoutTestResult.swift to xdrip/Texts/TextsNightScout.swift
- fix in getLatestTreatments, howOld
- removed getRequireUploadTreatments from TreatmentEntryAccessor, filter on treatments to upload is done in NightScoutUploader
- using a new value in UserDefaults to trigger a NightScout sync. Setting the value to true from anywhere will launch a new sync.
- quite some changes in NightScoutUploadManager
- TreatmentsViewController does not control the sync, it will just trigger it whenever necessary by setting UserDefaults.standard.nightScoutSyncTreatmentsRequired to true
- NightScoutSync is triggered from several places : create a new Treatment, update a Treatment, delete a Treatment, click the sync button
- Removed UIAlertController with result from NightScoutSync. It should always succeed. It's like uploading BgReading's.
- removed file TextsNightScoutTestResult.swift, seems not used
- in TreatmentNSResponse: matchesTreatmentEntry changed : check on date didn't work, not it compares date in milliseconds, that works.
- removed/changed some var's , coreDataManager for example which is now Implicitly Unwrapped Optionals, in stead of optional. This is something which could be improved throughout the project
- after download form NS : check if existing treatments are updated, and if so update locally
- delete treatments at NS : treatments deleted on the app are not permenanetly deleted from coredata, but there's a new attribute "treatmentDeleted" which is set to true. Which means will not be shown in table. It's needed to keep track of deletions at NS
2022-03-02 00:12:01 +01:00
Johan Degraeve b5e3306ad3 NightScout upload, restrict upload to 300 readings to avoid exceeding size limit of 102400 2021-03-04 23:00:50 +01:00
Johan Degraeve e41d95bf2c restrict readings to Loop, Nightscout, Dexcom Share, healthkit, etc.. to 1 reading - specificially important for Libre 2 as this one gives a reading every minute 2020-12-19 10:58:11 +01:00
Johan Degraeve 710932352b fix #80 - improvements nightscout settings
- a new row in the NightScout settings which allow to test the url and api key
- by default set url https://yoursitename.herokuapp.com
2020-04-09 23:53:37 +02:00
Johan Degraeve 8ba5f328de M5Stack settings screens 2019-09-19 23:54:15 +02:00