Skip to content

Commit ca54031

Browse files
committed
Automatically enable/disable the timer tick based on whether there is a G5 transmitter configured.
This means @channemann doesn't have to modify code any longer. This is key to #10
1 parent 93b6952 commit ca54031

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Loop/Managers/DeviceDataManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,9 @@ class DeviceDataManager: NSObject, CarbStoreDelegate, TransmitterDelegate, WCSes
337337
switch transmitterState {
338338
case .Ready(let transmitter):
339339
transmitter.delegate = self
340+
rileyLinkManager.timerTickEnabled = false
340341
case .NeedsConfiguration:
341-
break
342+
rileyLinkManager.timerTickEnabled = true
342343
}
343344
}
344345
}
@@ -717,7 +718,6 @@ class DeviceDataManager: NSObject, CarbStoreDelegate, TransmitterDelegate, WCSes
717718

718719
super.init()
719720

720-
rileyLinkManager.timerTickEnabled = false
721721
rileyLinkManagerObserver = NSNotificationCenter.defaultCenter().addObserverForName(nil, object: rileyLinkManager, queue: nil) { [weak self] (note) -> Void in
722722
self?.receivedRileyLinkManagerNotification(note)
723723
}

Loop/View Controllers/SettingsTableViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class SettingsTableViewController: UITableViewController, DailyValueScheduleTabl
160160
configCell.textLabel?.text = NSLocalizedString("Pump ID", comment: "The title text for the pump ID config value")
161161
configCell.detailTextLabel?.text = dataManager.pumpID ?? TapToSetString
162162
case .TransmitterID:
163-
configCell.textLabel?.text = NSLocalizedString("Transmitter ID", comment: "The title text for the transmitter ID config value")
163+
configCell.textLabel?.text = NSLocalizedString("G5 Transmitter ID", comment: "The title text for the Dexcom G5 transmitter ID config value")
164164
configCell.detailTextLabel?.text = dataManager.transmitterID ?? TapToSetString
165165
case .BasalRate:
166166
configCell.textLabel?.text = NSLocalizedString("Basal Rates", comment: "The title text for the basal rate schedule")

0 commit comments

Comments
 (0)