|
|
@@ -11,7 +11,7 @@ protocol FetchGlucoseManager: SourceInfoProvider {
|
|
|
func updateGlucoseSource(cgmGlucoseSourceType: CGMType, cgmGlucosePluginId: String, newManager: CGMManagerUI?)
|
|
|
func deleteGlucoseSource() async
|
|
|
func removeCalibrations()
|
|
|
- var glucoseSource: GlucoseSource! { get }
|
|
|
+ var glucoseSource: GlucoseSource? { get }
|
|
|
var cgmManager: CGMManagerUI? { get }
|
|
|
var cgmGlucoseSourceType: CGMType { get set }
|
|
|
var cgmGlucosePluginId: String { get }
|
|
|
@@ -113,7 +113,7 @@ final class BaseFetchGlucoseManager: FetchGlucoseManager, Injectable {
|
|
|
timer.resume()
|
|
|
}
|
|
|
|
|
|
- var glucoseSource: GlucoseSource!
|
|
|
+ var glucoseSource: GlucoseSource?
|
|
|
|
|
|
func removeCalibrations() {
|
|
|
calibrationService.removeAllCalibrations()
|
|
|
@@ -286,7 +286,7 @@ final class BaseFetchGlucoseManager: FetchGlucoseManager, Injectable {
|
|
|
}
|
|
|
|
|
|
func sourceInfo() -> [String: Any]? {
|
|
|
- glucoseSource.sourceInfo()
|
|
|
+ glucoseSource?.sourceInfo()
|
|
|
}
|
|
|
|
|
|
private func overcalibrate(entries: [BloodGlucose]) -> [BloodGlucose] {
|