to avoid adding extra menu lines, use an enum to track the TIR type chosen and allow the user to just chose directly, or cycle through by double-tapping the statistics view
Removed old TIR option based on user-set values in favor of the newer "Time in Tight Range" method.
Two options are now:
- standardized TIR (70-180mg/dL)
- newer TITR (70-140mg/dL)
- https://diatribe.org/time-tight-range-new-diabetes-goal
- added double tap gesture to the statistics view to quickly change between both types.
-
- added transition so that the user is visually shown which limits are changed when changing types
- added localization. Initial translations for EN, ES.
- changed many of the settings menu row descriptions to remove the "?" from them to clean up the look of them.
Removed address from all transmitters
for Dexcom transmitters:
- removed resistance
- removed temperature
- removed runtime
(none of the above add any real value for current transmitters)
Added back the reset transmitter option, changed to specify only for Anubis transmitters and also added an info alert when selected.
Initial translations added: EN, ES
- replaces the old image-based sensor countdown (only for Libre)
- will now work for all CGM systems that report a sensor start date (or sensor age in the case of Libre)
- if no current/valid data is found, the view remains hidden
- currently showing for Libre 2 EU BLE (14.5 days), compatible Libre via external transmitter (14.5 days), Dexcom G5/G6/One (10.0 days) and LibreLinkUp follower (14.0 days)
- starts at 0% progress for 0d and finishes at 100% progress for maxAge as per above line
- To simply UI, sensor countdown options are removed completely
- All maxAge values are in Constants file for easy updating if ever needed
As the row label and text field have different and consistent formats (bold/colour), it can be implicitly seen that a given label applies to a given field/option so there's no real need to use a colon at the end.
By removing the colon from the string, we can also use them for titles etc without it looking strange
Whilst most labels previously had colons, many were missing which can give the UI a confusing look
Update Main.storyboard
- change "Follow Dexcom-app" to "Read from Dexcom app" to avoid confusion with Dexcom Follow
- changes to transmitter/sensor display formats to use Nightscout format and improve clarity
- label changes
- typo correction: disclosureAaccessoryView -> disclosureAccessoryView
- simplified sensor status UIAlert and now includes sensor duration (elapsed time since start) and remaining (time until end date)
- rewrite of NFC scan workflow
- initial scan of NFC-enabled sensors will now *not* initial BLE scanning
- NFC scan logic redone to perform several loops until a successful NFC scan with valid data is hopefully performed
- UI updated to inform user of scan attempts and give much clearer alert messages.
- haptic feedback (vibrations/noise) added to guide user during scan cycles
- a failed NFC scan will now inform the user and offer to immediately scan again. If the user declines the transmitter will be disconnected (if existing) or removed (if adding new)
- BLE Peripheral view should show correct status in connection row if pending NFC scan to continue
- once a valid NFC scan has been performed, the user will be informed and the superclass will be told to start BLE scanning to find the sensor/transmitter. This will avoid trying to connect before a valid NFC is performed
- the scanned sensor serial number is passed back through the delegate to update the expected device name at the same time as BLE scanning is started. This prevents the app from connecting to a different transmitter (i.e. Libre 2).
- when a Libre 2 sensor is disconnected, the active sensor is set to nil. This prevents the countdown from staying on screen with no valid sensor connected.
- as above but the libre1DerivedParameters are also set to nil to prevent an issue that can show very high readings when initially connecting to a new sensor
- related alert messages changed to improve clarity
- translations added for EN/NL/ES/FR/DE/PT/SV
- the different treatment types (insulin, carbs, BG checks) can be filtered if required to show/hide them in the treatment table
- if boluses are shown, an option to filter micro-boluses is also enabled.
- button icon images are set individually as filled/unfilled to more clearly show if they are selected
- .getTreatments call reduced from 100 days to 21 days to save overhead
- previous settings options to show micro-boluses in the treatments table (and associated translations) removed as no longer needed
- use .decimalPad keyboard for insulin entries
- change "New Entry" to "New Treatment" as the idea of a Treatment "Entry" is not intuitive to most users
- minor IB layout changes to enable future new treatment types to fit easily
- connects to firefly and reads readings
- backfilling 6 hours
- sensor start and calibration must be done on the official Dexcom app, afterwards the official Dexcom app (or any other app) should not have access to bluetooth
This is not completely as requested in the issue https://github.com/JohanDegraeve/xdripswift/issues/205
It does allow watch/Libre 2 users to have a new reading every minute.
It also allows all users to have specify the minimum time between to calendar events on the watch, or to have a notification with a reading.
For the notification : an overrule of the interval is done if there's been a dis/reconnect, which means if there was a disconnect/reconnect, the next reading will generate a notification, no matter the value of the interval.
Default value for the interval = 0
For two reasons :
- Dexcom share response is not always giving the right error code, for example if initial value in the settings is done with random account and random password, then Dexcom does not say if it's the account or password that is wrong
- it's simply not secure to say if it was the account or password that is wrong
And moved the string to TextsCommon as it may apply to other providers as well (never know)