Merge branch 'dev' of https://github.com/MilosKozak/AndroidAPS into dev
This commit is contained in:
commit
99d83a60f4
4 changed files with 9 additions and 8 deletions
|
@ -631,7 +631,7 @@ public class ConfigBuilderPlugin implements PluginBase, ConstraintsInterface, Tr
|
|||
@Override
|
||||
@Nullable
|
||||
public TemporaryBasal getTempBasalFromHistory(long time) {
|
||||
return activeTreatments.getTempBasalFromHistory(time);
|
||||
return activeTreatments != null ? activeTreatments.getTempBasalFromHistory(time) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -139,8 +139,8 @@ public class PersistentNotificationPlugin implements PluginBase {
|
|||
}
|
||||
}
|
||||
|
||||
if (MainApp.getConfigBuilder().isTempBasalInProgress()) {
|
||||
TemporaryBasal activeTemp = MainApp.getConfigBuilder().getTempBasalFromHistory(System.currentTimeMillis());
|
||||
if (activeTemp != null) {
|
||||
line1 += " " + activeTemp.toStringShort();
|
||||
}
|
||||
|
||||
|
|
|
@ -403,8 +403,10 @@ public class TreatmentsPlugin implements PluginBase, TreatmentsInterface {
|
|||
|
||||
@Override
|
||||
public double getTempBasalRemainingMinutesFromHistory() {
|
||||
if (isTempBasalInProgress())
|
||||
return getTempBasalFromHistory(System.currentTimeMillis()).getPlannedRemainingMinutes();
|
||||
TemporaryBasal activeTemp = getTempBasalFromHistory(System.currentTimeMillis());
|
||||
if (activeTemp != null) {
|
||||
return activeTemp.getPlannedRemainingMinutes();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -182,10 +182,9 @@ public class StatuslinePlugin implements PluginBase {
|
|||
//Temp basal
|
||||
TreatmentsInterface treatmentsInterface = MainApp.getConfigBuilder();
|
||||
|
||||
if (treatmentsInterface.isTempBasalInProgress()) {
|
||||
TemporaryBasal activeTemp = treatmentsInterface.getTempBasalFromHistory(System.currentTimeMillis());
|
||||
if (activeTemp != null) {
|
||||
status += activeTemp.toStringShort();
|
||||
|
||||
}
|
||||
|
||||
//IOB
|
||||
|
|
Loading…
Reference in a new issue