Skip to content

Commit

Permalink
Merge pull request #403 from ps2/reconfigure-rl-after-reboot
Browse files Browse the repository at this point in the history
Ensure RileyLink is configured after disconnection
  • Loading branch information
ps2 authored Jun 17, 2018
2 parents 387c9cf + 3b71629 commit 4192083
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RileyLinkKit/PumpOps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public class PumpOps {

NotificationCenter.default.post(name: .DeviceRadioConfigDidChange, object: device)
NotificationCenter.default.addObserver(self, selector: #selector(deviceRadioConfigDidChange(_:)), name: .DeviceRadioConfigDidChange, object: device)
NotificationCenter.default.addObserver(self, selector: #selector(deviceRadioConfigDidChange(_:)), name: .DeviceConnectionStateDidChange, object: device)
configuredDevices.insert(device)
}

Expand All @@ -107,6 +108,7 @@ public class PumpOps {
}

NotificationCenter.default.removeObserver(self, name: .DeviceRadioConfigDidChange, object: device)
NotificationCenter.default.removeObserver(self, name: .DeviceConnectionStateDidChange, object: device)
configuredDevices.remove(device)
}
}
Expand Down

0 comments on commit 4192083

Please sign in to comment.