Merge remote-tracking branch 'origin/dev' into combo-scripter-v2

* origin/dev:
  check 30min interval only for basal rates
This commit is contained in:
Johannes Mockenhaupt 2018-01-07 11:38:51 +01:00
commit d72c243140
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -174,10 +174,6 @@ public class Profile {
}
double value = o.getDouble("value") * multiplier;
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) {
Notification notification = new Notification(Notification.ZERO_VALUE_IN_PROFILE, MainApp.sResources.getString(R.string.zerovalueinprofile), Notification.URGENT);
MainApp.bus().post(new EventNewNotification(notification));
@ -345,6 +341,14 @@ public class Profile {
public Double getBasal(Integer timeAsSeconds) {
if (basal_v == null) {
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
PumpInterface pump = ConfigBuilderPlugin.getActivePump();
if (pump != null) {