allow Libre 3 heartbeat to use other sources (L2 etc)
- also comment out Nightscout treatment sync in RVC as still causing crashes
This commit is contained in:
parent
f6cbd4a99b
commit
ba8a8f2148
|
@ -97,4 +97,21 @@ class Libre3HeartBeatBluetoothTransmitter: BluetoothTransmitter {
|
|||
|
||||
}
|
||||
|
||||
override func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) {
|
||||
|
||||
trace("didDiscoverCharacteristicsFor for peripheral with name %{public}@, for service with uuid %{public}@", log: log, category: ConstantsLog.categoryHeartBeatLibre3, type: .info, deviceName ?? "'unknown'", String(describing:service.uuid))
|
||||
|
||||
if let error = error {
|
||||
trace(" didDiscoverCharacteristicsFor error: %{public}@", log: log, category: ConstantsLog.categoryBlueToothTransmitter, type: .error , error.localizedDescription)
|
||||
}
|
||||
|
||||
if let characteristics = service.characteristics {
|
||||
for characteristic in characteristics {
|
||||
peripheral.setNotifyValue(true, for: characteristic)
|
||||
}
|
||||
} else {
|
||||
trace(" Did discover characteristics, but no characteristics listed. There must be some error.", log: log, category: ConstantsLog.categoryHeartBeatLibre3, type: .error)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2230,9 +2230,9 @@ final class RootViewController: UIViewController, ObservableObject {
|
|||
@objc private func updateLabelsAndChart(overrideApplicationState: Bool = false, forceReset: Bool = false) {
|
||||
|
||||
// TODO: Still crashing here...
|
||||
DispatchQueue.main.async {
|
||||
UserDefaults.standard.nightScoutSyncTreatmentsRequired = true
|
||||
}
|
||||
// DispatchQueue.main.async {
|
||||
// UserDefaults.standard.nightScoutSyncTreatmentsRequired = true
|
||||
// }
|
||||
|
||||
// if glucoseChartManager not nil, then check if panned backward and if so then don't update the chart
|
||||
if let glucoseChartManager = glucoseChartManager {
|
||||
|
|
Loading…
Reference in New Issue