-
Notifications
You must be signed in to change notification settings - Fork 348
Calibration
The algorithms folder has protocols and classes which define the Calibration. Only algorithms, no data storage.
Also no read of access to data defined in other classes, the necessary data is passed when calling the functions.
For a new type of Sensor (only Libre and Dexcom at the moment), a new class needs to be created that conforms to the protocol CalibratorProtocol and then defines only the variables sParams and ageAdjustMentNeeded.
To use the CalibratorProtocol, the functions are initialCalibration, createNewBgReading, createNewCalibration
protocol CalibratorProtocol
Defines variables en functions.
The variables need to be adopted by class that conform to the protocol.
The variables are typical sensor type depenent :
-
var sParams:SlopeParameters{get}
//this variable defines sParams for type of sensor
-
var ageAdjustMentNeeded:Bool{get}
//age adjustment needed or not, which is not the case for Libre
extension CalibratorProtocol
The functions in the protocol are implemented in the extension CalibratorProtocol:
- initialCalibration
- createNewBgReading
- createNewCalibration