Skip to content

Commit

Permalink
Merge pull request #1260 from Andries-Smit/omnipod/hide-insulin-age-s…
Browse files Browse the repository at this point in the history
…tatus

Feat: hide insulin age for omnipod
  • Loading branch information
MilosKozak authored Feb 1, 2022
2 parents 53ee64f + ebc0c5b commit b3e08c5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package info.nightscout.androidaps.plugins.general.overview

import android.graphics.Color
import android.view.View
import android.widget.TextView
import androidx.annotation.StringRes
import info.nightscout.androidaps.R
Expand Down Expand Up @@ -39,7 +40,12 @@ class StatusLightHandler @Inject constructor(
val pump = activePlugin.activePump
val bgSource = activePlugin.activeBgSource
handleAge(careportal_cannula_age, TherapyEvent.Type.CANNULA_CHANGE, R.string.key_statuslights_cage_warning, 48.0, R.string.key_statuslights_cage_critical, 72.0)
handleAge(careportal_insulin_age, TherapyEvent.Type.INSULIN_CHANGE, R.string.key_statuslights_iage_warning, 72.0, R.string.key_statuslights_iage_critical, 144.0)
if (pump.model() == PumpType.OMNIPOD_EROS || pump.model() == PumpType.OMNIPOD_DASH) {
careportal_insulin_age?.visibility = View.GONE
} else {
careportal_insulin_age?.visibility = View.VISIBLE
handleAge(careportal_insulin_age, TherapyEvent.Type.INSULIN_CHANGE, R.string.key_statuslights_iage_warning, 72.0, R.string.key_statuslights_iage_critical, 144.0)
}
handleAge(careportal_sensor_age, TherapyEvent.Type.SENSOR_CHANGE, R.string.key_statuslights_sage_warning, 216.0, R.string.key_statuslights_sage_critical, 240.0)
if (pump.pumpDescription.isBatteryReplaceable || (pump is OmnipodErosPumpPlugin && pump.isUseRileyLinkBatteryLevel && pump.isBatteryChangeLoggingEnabled)) {
handleAge(careportal_pb_age, TherapyEvent.Type.PUMP_BATTERY_CHANGE, R.string.key_statuslights_bage_warning, 216.0, R.string.key_statuslights_bage_critical, 240.0)
Expand Down

0 comments on commit b3e08c5

Please sign in to comment.