Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/0.2.6 #186

Merged
merged 25 commits into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Config.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APP_DISPLAY_NAME = FreeAPS X
BUILD_VERSION = 0.2.5
BUILD_VERSION = 0.2.6
DEVELOPER_TEAM = ##TEAM_ID##
BUNDLE_IDENTIFIER = ru.artpancreas.$(DEVELOPMENT_TEAM).FreeAPS
APP_GROUP_ID = group.com.$(DEVELOPMENT_TEAM).loopkit.LoopGroup
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ public struct SensorData: Codable {

var humanReadableSensorAge: String {
let days = TimeInterval(minutesSinceStart * 60) / aday
return String(format: "%.2f", days) + " day(s)"
return String(format: "%.2f", days) + NSLocalizedString(" day(s)", comment: "Sensor day(s)")
}

var humanReadableTimeLeft: String {
let days = TimeInterval(minutesLeft * 60) / aday
return String(format: "%.2f", days) + " day(s)"
return String(format: "%.2f", days) + NSLocalizedString(" day(s)", comment: "Sensor day(s)")
}

var toJson: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ extension LibreTransmitterManager {
let aday = 86_400.0 //in seconds
var humanReadableSensorAge: String {
let days = TimeInterval(bleData.age * 60) / aday
return String(format: "%.2f", days) + " day(s)"
return String(format: "%.2f", days) + NSLocalizedString(" day(s)", comment: "Sensor day(s)")
}


Expand All @@ -273,7 +273,7 @@ extension LibreTransmitterManager {

var humanReadableTimeLeft: String {
let days = TimeInterval(minutesLeft * 60) / aday
return String(format: "%.2f", days) + " day(s)"
return String(format: "%.2f", days) + NSLocalizedString(" day(s)", comment: "Sensor day(s)")
}

//once the sensor has ended we don't know the exact date anymore
Expand Down Expand Up @@ -447,7 +447,7 @@ extension LibreTransmitterManager {
glucose += LibreGlucose.fromHistoryMeasurements(sortedHistory, nativeCalibrationData: calibrationData)
}*/

let newGlucose = glucosesToSamplesFilter(glucose, startDate: getStartDateForFilter())
var newGlucose = glucosesToSamplesFilter(glucose, startDate: getStartDateForFilter())

if newGlucose.isEmpty {
self.countTimesWithoutData &+= 1
Expand All @@ -459,6 +459,10 @@ extension LibreTransmitterManager {

//todo: predictions also for libre2 bluetooth data
//self.latestPrediction = prediction?.first
var predictions: [LibreGlucose] = []

overcalibrate(entries: &newGlucose, prediction: &predictions)

self.setObservables(sensorData: nil, bleData: bleData, metaData: device)

self.logger.debug("dabear:: handleGoodReading returned with \(newGlucose.count) entries")
Expand Down Expand Up @@ -638,6 +642,12 @@ extension LibreTransmitterManager {
entries += LibreGlucose.fromHistoryMeasurements(history, nativeCalibrationData: calibration)
}

overcalibrate(entries: &entries, prediction: &prediction)

return (glucose: entries, prediction: prediction)
}

private func overcalibrate(entries: inout [LibreGlucose], prediction: inout [LibreGlucose]) {
// overcalibrate
var overcalibration: ((Double) -> (Double))? = nil
delegateQueue.sync { overcalibration = cgmManagerDelegate?.overcalibration(for: self) }
Expand All @@ -654,8 +664,6 @@ extension LibreTransmitterManager {
entries = overcalibrate(entries: entries)
prediction = overcalibrate(entries: prediction)
}

return (glucose: entries, prediction: prediction)
}

public func handleGoodReading(data: SensorData?, _ callback: @escaping (LibreError?, GlucoseArrayWithPrediction?) -> Void) {
Expand Down

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions Dependencies/LoopKit/LoopKit/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* Describes a certain bolus failure (1: size of the bolus in units) */
"%1$@ U bolus failed" = "Échec de bolus de %1$@ U";
"%1$@ U bolus failed" = "Échec du bolus de %1$@ U";

/* Describes an uncertain bolus failure (1: size of the bolus in units) */
"%1$@ U bolus may not have succeeded" = "Le bolus de %1$@ U a peut-être échou";
"%1$@ U bolus may not have succeeded" = "Le bolus de %1$@ U a peut-être échoué";

/* The error description describing when Health sharing was denied */
"Authorization Denied" = "Autorisation refusée";
Expand Down
Loading