Merge remote-tracking branch 'origin/dev' into combo-scripter-v2
* origin/dev: check 30min interval only for basal rates
This commit is contained in:
commit
d72c243140
1 changed files with 8 additions and 4 deletions
|
@ -174,10 +174,6 @@ public class Profile {
|
||||||
}
|
}
|
||||||
double value = o.getDouble("value") * multiplier;
|
double value = o.getDouble("value") * multiplier;
|
||||||
sparse.put(tas, value);
|
sparse.put(tas, value);
|
||||||
if (tas % 3600 != 0) {
|
|
||||||
Notification notification = new Notification(Notification.BASAL_PROFILE_NOT_ALIGNED_TO_HOURS, MainApp.sResources.getString(R.string.basalprofilenotaligned), Notification.URGENT);
|
|
||||||
MainApp.bus().post(new EventNewNotification(notification));
|
|
||||||
}
|
|
||||||
if (value == 0) {
|
if (value == 0) {
|
||||||
Notification notification = new Notification(Notification.ZERO_VALUE_IN_PROFILE, MainApp.sResources.getString(R.string.zerovalueinprofile), Notification.URGENT);
|
Notification notification = new Notification(Notification.ZERO_VALUE_IN_PROFILE, MainApp.sResources.getString(R.string.zerovalueinprofile), Notification.URGENT);
|
||||||
MainApp.bus().post(new EventNewNotification(notification));
|
MainApp.bus().post(new EventNewNotification(notification));
|
||||||
|
@ -345,6 +341,14 @@ public class Profile {
|
||||||
public Double getBasal(Integer timeAsSeconds) {
|
public Double getBasal(Integer timeAsSeconds) {
|
||||||
if (basal_v == null) {
|
if (basal_v == null) {
|
||||||
basal_v = convertToSparseArray(basal);
|
basal_v = convertToSparseArray(basal);
|
||||||
|
for (int index = 0; index < basal_v.size(); index++) {
|
||||||
|
long secondsFromMidnight = basal_v.keyAt(index);
|
||||||
|
if (secondsFromMidnight % 3600 != 0) {
|
||||||
|
Notification notification = new Notification(Notification.BASAL_PROFILE_NOT_ALIGNED_TO_HOURS, MainApp.sResources.getString(R.string.basalprofilenotaligned), Notification.URGENT);
|
||||||
|
MainApp.bus().post(new EventNewNotification(notification));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check for minimal basal value
|
// Check for minimal basal value
|
||||||
PumpInterface pump = ConfigBuilderPlugin.getActivePump();
|
PumpInterface pump = ConfigBuilderPlugin.getActivePump();
|
||||||
if (pump != null) {
|
if (pump != null) {
|
||||||
|
|
Loading…
Reference in a new issue