From e9883dcc3a1c2100d6eeef1d511e8877566ec0cb Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Wed, 26 Sep 2018 13:37:24 +0200 Subject: [PATCH] Revert "fix carb generator" This reverts commit 6403c5d9976f73d4b88b9f3b982f65c080d1650e. --- .../androidaps/plugins/Treatments/CarbsGenerator.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/CarbsGenerator.java b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/CarbsGenerator.java index b98e225eb2..90436f5eb2 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/CarbsGenerator.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Treatments/CarbsGenerator.java @@ -11,7 +11,6 @@ import info.nightscout.androidaps.db.Source; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; import info.nightscout.androidaps.plugins.Overview.Dialogs.ErrorHelperActivity; import info.nightscout.androidaps.queue.Callback; -import info.nightscout.utils.DateUtil; import static info.nightscout.utils.DateUtil.now; @@ -29,11 +28,8 @@ public class CarbsGenerator { } public static void createCarb(int carbs, long time, String eventType, @Nullable String notes) { - long now = DateUtil.now(); - int carbTime = (int) ((time - now) / 1000 / 60); DetailedBolusInfo carbInfo = new DetailedBolusInfo(); - carbInfo.date = now; - carbInfo.carbTime = carbTime; + carbInfo.date = time; carbInfo.eventType = eventType; carbInfo.carbs = carbs; carbInfo.context = MainApp.instance();