diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 55f32952d2..66acf8e27e 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -3,27 +3,10 @@
-
-
-
@@ -143,8 +126,8 @@
-
+
@@ -152,13 +135,6 @@
-
-
-
-
-
-
-
@@ -171,4 +147,4 @@
-
+
\ No newline at end of file
diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt
index 6ffeea17db..66a6bd166b 100644
--- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt
+++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/OmnipodDashOverviewFragment.kt
@@ -167,6 +167,9 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_common_confirmation_time_on_pod_updated))
)
}
+ if (buildHelper.isEngineeringMode()) {
+ bluetoothStatusBinding.deliveryStatus.visibility = View.VISIBLE
+ }
}
override fun onResume() {
@@ -228,17 +231,18 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
?: PLACEHOLDER
bluetoothStatusBinding.omnipodDashBluetoothStatus.text =
when (podStateManager.bluetoothConnectionState) {
- OmnipodDashPodStateManager.BluetoothConnectionState.CONNECTED ->
+ OmnipodDashPodStateManager.BluetoothConnectionState.CONNECTED ->
"{fa-bluetooth}"
OmnipodDashPodStateManager.BluetoothConnectionState.DISCONNECTED ->
"{fa-bluetooth-b}"
- OmnipodDashPodStateManager.BluetoothConnectionState.CONNECTING ->
+ OmnipodDashPodStateManager.BluetoothConnectionState.CONNECTING ->
"{fa-bluetooth-b spin}"
}
val connectionSuccessPercentage = podStateManager.connectionSuccessRatio() * 100
val successPercentageString = String.format("%.2f %", podStateManager.connectionSuccessRatio())
- val connectionQuality = "${podStateManager.successfulConnections}/${podStateManager.connectionAttempts} :: $successPercentageString"
+ val connectionQuality =
+ "${podStateManager.successfulConnections}/${podStateManager.connectionAttempts} :: $successPercentageString"
bluetoothStatusBinding.omnipodDashBluetoothConnectionQuality.text = connectionQuality
val connectionStatsColor = when {
connectionSuccessPercentage > 90 ->
@@ -303,9 +307,9 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
when {
!podStateManager.sameTimeZone ->
Color.MAGENTA
- timeDeviationTooBig ->
+ timeDeviationTooBig ->
Color.YELLOW
- else ->
+ else ->
Color.WHITE
}
)
@@ -334,15 +338,16 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
}
// base basal rate
- podInfoBinding.baseBasalRate.text = if (podStateManager.basalProgram != null && !podStateManager.isSuspended) {
- resourceHelper.gs(
- R.string.pump_basebasalrate,
- omnipodDashPumpPlugin.model()
- .determineCorrectBasalSize(podStateManager.basalProgram!!.rateAt(Date()))
- )
- } else {
- PLACEHOLDER
- }
+ podInfoBinding.baseBasalRate.text =
+ if (podStateManager.basalProgram != null && !podStateManager.isSuspended) {
+ resourceHelper.gs(
+ R.string.pump_basebasalrate,
+ omnipodDashPumpPlugin.model()
+ .determineCorrectBasalSize(podStateManager.basalProgram!!.rateAt(Date()))
+ )
+ } else {
+ PLACEHOLDER
+ }
// total delivered
podInfoBinding.totalDelivered.text =
@@ -400,7 +405,7 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
System.currentTimeMillis() -
podStateManager.lastUpdatedSystem,
- )
+ )
)
val lastConnectionColor =
if (omnipodDashPumpPlugin.isUnreachableAlertTimeoutExceeded(getPumpUnreachableTimeout().toMillis())) {
@@ -449,9 +454,9 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
val podStatusColor = when {
!podStateManager.isActivationCompleted || podStateManager.isPodKaput || podStateManager.isSuspended ->
Color.RED
- podStateManager.activeCommand != null ->
+ podStateManager.activeCommand != null ->
Color.YELLOW
- else ->
+ else ->
Color.WHITE
}
podInfoBinding.podStatus.setTextColor(podStatusColor)
@@ -546,7 +551,7 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
private fun updateRefreshStatusButton() {
buttonBinding.buttonRefreshStatus.isEnabled =
podStateManager.isUniqueIdSet &&
- isQueueEmpty()
+ isQueueEmpty()
}
private fun updateResumeDeliveryButton() {
@@ -628,16 +633,19 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
val minutes = duration.toMinutes().toInt()
val seconds = duration.seconds
when {
- seconds < 10 -> {
+ seconds < 10 -> {
return resourceHelper.gs(R.string.omnipod_common_moments_ago)
}
- seconds < 60 -> {
+ seconds < 60 -> {
return resourceHelper.gs(R.string.omnipod_common_less_than_a_minute_ago)
}
- seconds < 60 * 60 -> { // < 1 hour
- return resourceHelper.gs(R.string.omnipod_common_time_ago, resourceHelper.gq(R.plurals.omnipod_common_minutes, minutes, minutes))
+ seconds < 60 * 60 -> { // < 1 hour
+ return resourceHelper.gs(
+ R.string.omnipod_common_time_ago,
+ resourceHelper.gq(R.plurals.omnipod_common_minutes, minutes, minutes)
+ )
}
seconds < 24 * 60 * 60 -> { // < 1 day
@@ -645,20 +653,34 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
if (minutesLeft > 0)
return resourceHelper.gs(
R.string.omnipod_common_time_ago,
- resourceHelper.gs(R.string.omnipod_common_composite_time, resourceHelper.gq(R.plurals.omnipod_common_hours, hours, hours), resourceHelper.gq(R.plurals.omnipod_common_minutes, minutesLeft, minutesLeft))
+ resourceHelper.gs(
+ R.string.omnipod_common_composite_time,
+ resourceHelper.gq(R.plurals.omnipod_common_hours, hours, hours),
+ resourceHelper.gq(R.plurals.omnipod_common_minutes, minutesLeft, minutesLeft)
+ )
)
- return resourceHelper.gs(R.string.omnipod_common_time_ago, resourceHelper.gq(R.plurals.omnipod_common_hours, hours, hours))
+ return resourceHelper.gs(
+ R.string.omnipod_common_time_ago,
+ resourceHelper.gq(R.plurals.omnipod_common_hours, hours, hours)
+ )
}
- else -> {
+ else -> {
val days = hours / 24
val hoursLeft = hours % 24
if (hoursLeft > 0)
return resourceHelper.gs(
R.string.omnipod_common_time_ago,
- resourceHelper.gs(R.string.omnipod_common_composite_time, resourceHelper.gq(R.plurals.omnipod_common_days, days, days), resourceHelper.gq(R.plurals.omnipod_common_hours, hoursLeft, hoursLeft))
+ resourceHelper.gs(
+ R.string.omnipod_common_composite_time,
+ resourceHelper.gq(R.plurals.omnipod_common_days, days, days),
+ resourceHelper.gq(R.plurals.omnipod_common_hours, hoursLeft, hoursLeft)
+ )
)
- return resourceHelper.gs(R.string.omnipod_common_time_ago, resourceHelper.gq(R.plurals.omnipod_common_days, days, days))
+ return resourceHelper.gs(
+ R.string.omnipod_common_time_ago,
+ resourceHelper.gq(R.plurals.omnipod_common_days, days, days)
+ )
}
}
}
diff --git a/omnipod-dash/src/main/res/layout/omnipod_dash_overview_bluetooth_status.xml b/omnipod-dash/src/main/res/layout/omnipod_dash_overview_bluetooth_status.xml
index da4332b934..2fc97730ed 100644
--- a/omnipod-dash/src/main/res/layout/omnipod_dash_overview_bluetooth_status.xml
+++ b/omnipod-dash/src/main/res/layout/omnipod_dash_overview_bluetooth_status.xml
@@ -118,9 +118,11 @@
+ android:orientation="horizontal"
+ android:visibility="gone">