Skip to content

Commit

Permalink
Release 6.0.0
Browse files Browse the repository at this point in the history
* Bug fixes and SwiftUI optimization. Minimum iOS 17 now required.

* Added the optional algorithm Auto ISF, which adapts your ISF based on your glucose history. Based on gazelle's AAPS Auto ISF 3.0.1, but with code refactored and easier to read and code put in separate module.

The Auto ISF code is contained in a separate module and open layer of iAPS, run before the vanilla oref0, like a middleware, making it easy to review, maintain and test, while keeping it insulated from the core vanilla  oref0 code.

All of the added Auto ISF  JavaScript code is open and unminimized (readable), residing in the two auto isf files: iAPS/FreeAPS/Resources/javascript/autoisf/autoisf.js and /iAPS/FreeAPS/Resources/javascript/autoisf/glucose-get-last-autoisf.js, only run in the Auto ISF layer, when using Auto ISF.

Like before iAPS is using the stable, well tested vanilla oref0 code https://github.com/openaps/oref0.git for the core algorithm (oref0).

Thank you @yurique for some of the improvements to the original Auto isf 3.0.1 in the form of an improved calculation of glucose averages and a fix for not treating good glucose values (at target) as plateaued. Thank you also for all the testing and issue resolving.

Other features differing from gazelle's's Auto ISF is the addition of B30 and the Keto protection.
* B30 is an option to enact a high temporary basal after a meal to reduce/remove the postprandial glucose spike.
* Keto protection is an option to enact a small temporary basal whenever you have negative insulin over 60 basalminutes to reduce the production of ketone bodies.

Even more iAPS updates in the form of
* An optional Chart for iAPS Live activty, by @yurique.
* New pump graphics in Home View for MDT and Dana pumps, dynamically illustrated with the insulin remaining in reservoir.
* Whenever insulin reservoar < 15 % the insulin turns red.
* New overrides for all the new Auto ISF settings, allowing for all sorts of overrides, shortcuts and automation.
* New override option to only adjust ISF, CR or Basal insulin.
* All settings in iAPS can now be entered with user-preferred glucose unit.
* New testing script for testing of the  OpenAPSManager. This script can also be used to test various new algorithms and oref0 suggestions.
* And much more!

A big thank you to all Crowdin translators for your contribution.

Co-authored-by: yurique <[email protected]>
  • Loading branch information
