Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0fdf10f
Merge pull request #2 from LoopKit/master
Kdisimone Oct 10, 2017
1ee1f7c
Merge pull request #3 from LoopKit/dev
Kdisimone Oct 11, 2017
22980ac
Tweaks for 38mm watch
ps2 Nov 5, 2017
aa89841
Set pending bolus end date
ps2 Nov 13, 2017
5016266
Merge pull request #621 from LoopKit/master
ps2 Dec 5, 2017
337e4d5
Merge pull request #628 from LoopKit/set-pending-bolus-end-date
ps2 Dec 5, 2017
9f6de1e
Merge pull request #620 from LoopKit/38mm-tweaks
ps2 Dec 5, 2017
8b4f061
A few fixes to avoid compile-time warnings (#631)
elnjensen Dec 9, 2017
089360a
Fix logging and set background color
ps2 Dec 9, 2017
302bb40
Fix bolus end date charting
ps2 Dec 9, 2017
bea4d68
spanish translation for Loop
Kdisimone Dec 12, 2017
ef3be83
Merge pull request #4 from LoopKit/dev
Kdisimone Dec 13, 2017
a40da20
Merge pull request #638 from LoopKit/fix-bolus-end-date-charting
ps2 Dec 13, 2017
e10eff6
Merge pull request #637 from LoopKit/fix-logging
ps2 Dec 13, 2017
6453d5c
Add active insulin (IOB) value in Today widget (#635)
elnjensen Dec 13, 2017
9146f84
Update to LoopKit 1.5.2 and Swiftcharts 0.6.1
ps2 Dec 13, 2017
b935907
Merge pull request #640 from Kdisimone/spanish
ps2 Dec 13, 2017
56fd9e7
Merge pull request #639 from LoopKit/update-loopkit
ps2 Dec 13, 2017
32c9648
Merge pull request #6 from LoopKit/dev
Kdisimone Dec 14, 2017
6f5b030
testing russian redo
Kdisimone Dec 14, 2017
d305148
Merge pull request #643 from Kdisimone/test-russian
ps2 Dec 19, 2017
6f3a0e0
Update LoopKit to v1.5.3
ps2 Dec 19, 2017
ca1377d
Fetch pump data if needed, even after .noData CGM updates.
ps2 Dec 19, 2017
1cbf199
Merge pull request #646 from LoopKit/update-loopkit
ps2 Dec 19, 2017
07d7281
Merge pull request #647 from LoopKit/pump-data-fetch-fix
ps2 Dec 19, 2017
0792391
Bump version in prep for release
ps2 Dec 20, 2017
86f85bc
Merge pull request #649 from LoopKit/bump-version
ps2 Dec 20, 2017
a9a3007
Merge pull request #650 from LoopKit/dev
ps2 Dec 21, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode9.1
osx_image: xcode9.2
# xcode_sdk: iphonesimulator11
# xcode_project: Loop.xcodeproj
# xcode_scheme: Loop
Expand Down
4 changes: 2 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github "LoopKit/LoopKit" == 1.5.1
github "LoopKit/LoopKit" == 1.5.3
github "LoopKit/xDripG5" ~> 0.8.1
github "i-schuetz/SwiftCharts" "master"
github "i-schuetz/SwiftCharts" == 0.6.1
github "mddub/dexcom-share-client-swift" == 0.4.1
github "mddub/G4ShareSpy" == 0.3.3
github "ps2/rileylink_ios" == 1.2.2
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "LoopKit/LoopKit" "v1.5.1"
github "LoopKit/LoopKit" "v1.5.3"
github "LoopKit/xDripG5" "v0.8.1"
github "amplitude/Amplitude-iOS" "v3.14.1"
github "i-schuetz/SwiftCharts" "6b55a26a7b0b95e49202ddc1db5404702fce114f"
Expand Down
16 changes: 8 additions & 8 deletions Carthage/Build/.LoopKit.version

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/CarbKit.framework/Assets.car
Binary file not shown.
Binary file modified Carthage/Build/iOS/CarbKit.framework/CarbKit
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/CarbKit.framework/DatePickerTableViewCell.nib
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/CarbKit.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/GlucoseKit.framework/GlucoseKit
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/GlucoseKit.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/InsulinKit.framework/Info.plist
Binary file not shown.
Binary file modified Carthage/Build/iOS/InsulinKit.framework/InsulinKit
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file modified Carthage/Build/iOS/LoopKit.framework/Assets.car
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/LoopKit.framework/Info.plist
Binary file not shown.
Binary file modified Carthage/Build/iOS/LoopKit.framework/LoopKit
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/LoopKit.framework/TextFieldTableViewCell.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 5 additions & 1 deletion Common/Models/StatusExtensionContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,15 @@ extension DatedRangeContext: RawRepresentable {

struct StatusExtensionContext: RawRepresentable {
typealias RawValue = [String: Any]
private let version = 3
private let version = 4

var glucose: [GlucoseContext]?
var predictedGlucose: PredictedGlucoseContext?
var reservoir: ReservoirContext?
var loop: LoopContext?
var netBasal: NetBasalContext?
var batteryPercentage: Double?
var activeInsulin: Double?
var targetRanges: [DatedRangeContext]?
var temporaryOverride: DatedRangeContext?
var sensor: SensorDisplayableContext?
Expand Down Expand Up @@ -307,6 +308,8 @@ struct StatusExtensionContext: RawRepresentable {

batteryPercentage = rawValue["batteryPercentage"] as? Double

activeInsulin = rawValue["activeInsulin"] as? Double

if let rawValue = rawValue["targetRanges"] as? [DatedRangeContext.RawValue] {
targetRanges = rawValue.flatMap({return DatedRangeContext(rawValue: $0)})
}
Expand All @@ -331,6 +334,7 @@ struct StatusExtensionContext: RawRepresentable {
raw["loop"] = loop?.rawValue
raw["netBasal"] = netBasal?.rawValue
raw["batteryPercentage"] = batteryPercentage
raw["activeInsulin"] = activeInsulin
raw["targetRanges"] = targetRanges?.map({return $0.rawValue})
raw["temporaryOverride"] = temporaryOverride?.rawValue
raw["sensor"] = sensor?.rawValue
Expand Down
2 changes: 1 addition & 1 deletion DoseMathTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.5.1dev</string>
<string>1.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
1 change: 1 addition & 0 deletions DoseMathTests/es.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* No Localized Strings */
15 changes: 15 additions & 0 deletions DoseMathTests/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* Message when offering bolus recommendation even though bg is below range. (1: glucose value) */
"Current glucose of %1$@ is below correction range." = "Glucosa actual de %1$@ está debajo del rango correctivo.";

/* Message when offering bolus recommendation even though bg is below range and minBG is in future. (1: glucose time)(2: glucose number) */
"Predicted glucose at %1$@ is %2$@." = "Glucosa proyectada en %1$@ es %2$@.";

/* Notice message when recommending bolus when BG is below the suspend threshold. (1: glucose value) */
"Predicted glucose of %1$@ is below your suspend threshold setting." = "Glucosa proyectada de %1$@ se encuentra debajo de tu nivel de suspensión.";

/* Format string for combining localized numeric value and unit. (1: numeric value)(2: unit) */
"QUANTITY_VALUE_AND_UNIT" = "%1$@ %2$@";

/* The unit display string for millimoles of glucose per liter */
"mmol/L" = "mmol/L";

1 change: 1 addition & 0 deletions DoseMathTests/ru.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* No Localized Strings */
15 changes: 15 additions & 0 deletions DoseMathTests/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* Message when offering bolus recommendation even though bg is below range. (1: glucose value) */
"Current glucose of %1$@ is below correction range." = " Текущая гликемия %1$@ ниже диапазона коррекции";

/* Message when offering bolus recommendation even though bg is below range and minBG is in future. (1: glucose time)(2: glucose number) */
"Predicted glucose at %1$@ is %2$@." = "Предсказываемая гликемия в %1$@ - %2$@.";

/* Notice message when recommending bolus when BG is below the suspend threshold. (1: glucose value) */
"Predicted glucose of %1$@ is below your suspend threshold setting." = "Предсказываемая гликемия %1$@ ниже установленного вами порога приостановки помпы";

/* Format string for combining localized numeric value and unit. (1: numeric value)(2: unit) */
"QUANTITY_VALUE_AND_UNIT" = "%1$@ %2$@";

/* The unit display string for millimoles of glucose per liter */
"mmol/L" = "ммоль/л";

20 changes: 17 additions & 3 deletions Loop Status Extension/Base.lproj/MainInterface.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G24b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="64E-I5-5c4">
<device id="retina4_7" orientation="portrait">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="64E-I5-5c4">
<device id="retina5_5" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -42,11 +42,24 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" layoutMarginsFollowReadableWidth="YES" text="IOB 1.0 U" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UPi-dG-yYD">
<rect key="frame" x="8" y="0.0" width="343" height="50"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="40" id="Va8-zN-Zxc"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="UPi-dG-yYD" firstAttribute="leading" secondItem="9iF-xY-Bh4" secondAttribute="leading" id="7Jj-0n-7D1"/>
<constraint firstItem="UPi-dG-yYD" firstAttribute="bottom" secondItem="9iF-xY-Bh4" secondAttribute="bottom" id="GsE-4E-FbA"/>
<constraint firstItem="9iF-xY-Bh4" firstAttribute="top" secondItem="3n2-yC-jGi" secondAttribute="top" id="HSD-ba-SBR"/>
<constraint firstAttribute="bottom" secondItem="9iF-xY-Bh4" secondAttribute="bottom" id="LtS-Ct-5Wl"/>
<constraint firstItem="UPi-dG-yYD" firstAttribute="height" secondItem="9iF-xY-Bh4" secondAttribute="height" id="Qa0-KT-ozH"/>
<constraint firstItem="9iF-xY-Bh4" firstAttribute="leading" secondItem="3n2-yC-jGi" secondAttribute="leading" constant="8" id="cIA-WI-DT4"/>
<constraint firstAttribute="trailing" secondItem="UPi-dG-yYD" secondAttribute="trailing" constant="8" id="uU7-uQ-0lP"/>
<constraint firstAttribute="trailing" secondItem="9iF-xY-Bh4" secondAttribute="trailing" constant="8" id="x9b-EB-fji"/>
</constraints>
</view>
Expand Down Expand Up @@ -76,6 +89,7 @@
<connections>
<outlet property="glucoseChartContentView" destination="GVu-hk-PBg" id="gfZ-nx-P6V"/>
<outlet property="hudView" destination="VIh-8L-VsB" id="NsP-iq-J4a"/>
<outlet property="insulinLabel" destination="UPi-dG-yYD" id="mhC-fv-uD4"/>
<outlet property="subtitleLabel" destination="9iF-xY-Bh4" id="PM8-hd-IB3"/>
</connections>
</viewController>
Expand Down
2 changes: 1 addition & 1 deletion Loop Status Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.5.1dev</string>
<string>1.5.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>AppGroupIdentifier</key>
Expand Down
28 changes: 27 additions & 1 deletion Loop Status Extension/StatusViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class StatusViewController: UIViewController, NCWidgetProviding {
}
}
@IBOutlet weak var subtitleLabel: UILabel!
@IBOutlet weak var insulinLabel: UILabel!
@IBOutlet weak var glucoseChartContentView: LoopUI.ChartContainerView!

private lazy var charts: StatusChartsManager = {
Expand Down Expand Up @@ -65,6 +66,8 @@ class StatusViewController: UIViewController, NCWidgetProviding {
super.viewDidLoad()
subtitleLabel.isHidden = true
subtitleLabel.textColor = .subtitleLabelColor
insulinLabel.isHidden = true
insulinLabel.textColor = .subtitleLabelColor

let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(openLoopApp(_:)))
view.addGestureRecognizer(tapGestureRecognizer)
Expand Down Expand Up @@ -166,6 +169,7 @@ class StatusViewController: UIViewController, NCWidgetProviding {
}

subtitleLabel.isHidden = true
insulinLabel.isHidden = true

let dateFormatter: DateFormatter = {
let dateFormatter = DateFormatter()
Expand All @@ -175,7 +179,25 @@ class StatusViewController: UIViewController, NCWidgetProviding {
return dateFormatter
}()

let insulinFormatter: NumberFormatter = {
let numberFormatter = NumberFormatter()

numberFormatter.numberStyle = .decimal
numberFormatter.minimumFractionDigits = 1
numberFormatter.maximumFractionDigits = 1

return numberFormatter
}()

if let activeInsulin = context.activeInsulin, let valueStr = insulinFormatter.string(from:NSNumber(value:activeInsulin))
{
insulinLabel.text = String(format: NSLocalizedString(
"IOB %1$@ U",
comment: "The subtitle format describing units of active insulin. (1: localized insulin value description)"),
valueStr)
insulinLabel.isHidden = false
}

if let glucose = context.glucose,
glucose.count > 0 {
let unit = glucose[0].unit
Expand All @@ -193,6 +215,10 @@ class StatusViewController: UIViewController, NCWidgetProviding {
if let first = glucose.first {
charts.startDate = first.startDate
}

// Showing the whole history plus full prediction in the glucose plot
// is a little crowded, so limit it to three hours in the future:
charts.maxEndDate = Date().addingTimeInterval(TimeInterval(hours: 3))

if let predictedGlucose = context.predictedGlucose?.samples {
charts.predictedGlucosePoints = predictedGlucose.map {
Expand All @@ -209,7 +235,7 @@ class StatusViewController: UIViewController, NCWidgetProviding {
subtitleLabel.text = String(
format: NSLocalizedString(
"Eventually %1$@ %2$@",
comment: "The subtitle format describing eventual glucose. (1: localized glucose value description) (2: localized glucose units description)"),
comment: "The subtitle format describing eventual glucose. (1: localized glucose value description) (2: localized glucose units description)"),
eventualGlucoseNumberString,
unit.glucoseUnitDisplayString
)
Expand Down
6 changes: 6 additions & 0 deletions Loop Status Extension/es.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* (No Comment) */
"CFBundleDisplayName" = "Loop";

/* (No Comment) */
"CFBundleName" = "$(PRODUCT_NAME)";

12 changes: 12 additions & 0 deletions Loop Status Extension/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* The format string for the app name and version number. (1: bundle name)(2: bundle version) */
"%1$@ v%2$@" = "%1$@ v%2$@";

/* The subtitle format describing eventual glucose. (1: localized glucose value description) (2: localized glucose units description) */
"Eventually %1$@ %2$@" = "Eventualmente %1$@ %2$@";

/* Format string for combining localized numeric value and unit. (1: numeric value)(2: unit) */
"QUANTITY_VALUE_AND_UNIT" = "%1$@ %2$@";

/* The unit display string for millimoles of glucose per liter */
"mmol/L" = "mmol/L";

3 changes: 3 additions & 0 deletions Loop Status Extension/es.lproj/MainInterface.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* Class = "UILabel"; text = "Eventually 92 mg/dL"; ObjectID = "9iF-xY-Bh4"; */
"9iF-xY-Bh4.text" = "Eventualmente 92 mg/dL";

1 change: 1 addition & 0 deletions Loop Status Extension/ru.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* No Localized Strings */
12 changes: 12 additions & 0 deletions Loop Status Extension/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* The format string for the app name and version number. (1: bundle name)(2: bundle version) */
"%1$@ v%2$@" = "%1$@ v%2$@";

/* The subtitle format describing eventual glucose. (1: localized glucose value description) (2: localized glucose units description) */
"Eventually %1$@ %2$@" = "В конечном итоге %1$@ %2$@";

/* Format string for combining localized numeric value and unit. (1: numeric value)(2: unit) */
"QUANTITY_VALUE_AND_UNIT" = "%1$@ %2$@";

/* The unit display string for millimoles of glucose per liter */
"mmol/L" = "ммоль/л";

6 changes: 6 additions & 0 deletions Loop Status Extension/ru.lproj/MainInterface.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* Class = "UILabel"; text = "Eventually 92 mg/dL"; ObjectID = "9iF-xY-Bh4"; */
"9iF-xY-Bh4.text" = "в конечном итоге 92 мг/дл";

/* Class = "UILabel"; text = "IOB 1.0 U"; ObjectID = "UPi-dG-yYD"; */
"UPi-dG-yYD.text" = "IOB 1.0 U";

Loading