Skip to content

Commit

Permalink
fix oref1 prefs - missing settings
Browse files Browse the repository at this point in the history
also duplicate Exercise Control into autoISF settings
  • Loading branch information
mountrcg committed Nov 29, 2023
1 parent 9c4dec0 commit 78babe9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
21 changes: 20 additions & 1 deletion FreeAPS/Sources/Modules/AutoISF/AutoISFConfStateModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,25 @@ extension AutoISFConf {
comment: "Switch off autoISF with exercise"
),
settable: self
),
Field(
displayName: "Exercise Mode",
type: .boolean(keypath: \.exerciseMode),
infoText: NSLocalizedString(
"Defaults to false. When true, > 100 mg/dL high temp target adjusts sensitivityRatio for exercise mode. Synonym for high_temptarget_raises_sensitivity",
comment: "Exercise Mode"
),
settable: self
),
Field(
displayName: NSLocalizedString("Half Basal Exercise Target", comment: "Half Basal Exercise Target") +
" (mg/dL)",
type: .decimal(keypath: \.halfBasalExerciseTarget),
infoText: NSLocalizedString(
"Set to a number in mg/dl, e.g. 160, which means when TempTarget (TT) is 160 mg/dL and exercise mode = true, it will run 50% basal at this TT level (if high TT at 120 = 75%; 140 = 60%). This can be adjusted, to give you more control over your exercise modes.",
comment: "Half Basal Exercise Target"
),
settable: self
)
]

Expand Down Expand Up @@ -314,7 +333,7 @@ extension AutoISFConf {

sections = [
FieldSection(
displayName: NSLocalizedString("Target Control", comment: "AutoISF control via Targets"),
displayName: NSLocalizedString("Target & Exercise Control", comment: "AutoISF control via Targets"),
fields: autoisfConfig
),
FieldSection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@ extension PreferencesEditor {
),
settable: self
),
Field(
displayName: NSLocalizedString("SMB Interval", comment: "SMB Interval"),
type: .decimal(keypath: \.smbInterval),
infoText: NSLocalizedString(
"Minimum duration in minutes for new SMB since last SMB or manual bolus",
comment: "SMB Interval"
),
settable: self
),
Field(
displayName: NSLocalizedString("Bolus Increment", comment: "Bolus Increment"),
type: .decimal(keypath: \.bolusIncrement),
Expand Down Expand Up @@ -376,16 +385,22 @@ extension PreferencesEditor {

sections = [
FieldSection(
displayName: NSLocalizedString("Temp Target Settings", comment: "Target Control Sports"),
displayName: NSLocalizedString("Target Control Sports", comment: "Target Control Sports"),
fields: quickPrefs
),
FieldSection(
displayName: NSLocalizedString("OpenAPS main settings", comment: "OpenAPS main settings"), fields: mainFields
displayName: NSLocalizedString("OpenAPS main settings", comment: "OpenAPS main settings"),
fields: mainFields
),
FieldSection(
displayName: NSLocalizedString("OpenAPS SMB settings", comment: "OpenAPS main settings"),
fields: smbFields
),
FieldSection(
displayName: NSLocalizedString("OpenAPS targets settings", comment: "OpenAPS targets settings"),
fields: targetSettings
),

FieldSection(
displayName: NSLocalizedString("OpenAPS other settings", comment: "OpenAPS other settings"),
fields: otherSettings
Expand Down

0 comments on commit 78babe9

Please sign in to comment.