diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt index fa8c085404..89f394f696 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.kt @@ -588,6 +588,7 @@ class LoopPlugin @Inject constructor( private fun applySMBRequest(request: APSResult, callback: Callback?) { if (!request.bolusRequested()) { + aapsLogger.debug(LTag.APS, "No SMB requested") return } val pump = activePlugin.activePump diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt index a91cf4fe54..80d6728b82 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPlugin.kt @@ -37,7 +37,7 @@ class SafetyPlugin @Inject constructor( private val constraintChecker: ConstraintChecker, private val openAPSAMAPlugin: OpenAPSAMAPlugin, private val openAPSSMBPlugin: OpenAPSSMBPlugin, - private val OpenAPSSMBDynamicISFPlugin: OpenAPSSMBDynamicISFPlugin, + private val openAPSSMBDynamicISFPlugin: OpenAPSSMBDynamicISFPlugin, private val sensitivityOref1Plugin: SensitivityOref1Plugin, private val activePlugin: ActivePlugin, private val hardLimits: HardLimits, @@ -190,12 +190,12 @@ class SafetyPlugin @Inject constructor( override fun applyMaxIOBConstraints(maxIob: Constraint): Constraint { val apsMode = sp.getString(R.string.key_aps_mode, "open") - val maxIobPref: Double = if (openAPSSMBPlugin.isEnabled() || OpenAPSSMBDynamicISFPlugin.isEnabled()) sp.getDouble(R.string.key_openapssmb_max_iob, 3.0) else sp.getDouble(R.string + val maxIobPref: Double = if (openAPSSMBPlugin.isEnabled() || openAPSSMBDynamicISFPlugin.isEnabled()) sp.getDouble(R.string.key_openapssmb_max_iob, 3.0) else sp.getDouble(R.string .key_openapsma_max_iob, 1.5) maxIob.setIfSmaller(aapsLogger, maxIobPref, rh.gs(R.string.limitingiob, maxIobPref, rh.gs(R.string.maxvalueinpreferences)), this) if (openAPSAMAPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobAMA(), rh.gs(R.string.limitingiob, hardLimits.maxIobAMA(), rh.gs(R.string.hardlimit)), this) if (openAPSSMBPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), rh.gs(R.string.limitingiob, hardLimits.maxIobSMB(), rh.gs(R.string.hardlimit)), this) - if (OpenAPSSMBDynamicISFPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), rh.gs(R.string.limitingiob, hardLimits.maxIobSMB(), rh.gs(R.string.hardlimit)), this) + if (openAPSSMBDynamicISFPlugin.isEnabled()) maxIob.setIfSmaller(aapsLogger, hardLimits.maxIobSMB(), rh.gs(R.string.limitingiob, hardLimits.maxIobSMB(), rh.gs(R.string.hardlimit)), this) if (apsMode == "lgs") maxIob.setIfSmaller(aapsLogger, HardLimits.MAX_IOB_LGS, rh.gs(R.string.limitingiob, HardLimits.MAX_IOB_LGS, rh.gs(R.string.lowglucosesuspend)), this) return maxIob } diff --git a/app/src/main/java/info/nightscout/androidaps/skins/SkinInterface.kt b/app/src/main/java/info/nightscout/androidaps/skins/SkinInterface.kt index 3ef7501ae4..2e338955d5 100644 --- a/app/src/main/java/info/nightscout/androidaps/skins/SkinInterface.kt +++ b/app/src/main/java/info/nightscout/androidaps/skins/SkinInterface.kt @@ -17,6 +17,7 @@ interface SkinInterface { val mainGraphHeight: Int // in dp val secondaryGraphHeight: Int // in dp + // no pre processing by default fun preProcessLandscapeActionsLayout(dm: DisplayMetrics, binding: ActionsFragmentBinding) { } diff --git a/app/src/main/res/layout/localprofile_fragment.xml b/app/src/main/res/layout/localprofile_fragment.xml index f1bd26f410..ff453c53e0 100644 --- a/app/src/main/res/layout/localprofile_fragment.xml +++ b/app/src/main/res/layout/localprofile_fragment.xml @@ -302,6 +302,7 @@ android:paddingStart="10dp" android:paddingEnd="10dp" android:text="@string/activate_profile" + android:visibility="gone" app:icon="@drawable/ic_local_activate" app:iconTint="@color/ic_local_activate" /> @@ -323,6 +324,7 @@ android:paddingStart="1dp" android:paddingEnd="1dp" android:text="@string/reset" + android:visibility="gone" app:icon="@drawable/ic_local_reset" app:iconTint="@color/ic_local_reset" /> @@ -338,6 +340,7 @@ android:paddingStart="1dp" android:paddingEnd="1dp" android:text="@string/save" + android:visibility="gone" app:icon="@drawable/ic_local_save" app:iconTint="@color/ic_local_save" /> diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/DetermineBasalAdapterInterface.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/DetermineBasalAdapterInterface.kt index 4e1ba57422..9b8ed0d9c2 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/DetermineBasalAdapterInterface.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/DetermineBasalAdapterInterface.kt @@ -30,7 +30,7 @@ interface DetermineBasalAdapterInterface { uamAllowed: Boolean = false, advancedFiltering: Boolean = false, isSaveCgmSource: Boolean = false - ) {} + ) operator fun invoke(): APSResult? } \ No newline at end of file diff --git a/core/src/main/java/info/nightscout/androidaps/utils/ui/NumberPicker.kt b/core/src/main/java/info/nightscout/androidaps/utils/ui/NumberPicker.kt index b4cecb63f1..71d0b7c392 100644 --- a/core/src/main/java/info/nightscout/androidaps/utils/ui/NumberPicker.kt +++ b/core/src/main/java/info/nightscout/androidaps/utils/ui/NumberPicker.kt @@ -136,7 +136,7 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL } fun updateA11yDescription() { - val description = if (mCustomContentDescription != null) mCustomContentDescription else "" + val description = mCustomContentDescription ?: "" binding.minusButton.contentDescription = context.getString(R.string.a11y_min_button_description, description, formatter?.format(this.step)) binding.plusButton.contentDescription = context.getString(R.string.a11y_plus_button_description, description, formatter?.format(this.step)) } diff --git a/core/src/main/res/drawable/ic_danarstats.xml b/core/src/main/res/drawable/ic_danarstats.xml index 81b3952eb4..a95eef3884 100644 --- a/core/src/main/res/drawable/ic_danarstats.xml +++ b/core/src/main/res/drawable/ic_danarstats.xml @@ -7,24 +7,24 @@ android:pathData="M5.719,19.125L5.719,11.828" android:strokeWidth="2.2677" android:fillColor="#00000000" - android:strokeColor="#FEAF05" + android:strokeColor="?attr/statsColor" android:strokeLineCap="round"/> diff --git a/dana/src/main/res/layout/danar_fragment.xml b/dana/src/main/res/layout/danar_fragment.xml index e26919aebd..8cc0d95305 100644 --- a/dana/src/main/res/layout/danar_fragment.xml +++ b/dana/src/main/res/layout/danar_fragment.xml @@ -2,6 +2,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" tools:context="info.nightscout.androidaps.dana.DanaFragment" android:orientation="vertical"> @@ -658,50 +659,58 @@ android:layout_height="wrap_content" android:orientation="horizontal"> - + android:text="@string/viewprofile" + android:maxLines="2" + android:ellipsize="end" + app:iconPadding="-4dp"/> - - + android:text="@string/stats" + android:maxLines="2" + android:ellipsize="end" + app:iconPadding="-4dp"/> - + android:text="@string/danar_useroptions" + android:maxLines="2" + android:ellipsize="end" + app:iconPadding="-4dp"/> diff --git a/danar/src/main/java/info/nightscout/androidaps/danar/comm/MessageBase.kt b/danar/src/main/java/info/nightscout/androidaps/danar/comm/MessageBase.kt index 33007e943f..571db17cbf 100644 --- a/danar/src/main/java/info/nightscout/androidaps/danar/comm/MessageBase.kt +++ b/danar/src/main/java/info/nightscout/androidaps/danar/comm/MessageBase.kt @@ -122,7 +122,7 @@ open class MessageBase(injector: HasAndroidInjector) { } } - open fun handleMessageNotReceived() {} + open fun handleMessageNotReceived() {} // do nothing by default val command: Int get() = byteFromRawBuff(buffer, 5) or (byteFromRawBuff(buffer, 4) shl 8) diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java index 65d8185d26..97a5c9dfbe 100644 --- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java +++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java @@ -58,7 +58,7 @@ public class InsightPairingActivity extends NoSplashAppCompatActivity implements private RecyclerView deviceList; private final DeviceAdapter deviceAdapter = new DeviceAdapter(); - private final int PERMISSION_REQUEST_BLUETOOTH = 30242; + private static final int PERMISSION_REQUEST_BLUETOOTH = 30242; private InsightConnectionService service;