Merge branch 'dev2_dana_combo_only' of https://github.com/nightscout/AndroidAPS into dev2_dana_combo_only

This commit is contained in:
Milos Kozak 2021-04-29 21:23:18 +02:00
commit 07fe79eb91
7 changed files with 11 additions and 2 deletions

View file

@ -11,10 +11,13 @@ import dagger.android.support.DaggerDialogFragment
import info.nightscout.androidaps.activities.BolusProgressHelperActivity import info.nightscout.androidaps.activities.BolusProgressHelperActivity
import info.nightscout.androidaps.core.R import info.nightscout.androidaps.core.R
import info.nightscout.androidaps.core.databinding.DialogBolusprogressBinding import info.nightscout.androidaps.core.databinding.DialogBolusprogressBinding
import info.nightscout.androidaps.database.entities.UserEntry.Action
import info.nightscout.androidaps.database.entities.UserEntry.Sources
import info.nightscout.androidaps.events.EventPumpStatusChanged import info.nightscout.androidaps.events.EventPumpStatusChanged
import info.nightscout.androidaps.interfaces.CommandQueueProvider import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.logging.UserEntryLogger
import info.nightscout.androidaps.plugins.bus.RxBusWrapper import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
@ -32,6 +35,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
@Inject lateinit var commandQueue: CommandQueueProvider @Inject lateinit var commandQueue: CommandQueueProvider
@Inject lateinit var fabricPrivacy: FabricPrivacy @Inject lateinit var fabricPrivacy: FabricPrivacy
@Inject lateinit var aapsSchedulers: AapsSchedulers @Inject lateinit var aapsSchedulers: AapsSchedulers
@Inject lateinit var uel: UserEntryLogger
private val disposable = CompositeDisposable() private val disposable = CompositeDisposable()
@ -87,6 +91,7 @@ class BolusProgressDialog : DaggerDialogFragment() {
stopPressed = true stopPressed = true
binding.stoppressed.visibility = View.VISIBLE binding.stoppressed.visibility = View.VISIBLE
binding.stop.visibility = View.INVISIBLE binding.stop.visibility = View.INVISIBLE
uel.log(Action.CANCEL_BOLUS, Sources.Overview, state)
commandQueue.cancelAllBoluses() commandQueue.cancelAllBoluses()
} }
val defaultState = resourceHelper.gs(R.string.waitingforpump) val defaultState = resourceHelper.gs(R.string.waitingforpump)

View file