Jon-b-m and yurique authored Jan 29, 2025
1 parent 3de8110 commit 14bfff2
Show file tree
Hide file tree
Showing 134 changed files with 10,176 additions and 1,450 deletions.
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 = iAPS
APP_VERSION = 5.8.0
APP_VERSION = 6.0.0
APP_BUILD_NUMBER = 1
COPYRIGHT_NOTICE =
DEVELOPER_TEAM = ##TEAM_ID##
Expand Down
43 changes: 43 additions & 0 deletions Core_Data.xcdatamodeld/Core_Data.xcdatamodel/contents
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@
<attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="name" optional="YES" attributeType="String"/>
</entity>
<entity name="Auto_ISF" representedClassName="Auto_ISF" syncable="YES" codeGenerationType="class">
<attribute name="autoisf" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="autoisf_max" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="autoisf_min" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="autoISFhourlyChange" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="b30_duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="b30factor" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="b30targetLevel" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="b30upperdelta" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="b30upperLimit" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="bgAccelISFweight" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="bgBrakeISFweight" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="enableBGacceleration" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="higherISFrangeWeight" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="id" optional="YES" attributeType="String"/>
<attribute name="iobThresholdPercent" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="iTime_Start_Bolus" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="iTime_target" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="ketoProtect" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="ketoProtectAbsolut" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="ketoProtectBasalAbsolut" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="ketoProtectBasalPercent" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="lowerISFrangeWeight" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="postMealISFweight" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="smbDeliveryRatioBGrange" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="smbDeliveryRatioMax" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="smbDeliveryRatioMin" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="use_B30" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="variableKetoProtect" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<relationship name="overrides" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Override" inverseName="autoISF" inverseEntity="Override"/>
</entity>
<entity name="Carbohydrates" representedClassName="Carbohydrates" syncable="YES" codeGenerationType="class">
<attribute name="carbs" optional="YES" attributeType="Decimal" defaultValueString="0"/>
<attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
Expand Down Expand Up @@ -67,6 +99,7 @@
</entity>
<entity name="Override" representedClassName="Override" syncable="YES" codeGenerationType="class">
<attribute name="advancedSettings" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
<attribute name="basal" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
<attribute name="cr" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
<attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
Expand All @@ -78,6 +111,7 @@
<attribute name="isfAndCr" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
<attribute name="isPreset" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
<attribute name="maxIOB" optional="YES" attributeType="Decimal" defaultValueString="0"/>
<attribute name="overrideAutoISF" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="overrideMaxIOB" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="percentage" optional="YES" attributeType="Double" defaultValueString="100" usesScalarValueType="YES"/>
<attribute name="smbIsAlwaysOff" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
Expand All @@ -86,6 +120,7 @@
<attribute name="start" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="100"/>
<attribute name="uamMinutes" optional="YES" attributeType="Decimal" defaultValueString="30"/>
<relationship name="autoISF" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Auto_ISF" inverseName="overrides" inverseEntity="Auto_ISF"/>
</entity>
<entity name="OverrideHistory" representedClassName="OverrideHistory" syncable="YES" codeGenerationType="class">
<attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
Expand All @@ -94,6 +129,7 @@
</entity>
<entity name="OverridePresets" representedClassName="OverridePresets" syncable="YES" codeGenerationType="class">
<attribute name="advancedSettings" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
<attribute name="basal" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
<attribute name="cr" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
<attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
Expand All @@ -105,6 +141,7 @@
<attribute name="isfAndCr" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
<attribute name="maxIOB" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="name" optional="YES" attributeType="String"/>
<attribute name="overrideAutoISF" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="overrideMaxIOB" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
<attribute name="percentage" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<attribute name="smbIsAlwaysOff" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
Expand Down Expand Up @@ -146,10 +183,16 @@
<attribute name="cr" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="date" optional="YES" attributeType="Date" defaultDateTimeInterval="737559660" usesScalarValueType="NO"/>
<attribute name="eventualBG" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="glucose" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="insulinReq" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="iob" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="isf" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="minPredBG" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="mmol" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="rate" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="ratio" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="reasons" optional="YES" attributeType="String" defaultValueString="empty"/>
<attribute name="smb" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
<attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
</entity>
<entity name="StatsData" representedClassName="StatsData" syncable="YES" codeGenerationType="class">
Expand Down
2 changes: 1 addition & 1 deletion Dependencies/G7SensorKit/vi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"Searching for\nSensor" = "Đang tìm kiếm\ncảm biến";

/* G7 Status highlight text for sensor expired */
"Sensor\nExpired" = "Sensor\n hết hạn";
"Sensor\nExpired" = "Cảm biến\nđã hết hạn";

