Add QuickWizard Source (final solution)

# Conflicts:
#	app/src/main/java/info/nightscout/androidaps/utils/wizard/BolusWizard.kt
#	app/src/main/java/info/nightscout/androidaps/utils/wizard/QuickWizardEntry.kt
This commit is contained in:
Philoul 2021-03-30 12:22:49 +02:00
parent 61d84e66fe
commit 07e2e0eaf4

View file

@ -346,7 +346,10 @@ class BolusWizard @Inject constructor(
bolusCalculatorResult = createBolusCalculatorResult() bolusCalculatorResult = createBolusCalculatorResult()
notes = this@BolusWizard.notes notes = this@BolusWizard.notes
//uel.log(Action.BOLUS_ADVISOR, notes, XXXValueWithUnit.TherapyEventType(eventType), XXXValueWithUnit.Insulin(insulinAfterConstraints)) //uel.log(Action.BOLUS_ADVISOR, notes, XXXValueWithUnit.TherapyEventType(eventType), XXXValueWithUnit.Insulin(insulinAfterConstraints))
uel.log(Action.BOLUS_ADVISOR, notes, ValueWithUnit(Sources.WizardDialog), ValueWithUnit(eventType.toDBbEventType().text, Units.TherapyEvent), ValueWithUnit(insulinAfterConstraints, Units.U)) uel.log(Action.BOLUS_ADVISOR, notes,
ValueWithUnit(if (quickWizard) Sources.QuickWizard else Sources.WizardDialog),
ValueWithUnit(eventType.toDBbEventType().text, Units.TherapyEvent),
ValueWithUnit(insulinAfterConstraints, Units.U))
if (insulin > 0) { if (insulin > 0) {
commandQueue.bolus(this, object : Callback() { commandQueue.bolus(this, object : Callback() {
override fun run() { override fun run() {
@ -421,8 +424,7 @@ class BolusWizard @Inject constructor(
ValueWithUnit(eventType.toDBbEventType().text, Units.TherapyEvent), ValueWithUnit(eventType.toDBbEventType().text, Units.TherapyEvent),
ValueWithUnit(insulinAfterConstraints, Units.U, insulinAfterConstraints != 0.0), ValueWithUnit(insulinAfterConstraints, Units.U, insulinAfterConstraints != 0.0),
ValueWithUnit(this@BolusWizard.carbs, Units.G, this@BolusWizard.carbs != 0), ValueWithUnit(this@BolusWizard.carbs, Units.G, this@BolusWizard.carbs != 0),
ValueWithUnit(carbTime, Units.M, carbTime != 0) ValueWithUnit(carbTime, Units.M, carbTime != 0))
)
commandQueue.bolus(this, object : Callback() { commandQueue.bolus(this, object : Callback() {
override fun run() { override fun run() {
if (!result.success) { if (!result.success) {