From a79393c65a7f0d9861e3ee66f7537cc2b598a931 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 4 Feb 2020 22:25:07 +0100 Subject: [PATCH] Log user actions --- .../androidaps/dialogs/CalibrationDialog.kt | 1 + .../androidaps/dialogs/CarbsDialog.kt | 5 +++++ .../nightscout/androidaps/dialogs/CareDialog.kt | 1 + .../dialogs/DialogFragmentWithDate.kt | 2 +- .../androidaps/dialogs/ErrorDialog.kt | 5 +++-- .../androidaps/dialogs/ExtendedBolusDialog.kt | 1 + .../nightscout/androidaps/dialogs/FillDialog.kt | 3 +++ .../androidaps/dialogs/InsulinDialog.kt | 3 +++ .../androidaps/dialogs/ProfileSwitchDialog.kt | 1 + .../androidaps/dialogs/TempBasalDialog.kt | 2 ++ .../androidaps/dialogs/TempTargetDialog.kt | 1 + .../androidaps/dialogs/TreatmentDialog.kt | 1 + .../plugins/general/actions/ActionsFragment.kt | 5 +++++ .../general/overview/OverviewFragment.java | 17 +++++++++++++++++ .../nightscout/androidaps/utils/BolusWizard.kt | 2 ++ 15 files changed, 47 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/CalibrationDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/CalibrationDialog.kt index 949e4e5fef..9503988dce 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/CalibrationDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/CalibrationDialog.kt @@ -56,6 +56,7 @@ class CalibrationDialog : DialogFragmentWithDate() { if (bg > 0) { activity?.let { activity -> OKDialog.showConfirmation(activity, MainApp.gs(R.string.overview_calibration), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable { + log.debug("USER ENTRY: CALIBRATION $bg") XdripCalibrations.confirmAndSendCalibration(bg, context) }) } diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt index de457068c5..1f0c6643c1 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt @@ -177,6 +177,7 @@ class CarbsDialog : DialogFragmentWithDate() { activity?.let { activity -> OKDialog.showConfirmation(activity, MainApp.gs(R.string.carbs), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable { if (activitySelected) { + log.debug("USER ENTRY: TEMPTARGET ACTIVITY $activityTT duration: $activityTTDuration") val tempTarget = TempTarget() .date(eventTime) .duration(activityTTDuration) @@ -186,6 +187,7 @@ class CarbsDialog : DialogFragmentWithDate() { .high(Profile.toMgdl(activityTT, ProfileFunctions.getSystemUnits())) TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget) } else if (eatingSoonSelected) { + log.debug("USER ENTRY: TEMPTARGET EATING SOON $eatingSoonTT duration: $eatingSoonTTDuration") val tempTarget = TempTarget() .date(eventTime) .duration(eatingSoonTTDuration) @@ -195,6 +197,7 @@ class CarbsDialog : DialogFragmentWithDate() { .high(Profile.toMgdl(eatingSoonTT, ProfileFunctions.getSystemUnits())) TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget) } else if (hypoSelected) { + log.debug("USER ENTRY: TEMPTARGET HYPO $hypoTT duration: $hypoTTDuration") val tempTarget = TempTarget() .date(eventTime) .duration(hypoTTDuration) @@ -206,8 +209,10 @@ class CarbsDialog : DialogFragmentWithDate() { } if (carbsAfterConstraints > 0) { if (duration == 0) { + log.debug("USER ENTRY: CARBS $carbsAfterConstraints time: $time") CarbsGenerator.createCarb(carbsAfterConstraints, time, CareportalEvent.CARBCORRECTION, notes) } else { + log.debug("USER ENTRY: CARBS $carbsAfterConstraints time: $time duration: $duration") CarbsGenerator.generateCarbs(carbsAfterConstraints, time, duration, notes) NSUpload.uploadEvent(CareportalEvent.NOTE, time - 2000, MainApp.gs(R.string.generated_ecarbs_note, carbsAfterConstraints, duration, timeOffset)) } diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/CareDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/CareDialog.kt index 0e47049cf1..da4a091b1d 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/CareDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/CareDialog.kt @@ -180,6 +180,7 @@ class CareDialog : DialogFragmentWithDate() { EventType.EXERCISE -> CareportalEvent.EXERCISE } careportalEvent.json = json.toString() + log.debug("USER ENTRY: CAREPORTAL ${careportalEvent.eventType} json: ${careportalEvent.json}") MainApp.getDbHelper().createOrUpdate(careportalEvent) NSUpload.uploadCareportalEntryToNS(json) }, null) diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/DialogFragmentWithDate.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/DialogFragmentWithDate.kt index da45e77990..ecaea0bc81 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/DialogFragmentWithDate.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/DialogFragmentWithDate.kt @@ -20,7 +20,7 @@ import org.slf4j.LoggerFactory import java.util.* abstract class DialogFragmentWithDate : DialogFragment() { - private val log = LoggerFactory.getLogger(DialogFragmentWithDate::class.java) + val log = LoggerFactory.getLogger(DialogFragmentWithDate::class.java) var eventTime = DateUtil.now() var eventTimeChanged = false diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/ErrorDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/ErrorDialog.kt index 538a2ca483..c084df7bf3 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/ErrorDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/ErrorDialog.kt @@ -36,6 +36,7 @@ class ErrorDialog : DialogFragment() { bundle.getString("title")?.let { title = it } sound = bundle.getInt("sound", R.raw.error) } + log.debug("Error dialog displayed") return inflater.inflate(R.layout.dialog_error, container, false) } @@ -44,11 +45,11 @@ class ErrorDialog : DialogFragment() { error_title.text = title overview_error_ok.setOnClickListener { - log.debug("Error dialog ok button pressed") + log.debug("USER ENTRY: Error dialog ok button pressed") dismiss() } overview_error_mute.setOnClickListener { - log.debug("Error dialog mute button pressed") + log.debug("USER ENTRY: Error dialog mute button pressed") stopAlarm() } startAlarm() diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt index a717e79b49..dee77051fd 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/ExtendedBolusDialog.kt @@ -63,6 +63,7 @@ class ExtendedBolusDialog : DialogFragmentWithDate() { activity?.let { activity -> OKDialog.showConfirmation(activity, MainApp.gs(R.string.extended_bolus), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable { + log.debug("USER ENTRY: EXTENDED BOLUS $insulinAfterConstraint duration: $durationInMinutes") ConfigBuilderPlugin.getPlugin().commandQueue.extendedBolus(insulinAfterConstraint, durationInMinutes, object : Callback() { override fun run() { if (!result.success) { diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt index 273d0b800d..a840384de0 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt @@ -102,13 +102,16 @@ class FillDialog : DialogFragmentWithDate() { activity?.let { activity -> OKDialog.showConfirmation(activity, MainApp.gs(R.string.primefill), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable { if (insulinAfterConstraints > 0) { + log.debug("USER ENTRY: PRIME BOLUS $insulinAfterConstraints") requestPrimeBolus(insulinAfterConstraints, notes) } if (siteChange) { + log.debug("USER ENTRY: SITE CHANGE") generateCareportalEvent(CareportalEvent.SITECHANGE, eventTime, notes) } if (insulinChange) { // add a second for case of both checked + log.debug("USER ENTRY: INSULIN CHANGE") generateCareportalEvent(CareportalEvent.INSULINCHANGE, eventTime + 1000, notes) } }, null) diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt index d6f64d87f1..42bc395b8b 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/InsulinDialog.kt @@ -147,6 +147,7 @@ class InsulinDialog : DialogFragmentWithDate() { activity?.let { activity -> OKDialog.showConfirmation(activity, MainApp.gs(R.string.bolus), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable { if (eatingSoonChecked) { + log.debug("USER ENTRY: TEMPTARGET EATING SOON $eatingSoonTT duration: $eatingSoonTTDuration") val tempTarget = TempTarget() .date(System.currentTimeMillis()) .duration(eatingSoonTTDuration) @@ -164,9 +165,11 @@ class InsulinDialog : DialogFragmentWithDate() { detailedBolusInfo.source = Source.USER detailedBolusInfo.notes = notes if (recordOnlyChecked) { + log.debug("USER ENTRY: BOLUS RECORD ONLY $insulinAfterConstraints") detailedBolusInfo.date = time TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false) } else { + log.debug("USER ENTRY: BOLUS $insulinAfterConstraints") detailedBolusInfo.date = DateUtil.now() ConfigBuilderPlugin.getPlugin().commandQueue.bolus(detailedBolusInfo, object : Callback() { override fun run() { diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/ProfileSwitchDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/ProfileSwitchDialog.kt index 5df248593c..f594564a78 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/ProfileSwitchDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/ProfileSwitchDialog.kt @@ -97,6 +97,7 @@ class ProfileSwitchDialog : DialogFragmentWithDate() { activity?.let { activity -> OKDialog.showConfirmation(activity, MainApp.gs(R.string.careportal_profileswitch), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable { + log.debug("USER ENTRY: PROFILE SWITCH $profile percent: $percent timeshift: $timeShift duration: $duration") ProfileFunctions.doProfileSwitch(profileStore, profile, duration.toInt(), percent, timeShift, eventTime) }) } diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt index dc31349650..d821aec56b 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/TempBasalDialog.kt @@ -104,8 +104,10 @@ class TempBasalDialog : DialogFragmentWithDate() { } } if (isPercentPump) { + log.debug("USER ENTRY: TEMP BASAL $percent% duration: $durationInMinutes") ConfigBuilderPlugin.getPlugin().commandQueue.tempBasalPercent(percent, durationInMinutes, true, profile, callback) } else { + log.debug("USER ENTRY: TEMP BASAL $absolute duration: $durationInMinutes") ConfigBuilderPlugin.getPlugin().commandQueue.tempBasalAbsolute(absolute, durationInMinutes, true, profile, callback) } }) diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/TempTargetDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/TempTargetDialog.kt index 5408105a71..77cb0b6823 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/TempTargetDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/TempTargetDialog.kt @@ -127,6 +127,7 @@ class TempTargetDialog : DialogFragmentWithDate() { activity?.let { activity -> OKDialog.showConfirmation(activity, MainApp.gs(R.string.careportal_temporarytarget), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable { + log.debug("USER ENTRY: TEMP TARGET $target duration: $duration") if (target == 0.0 || duration == 0.0) { val tempTarget = TempTarget() .date(eventTime) diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt index 8667befaf2..565a65f54f 100644 --- a/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt +++ b/app/src/main/java/info/nightscout/androidaps/dialogs/TreatmentDialog.kt @@ -99,6 +99,7 @@ class TreatmentDialog : DialogFragmentWithDate() { if (insulinAfterConstraints > 0 || carbsAfterConstraints > 0) { activity?.let { activity -> OKDialog.showConfirmation(activity, MainApp.gs(R.string.overview_treatment_label), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable { + log.debug("USER ENTRY: BOLUS insulin $insulin carbs: $carbs") val detailedBolusInfo = DetailedBolusInfo() if (insulinAfterConstraints == 0.0) detailedBolusInfo.eventType = CareportalEvent.CARBCORRECTION if (carbsAfterConstraints == 0) detailedBolusInfo.eventType = CareportalEvent.CORRECTIONBOLUS diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt index 4977cd6f9f..e68df84fdf 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.kt @@ -27,6 +27,7 @@ import info.nightscout.androidaps.plugins.general.careportal.CareportalFragment import info.nightscout.androidaps.activities.ErrorHelperActivity import info.nightscout.androidaps.dialogs.ProfileSwitchDialog import info.nightscout.androidaps.dialogs.TempTargetDialog +import info.nightscout.androidaps.logging.L import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.utils.* @@ -34,9 +35,11 @@ import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.disposables.CompositeDisposable import kotlinx.android.synthetic.main.actions_fragment.* import kotlinx.android.synthetic.main.careportal_stats_fragment.* +import org.slf4j.LoggerFactory import java.util.* class ActionsFragment : Fragment() { + private val log = LoggerFactory.getLogger(L.CORE) private var disposable: CompositeDisposable = CompositeDisposable() @@ -67,6 +70,7 @@ class ActionsFragment : Fragment() { } actions_extendedbolus_cancel.setOnClickListener { if (TreatmentsPlugin.getPlugin().isInHistoryExtendedBoluslInProgress) { + log.debug("USER ENTRY: CANCEL EXTENDED BOLUS") ConfigBuilderPlugin.getPlugin().commandQueue.cancelExtended(object : Callback() { override fun run() { if (!result.success) { @@ -86,6 +90,7 @@ class ActionsFragment : Fragment() { } actions_canceltempbasal.setOnClickListener { if (TreatmentsPlugin.getPlugin().isTempBasalInProgress) { + log.debug("USER ENTRY: CANCEL TEMP BASAL") ConfigBuilderPlugin.getPlugin().commandQueue.cancelTempBasal(true, object : Callback() { override fun run() { if (!result.success) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java index 931cca544b..0976755f06 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java @@ -667,6 +667,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, return true; final LoopPlugin loopPlugin = LoopPlugin.getPlugin(); if (item.getTitle().equals(MainApp.gs(R.string.disableloop))) { + log.debug("USER ENTRY: LOOP DISABLED"); loopPlugin.setPluginEnabled(PluginType.LOOP, false); loopPlugin.setFragmentVisible(PluginType.LOOP, false); ConfigBuilderPlugin.getPlugin().storeSettings("DisablingLoop"); @@ -682,6 +683,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, LoopPlugin.getPlugin().createOfflineEvent(24 * 60); // upload 24h, we don't know real duration return true; } else if (item.getTitle().equals(MainApp.gs(R.string.enableloop))) { + log.debug("USER ENTRY: LOOP ENABLED"); loopPlugin.setPluginEnabled(PluginType.LOOP, true); loopPlugin.setFragmentVisible(PluginType.LOOP, true); ConfigBuilderPlugin.getPlugin().storeSettings("EnablingLoop"); @@ -690,6 +692,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, return true; } else if (item.getTitle().equals(MainApp.gs(R.string.resume)) || item.getTitle().equals(MainApp.gs(R.string.reconnect))) { + log.debug("USER ENTRY: RESUME"); loopPlugin.suspendTo(0L); updateGUI("suspendmenu"); ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelTempBasal(true, new Callback() { @@ -704,39 +707,48 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, LoopPlugin.getPlugin().createOfflineEvent(0); return true; } else if (item.getTitle().equals(MainApp.gs(R.string.suspendloopfor1h))) { + log.debug("USER ENTRY: SUSPEND 1h"); LoopPlugin.getPlugin().suspendLoop(60); updateGUI("suspendmenu"); return true; } else if (item.getTitle().equals(MainApp.gs(R.string.suspendloopfor2h))) { + log.debug("USER ENTRY: SUSPEND 2h"); LoopPlugin.getPlugin().suspendLoop(120); updateGUI("suspendmenu"); return true; } else if (item.getTitle().equals(MainApp.gs(R.string.suspendloopfor3h))) { + log.debug("USER ENTRY: SUSPEND 3h"); LoopPlugin.getPlugin().suspendLoop(180); updateGUI("suspendmenu"); return true; } else if (item.getTitle().equals(MainApp.gs(R.string.suspendloopfor10h))) { + log.debug("USER ENTRY: SUSPEND 10h"); LoopPlugin.getPlugin().suspendLoop(600); updateGUI("suspendmenu"); return true; } else if (item.getTitle().equals(MainApp.gs(R.string.disconnectpumpfor15m))) { + log.debug("USER ENTRY: DISCONNECT 15m"); LoopPlugin.getPlugin().disconnectPump(15, profile); updateGUI("suspendmenu"); return true; } else if (item.getTitle().equals(MainApp.gs(R.string.disconnectpumpfor30m))) { + log.debug("USER ENTRY: DISCONNECT 30m"); LoopPlugin.getPlugin().disconnectPump(30, profile); updateGUI("suspendmenu"); return true; } else if (item.getTitle().equals(MainApp.gs(R.string.disconnectpumpfor1h))) { + log.debug("USER ENTRY: DISCONNECT 1h"); LoopPlugin.getPlugin().disconnectPump(60, profile); SP.putBoolean(R.string.key_objectiveusedisconnect, true); updateGUI("suspendmenu"); return true; } else if (item.getTitle().equals(MainApp.gs(R.string.disconnectpumpfor2h))) { + log.debug("USER ENTRY: DISCONNECT 2h"); LoopPlugin.getPlugin().disconnectPump(120, profile); updateGUI("suspendmenu"); return true; } else if (item.getTitle().equals(MainApp.gs(R.string.disconnectpumpfor3h))) { + log.debug("USER ENTRY: DISCONNECT 3h"); LoopPlugin.getPlugin().disconnectPump(180, profile); updateGUI("suspendmenu"); return true; @@ -754,6 +766,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, if (manager != null) pvd.show(manager, "ProfileViewDialog"); } else if (item.getTitle().equals(MainApp.gs(R.string.eatingsoon))) { + log.debug("USER ENTRY: TEMP TARGET EATING SOON"); double target = Profile.toMgdl(DefaultValueHelper.determineEatingSoonTT(), ProfileFunctions.getSystemUnits()); TempTarget tempTarget = new TempTarget() .date(System.currentTimeMillis()) @@ -764,6 +777,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, .high(target); TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget); } else if (item.getTitle().equals(MainApp.gs(R.string.activity))) { + log.debug("USER ENTRY: TEMP TARGET ACTIVITY"); double target = Profile.toMgdl(DefaultValueHelper.determineActivityTT(), ProfileFunctions.getSystemUnits()); TempTarget tempTarget = new TempTarget() .date(now()) @@ -774,6 +788,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, .high(target); TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget); } else if (item.getTitle().equals(MainApp.gs(R.string.hypo))) { + log.debug("USER ENTRY: TEMP TARGET HYPO"); double target = Profile.toMgdl(DefaultValueHelper.determineHypoTT(), ProfileFunctions.getSystemUnits()); TempTarget tempTarget = new TempTarget() .date(now()) @@ -788,6 +803,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, if (manager != null) new TempTargetDialog().show(manager, "Overview"); } else if (item.getTitle().equals(MainApp.gs(R.string.cancel))) { + log.debug("USER ENTRY: TEMP TARGET CANCEL"); TempTarget tempTarget = new TempTarget() .source(Source.USER) .date(now()) @@ -907,6 +923,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, final LoopPlugin.LastRun finalLastRun = LoopPlugin.lastRun; if (finalLastRun != null && finalLastRun.lastAPSRun != null && finalLastRun.constraintsProcessed.isChangeRequested()) { OKDialog.showConfirmation(context, MainApp.gs(R.string.pump_tempbasal_label), finalLastRun.constraintsProcessed.toSpanned(), () -> { + log.debug("USER ENTRY: ACCEPT TEMP BASAL"); hideTempRecommendation(); clearNotification(); LoopPlugin.getPlugin().acceptChangeRequest(); diff --git a/app/src/main/java/info/nightscout/androidaps/utils/BolusWizard.kt b/app/src/main/java/info/nightscout/androidaps/utils/BolusWizard.kt index 6d71a80ba1..ea4da238cb 100644 --- a/app/src/main/java/info/nightscout/androidaps/utils/BolusWizard.kt +++ b/app/src/main/java/info/nightscout/androidaps/utils/BolusWizard.kt @@ -277,6 +277,7 @@ class BolusWizard @JvmOverloads constructor(val profile: Profile, OKDialog.showConfirmation(context, MainApp.gs(R.string.boluswizard), HtmlHelper.fromHtml(confirmMessage), Runnable { if (insulinAfterConstraints > 0 || carbs > 0) { if (useSuperBolus) { + log.debug("USER ENTRY: SUPERBOLUS TBR") val loopPlugin = LoopPlugin.getPlugin() if (loopPlugin.isEnabled(PluginType.LOOP)) { loopPlugin.superBolusTo(System.currentTimeMillis() + 2 * 60L * 60 * 1000) @@ -325,6 +326,7 @@ class BolusWizard @JvmOverloads constructor(val profile: Profile, detailedBolusInfo.boluscalc = nsJSON() detailedBolusInfo.source = Source.USER detailedBolusInfo.notes = notes + log.debug("USER ENTRY: BOLUS insulin $insulinAfterConstraints carbs: $carbs") if (detailedBolusInfo.insulin > 0 || ConfigBuilderPlugin.getPlugin().activePump?.pumpDescription?.storesCarbInfo == true) { ConfigBuilderPlugin.getPlugin().commandQueue.bolus(detailedBolusInfo, object : Callback() { override fun run() {