@ -46,6 +46,7 @@ class Translator @Inject internal constructor(
Action.CLEAR_PAIRING_KEYS -> resourceHelper.gs(R.string.uel_clear_pairing_keys) Action.CLEAR_PAIRING_KEYS -> resourceHelper.gs(R.string.uel_clear_pairing_keys)
Action.ACCEPTS_TEMP_BASAL -> resourceHelper.gs(R.string.uel_accepts_temp_basal) Action.ACCEPTS_TEMP_BASAL -> resourceHelper.gs(R.string.uel_accepts_temp_basal)
Action.CANCEL_TEMP_BASAL -> resourceHelper.gs(R.string.uel_cancel_temp_basal) Action.CANCEL_TEMP_BASAL -> resourceHelper.gs(R.string.uel_cancel_temp_basal)
Action.CANCEL_BOLUS -> resourceHelper.gs(R.string.uel_cancel_bolus)
Action.CANCEL_EXTENDED_BOLUS -> resourceHelper.gs(R.string.uel_cancel_extended_bolus) Action.CANCEL_EXTENDED_BOLUS -> resourceHelper.gs(R.string.uel_cancel_extended_bolus)
Action.CANCEL_TT -> resourceHelper.gs(R.string.uel_cancel_tt) Action.CANCEL_TT -> resourceHelper.gs(R.string.uel_cancel_tt)
Action.CAREPORTAL -> resourceHelper.gs(R.string.uel_careportal) Action.CAREPORTAL -> resourceHelper.gs(R.string.uel_careportal)

View file

@ -31,6 +31,7 @@ class UserEntryMapper {
CLEAR_PAIRING_KEYS (UserEntry.Action.CLEAR_PAIRING_KEYS), CLEAR_PAIRING_KEYS (UserEntry.Action.CLEAR_PAIRING_KEYS),
ACCEPTS_TEMP_BASAL (UserEntry.Action.ACCEPTS_TEMP_BASAL), ACCEPTS_TEMP_BASAL (UserEntry.Action.ACCEPTS_TEMP_BASAL),
CANCEL_TEMP_BASAL (UserEntry.Action.CANCEL_TEMP_BASAL), CANCEL_TEMP_BASAL (UserEntry.Action.CANCEL_TEMP_BASAL),
CANCEL_BOLUS (UserEntry.Action.CANCEL_BOLUS),
CANCEL_EXTENDED_BOLUS (UserEntry.Action.CANCEL_EXTENDED_BOLUS), CANCEL_EXTENDED_BOLUS (UserEntry.Action.CANCEL_EXTENDED_BOLUS),
CANCEL_TT (UserEntry.Action.CANCEL_TT), CANCEL_TT (UserEntry.Action.CANCEL_TT),
CAREPORTAL (UserEntry.Action.CAREPORTAL), CAREPORTAL (UserEntry.Action.CAREPORTAL),

View file

@ -97,7 +97,7 @@ class UserEntryPresentationHelper @Inject constructor(
Sources.Food -> R.drawable.ic_food Sources.Food -> R.drawable.ic_food
Sources.Stats -> R.drawable.ic_cp_stats Sources.Stats -> R.drawable.ic_cp_stats
Sources.ConfigBuilder -> R.drawable.ic_cogs Sources.ConfigBuilder -> R.drawable.ic_cogs
Sources.Overview -> R.drawable.ic_notif_aaps Sources.Overview -> R.drawable.ic_home
Sources.Aaps -> R.drawable.ic_notif_aaps Sources.Aaps -> R.drawable.ic_notif_aaps
Sources.Unknown -> R.drawable.ic_generic_icon Sources.Unknown -> R.drawable.ic_generic_icon
} }
@ -168,7 +168,7 @@ class UserEntryPresentationHelper @Inject constructor(
val fullvalueWithUnitList = ArrayList<ValueWithUnit?>(entry.values) val fullvalueWithUnitList = ArrayList<ValueWithUnit?>(entry.values)
var timestampRec = "" + entry.timestamp var timestampRec = "" + entry.timestamp
var dateTimestampRev = dateUtil.dateAndTimeAndSecondsString(entry.timestamp) var dateTimestampRev = dateUtil.dateAndTimeAndSecondsString(entry.timestamp)
var utcOffset = dateUtil.timeString(entry.utcOffset) var utcOffset = dateUtil.timeStringFromSeconds((entry.utcOffset/1000).toInt())
var action = csvString(entry.action) var action = csvString(entry.action)
var therapyEvent = "" var therapyEvent = ""
var source = translator.translate(entry.source) var source = translator.translate(entry.source)

View file

@ -433,6 +433,7 @@
<string name="uel_clear_pairing_keys">CLEAR PAIRING KEYS</string> <string name="uel_clear_pairing_keys">CLEAR PAIRING KEYS</string>
<string name="uel_accepts_temp_basal">ACCEPTS TEMP BASAL</string> <string name="uel_accepts_temp_basal">ACCEPTS TEMP BASAL</string>
<string name="uel_cancel_temp_basal">CANCEL TEMP BASAL</string> <string name="uel_cancel_temp_basal">CANCEL TEMP BASAL</string>
<string name="uel_cancel_bolus">CANCEL BOLUS</string>
<string name="uel_cancel_extended_bolus">CANCEL EXTENDED BOLUS</string> <string name="uel_cancel_extended_bolus">CANCEL EXTENDED BOLUS</string>
<string name="uel_cancel_tt">CANCEL TT</string> <string name="uel_cancel_tt">CANCEL TT</string>
<string name="uel_careportal">CAREPORTAL</string> <string name="uel_careportal">CAREPORTAL</string>

View file

@ -46,6 +46,7 @@ data class UserEntry(
CLEAR_PAIRING_KEYS (ColorGroup.Pump), CLEAR_PAIRING_KEYS (ColorGroup.Pump),
ACCEPTS_TEMP_BASAL (ColorGroup.BasalTreatment), ACCEPTS_TEMP_BASAL (ColorGroup.BasalTreatment),
CANCEL_TEMP_BASAL (ColorGroup.BasalTreatment), CANCEL_TEMP_BASAL (ColorGroup.BasalTreatment),
CANCEL_BOLUS (ColorGroup.InsulinTreatment),
CANCEL_EXTENDED_BOLUS (ColorGroup.InsulinTreatment), CANCEL_EXTENDED_BOLUS (ColorGroup.InsulinTreatment),
CANCEL_TT (ColorGroup.TT), CANCEL_TT (ColorGroup.TT),
CAREPORTAL (ColorGroup.Careportal), CAREPORTAL (ColorGroup.Careportal),