Show bolus/TBR percent and duration with activity.

This commit is contained in:
Johannes Mockenhaupt 2017-11-18 23:28:47 +01:00
parent 46fdd47ac0
commit 9d3625e78c
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
3 changed files with 7 additions and 6 deletions

View file

@ -417,7 +417,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
Bolus lastKnownBolus = pump.lastBolus; Bolus lastKnownBolus = pump.lastBolus;
try { try {
pump.activity = MainApp.sResources.getString(R.string.combo_pump_action_bolusing); pump.activity = MainApp.sResources.getString(R.string.combo_pump_action_bolusing, detailedBolusInfo.insulin);
MainApp.bus().post(new EventComboPumpUpdateGUI()); MainApp.bus().post(new EventComboPumpUpdateGUI());
// refresh pump data // refresh pump data
@ -538,7 +538,8 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
} }
int finalAdjustedPercent = adjustedPercent; int finalAdjustedPercent = adjustedPercent;
CommandResult commandResult = runCommand(MainApp.sResources.getString(R.string.combo_pump_action_setting_tbr), 3, () -> ruffyScripter.setTbr(finalAdjustedPercent, durationInMinutes)); CommandResult commandResult = runCommand(MainApp.sResources.getString(R.string.combo_pump_action_setting_tbr, percent, durationInMinutes),
3, () -> ruffyScripter.setTbr(finalAdjustedPercent, durationInMinutes));
if (!commandResult.success) { if (!commandResult.success) {
return new PumpEnactResult().success(false).enacted(false); return new PumpEnactResult().success(false).enacted(false);
} }

View file

@ -691,6 +691,6 @@
<string name="combo_stats">Statistiken</string> <string name="combo_stats">Statistiken</string>
<string name="combo_programming_bolus">Bolusabgabe wird vorbereitet</string> <string name="combo_programming_bolus">Bolusabgabe wird vorbereitet</string>
<string name="combo_pump_action_cancelling_tbr">TBR wird abgebrochen</string> <string name="combo_pump_action_cancelling_tbr">TBR wird abgebrochen</string>
<string name="combo_pump_action_setting_tbr">TBR wird gesetzt</string> <string name="combo_pump_action_setting_tbr">TBR wird gesetzt (%d%% / %d min)</string>
<string name="combo_pump_action_bolusing">Bolus wird abgegeben</string> <string name="combo_pump_action_bolusing">Bolus (%.1f E) wird abgegeben</string>
</resources> </resources>

View file

@ -779,8 +779,8 @@
<string name="combo_pump_state_running">Running</string> <string name="combo_pump_state_running">Running</string>
<string name="combo_pump_action_checking_history">Checking pump history</string> <string name="combo_pump_action_checking_history">Checking pump history</string>
<string name="combo_pump_action_cancelling_tbr">Cancelling TBR</string> <string name="combo_pump_action_cancelling_tbr">Cancelling TBR</string>
<string name="combo_pump_action_setting_tbr">Setting TBR</string> <string name="combo_pump_action_setting_tbr">Setting TBR (%d%% / %d min)</string>
<string name="combo_pump_action_bolusing">Bolusing</string> <string name="combo_pump_action_bolusing">Bolusing (%.1f U)</string>
<string name="combo_pump_action_refreshing">Refreshing</string> <string name="combo_pump_action_refreshing">Refreshing</string>
<string name="key_raise_urgent_alarms_as_android_notification" translatable="false">raise_urgent_alarms_as_android_notification</string> <string name="key_raise_urgent_alarms_as_android_notification" translatable="false">raise_urgent_alarms_as_android_notification</string>
<string name="raise_urgent_alarms_as_android_notification">Use system notifications for alerts</string> <string name="raise_urgent_alarms_as_android_notification">Use system notifications for alerts</string>