/* G7 Status highlight text for signal loss */
"Sensor\nFailed" = "Sensor\n thất bại";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct NotificationSettingsView: View {
favoriteGlucoseUnit = glucoseSegments.firstIndex(of: glucoseUnit) ?? 0
}
.onChange(of: favoriteGlucoseUnit){ newValue in
let newUnit = glucoseSegments[newValue]
let newUnit = glucoseSegments[favoriteGlucoseUnit]
if newUnit == HKUnit.milligramsPerDeciliter {
mmGlucoseUnit = "mgdl"
} else if newUnit == HKUnit.millimolesPerLiter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"%1$@%2$@%3$@" = "%1$@%2$@%3$@";

/* Text indicating ongoing pump time synchronization */
"Adjusting Pump Time..." = "Adjusting Pump Time...";
"Adjusting Pump Time..." = "جاري ضبط وقت المضخة...";

/* Instructions on selecting battery chemistry type */
"Alkaline and Lithium batteries decay at differing rates. Alkaline tend to have a linear voltage drop over time whereas lithium cell batteries tend to maintain voltage until halfway through their lifespan. Under normal usage in a Non-MySentry compatible Minimed (x22/x15) insulin pump running Loop, Alkaline batteries last approximately 4 to 5 days. Lithium batteries last between 1-2 weeks. This selection will use different battery voltage decay rates for each of the battery chemistry types and alert the user when a battery is approximately 8 to 10 hours from failure." = "البطاريات القلوية والبطاريات الليثيومية تتحلل بمعدلات مختلفة. عادةً ما يكون للبطاريات القلوية انخفاض تدريجي ومستمر في الجهد الكهربائي مع مرور الوقت، بينما تحافظ بطاريات الليثيوم على الجهد الكهربائي حتى تصل إلى منتصف عمرها الافتراضي. في مضخات الأنسولين من طراز Minimed (x22/x15) غير المتوافقة مع MySentry والتي تعمل بنظام Loop، تدوم البطاريات القلوية لمدة تتراوح بين 4 إلى 5 أيام تقريبًا تحت الاستخدام العادي. بينما تدوم بطاريات الليثيوم من أسبوع إلى أسبوعين. سيقوم هذا الاختيار باستخدام معدلات تحلل الجهد المختلفة لكل نوع من أنواع البطاريات وينبه المستخدم عندما تكون البطارية على وشك النفاد، أي قبل حوالي 8 إلى 10 ساعات من الفشل.";
Expand Down Expand Up @@ -120,7 +120,7 @@
"No response" = "لا يوجد استجابة";

/* Button text to cancel pump time sync */
"No, Keep Pump As Is" = "No, Keep Pump As Is";
"No, Keep Pump As Is" = "لا، إبقاء المضخة كما هي";

/* Pump find device instruction */
"On your pump, go to the Find Device screen and select \"Find Device\".\n\nMain Menu >\nUtilities >\nConnect Devices >\nOther Devices >\nOn >\nFind Device" = "في المضخة الخاصة بك، انتقل إلى شاشة العثور على الجهاز وحدد \"العثور على الجهاز\".\n\nالقائمة الرئيسية >\nالأدوات >\nتوصيل الأجهزة >\nأجهزة أخرى >\nعلى >\nالعثور على الأجهزة";
Expand All @@ -140,7 +140,7 @@
"Pump ID" = "ID المضخة";

/* The title of the command to change pump time zone */
"Pump Time" = "Pump Time";
"Pump Time" = "وقت المضخة";

/* Progress message for reading basal schedule */
"Reading basal schedule…" = "قراءة جدول الجرعة الأساسية…";
Expand Down Expand Up @@ -176,7 +176,7 @@
"Succeeded" = "Succeeded";

/* Title text for button to suspend insulin delivery */
"Suspend Delivery" = "Suspend Delivery";
"Suspend Delivery" = "إيقاف التوصيل مؤقتًا";

/* The format string describing pump suspended state: (1: suspended) */
"Suspended: %1$@\n" = "معلقة: %1$@\n";
Expand All @@ -185,10 +185,10 @@
"Suspending" = "تعليق";

/* The title of the command to change pump time zone */
"Sync to Current Time" = "Sync to Current Time";
"Sync to Current Time" = "المزامنة مع الوقت الحالي";

/* Message for pod sync time action sheet */
"The time on your pump is different from the current time. Do you want to update the time on your pump to the current time?" = "The time on your pump is different from the current time. Do you want to update the time on your pump to the current time?";
"The time on your pump is different from the current time. Do you want to update the time on your pump to the current time?" = "الوقت في مضختك مختلف عن الوقت الحالي. هل ترغب في تحديث الوقت في مضختك ليتوافق مع الوقت الحالي؟";

/* Title for pod sync time action sheet. */
"Time Change Detected" = "تم اكتشاف تغيير في الوقت";
Expand Down Expand Up @@ -217,4 +217,4 @@
"Yes" = "نعم";

/* Button text to confirm pump time sync */
"Yes, Sync to Current Time" = "Yes, Sync to Current Time";
"Yes, Sync to Current Time" = "نعم، المزامنة مع الوقت الحالي";
Loading

0 comments on commit 14bfff2

Please sign in to comment.