diff --git a/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewCalcProgress.kt b/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewCalcProgress.kt
new file mode 100644
index 0000000000..d1a2767701
--- /dev/null
+++ b/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewCalcProgress.kt
@@ -0,0 +1,3 @@
+package info.nightscout.rx.events
+
+class EventUpdateOverviewCalcProgress(val from: String) : Event()
\ No newline at end of file
diff --git a/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewGraph.kt b/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewGraph.kt
new file mode 100644
index 0000000000..93b77e2a93
--- /dev/null
+++ b/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewGraph.kt
@@ -0,0 +1,3 @@
+package info.nightscout.rx.events
+
+class EventUpdateOverviewGraph(val from: String) : Event()
\ No newline at end of file
diff --git a/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewIobCob.kt b/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewIobCob.kt
new file mode 100644
index 0000000000..d5ec8b197f
--- /dev/null
+++ b/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewIobCob.kt
@@ -0,0 +1,3 @@
+package info.nightscout.rx.events
+
+class EventUpdateOverviewIobCob(val from: String) : Event()
\ No newline at end of file
diff --git a/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewSensitivity.kt b/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewSensitivity.kt
new file mode 100644
index 0000000000..16da11f566
--- /dev/null
+++ b/app-wear-shared/shared/src/main/java/info/nightscout/rx/events/EventUpdateOverviewSensitivity.kt
@@ -0,0 +1,3 @@
+package info.nightscout.rx.events
+
+class EventUpdateOverviewSensitivity(val from: String) : Event()
\ No newline at end of file
diff --git a/app-wear-shared/shared/src/main/java/info/nightscout/shared/di/SharedModule.kt b/app-wear-shared/shared/src/main/java/info/nightscout/shared/di/SharedModule.kt
index e5b7f70778..735de9f807 100644
--- a/app-wear-shared/shared/src/main/java/info/nightscout/shared/di/SharedModule.kt
+++ b/app-wear-shared/shared/src/main/java/info/nightscout/shared/di/SharedModule.kt
@@ -6,5 +6,4 @@ import dagger.Module
includes = [
]
)
-open class SharedModule {
-}
\ No newline at end of file
+open class SharedModule
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 8871f0f1f6..805bcc4293 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -221,6 +221,7 @@ dependencies {
implementation project(':pump:omnipod-common')
implementation project(':pump:omnipod-eros')
implementation project(':pump:omnipod-dash')
+ implementation project(':workflow')
implementation fileTree(include: ['*.jar'], dir: 'libs')
diff --git a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt
index ee073320fe..e956dbe90d 100644
--- a/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt
+++ b/app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt
@@ -14,21 +14,21 @@ import dagger.android.HasAndroidInjector
import dagger.android.support.DaggerAppCompatActivity
import info.nightscout.androidaps.R
import info.nightscout.androidaps.databinding.ActivityHistorybrowseBinding
+import info.nightscout.core.events.EventIobCalculationProgress
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.core.workflow.CalculationWorkflow
import info.nightscout.interfaces.Config
+import info.nightscout.interfaces.overview.OverviewMenus
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.interfaces.profile.DefaultValueHelper
-import info.nightscout.plugins.general.overview.OverviewMenus
-import info.nightscout.plugins.general.overview.events.EventUpdateOverviewGraph
import info.nightscout.plugins.general.overview.graphData.GraphData
-import info.nightscout.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
import info.nightscout.rx.AapsSchedulers
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.EventAutosensCalculationFinished
import info.nightscout.rx.events.EventCustomCalculationFinished
import info.nightscout.rx.events.EventRefreshOverview
import info.nightscout.rx.events.EventScale
+import info.nightscout.rx.events.EventUpdateOverviewGraph
import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag
import info.nightscout.shared.extensions.toVisibility
diff --git a/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt b/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt
index 997874e3df..53ae37b9a7 100644
--- a/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt
+++ b/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt
@@ -35,6 +35,7 @@ import info.nightscout.rx.di.RxModule
import info.nightscout.shared.di.SharedModule
import info.nightscout.shared.impl.di.SharedImplModule
import info.nightscout.ui.di.UiModule
+import info.nightscout.workflow.di.WorkflowModule
import javax.inject.Singleton
@Singleton
diff --git a/app/src/main/java/info/nightscout/androidaps/utils/ProcessLifecycleListener.kt b/app/src/main/java/info/nightscout/androidaps/utils/ProcessLifecycleListener.kt
deleted file mode 100644
index 5a38c69ceb..0000000000
--- a/app/src/main/java/info/nightscout/androidaps/utils/ProcessLifecycleListener.kt
+++ /dev/null
@@ -1,2 +0,0 @@
-package info.nightscout.androidaps.utils
-
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflowImpl.kt b/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflowImpl.kt
index 834cabc6db..57253c8794 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflowImpl.kt
+++ b/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflowImpl.kt
@@ -19,8 +19,6 @@ import info.nightscout.core.workflow.CalculationWorkflow.Companion.MAIN_CALCULAT
import info.nightscout.interfaces.iob.IobCobCalculator
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin
-import info.nightscout.plugins.iob.iobCobCalculator.IobCobOref1Worker
-import info.nightscout.plugins.iob.iobCobCalculator.IobCobOrefWorker
import info.nightscout.rx.AapsSchedulers
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.Event
@@ -33,6 +31,20 @@ import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.utils.DateUtil
+import info.nightscout.workflow.DummyWorker
+import info.nightscout.workflow.InvokeLoopWorker
+import info.nightscout.workflow.LoadBgDataWorker
+import info.nightscout.workflow.PrepareBasalDataWorker
+import info.nightscout.workflow.PrepareBgDataWorker
+import info.nightscout.workflow.PrepareBucketedDataWorker
+import info.nightscout.workflow.PrepareIobAutosensGraphDataWorker
+import info.nightscout.workflow.PreparePredictionsWorker
+import info.nightscout.workflow.PrepareTemporaryTargetDataWorker
+import info.nightscout.workflow.PrepareTreatmentsDataWorker
+import info.nightscout.workflow.UpdateGraphWorker
+import info.nightscout.workflow.UpdateIobCobSensWorker
+import info.nightscout.workflow.iob.IobCobOref1Worker
+import info.nightscout.workflow.iob.IobCobOrefWorker
import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign
import javax.inject.Inject
diff --git a/build.gradle b/build.gradle
index 215f2028e8..258c9ee7d1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -28,7 +28,7 @@ buildscript {
tink_version = '1.7.0'
json_version = '20220320'
serialization_version = '1.4.1'
- joda_version = '2.12.1'
+ joda_version = '2.12.1.1'
swipe_version = '1.1.0'
junit_version = '4.13.2'
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/events/EventIobCalculationProgress.kt b/core/core-main/src/main/java/info/nightscout/core/events/EventIobCalculationProgress.kt
similarity index 79%
rename from plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/events/EventIobCalculationProgress.kt
rename to core/core-main/src/main/java/info/nightscout/core/events/EventIobCalculationProgress.kt
index a21791fbea..c532aeaa21 100644
--- a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/events/EventIobCalculationProgress.kt
+++ b/core/core-main/src/main/java/info/nightscout/core/events/EventIobCalculationProgress.kt
@@ -1,4 +1,4 @@
-package info.nightscout.plugins.iob.iobCobCalculator.events
+package info.nightscout.core.events
import info.nightscout.core.workflow.CalculationWorkflow
import info.nightscout.rx.events.Event
diff --git a/core/core-main/src/main/res/values-ru-rRU/protection.xml b/core/core-main/src/main/res/values-ru-rRU/protection.xml
index d62cc4222a..799438431b 100644
--- a/core/core-main/src/main/res/values-ru-rRU/protection.xml
+++ b/core/core-main/src/main/res/values-ru-rRU/protection.xml
@@ -6,15 +6,26 @@
Защита приложения
Защита болюсов
Пароль параметров
+ ПИН-код настроек
Пароль приложения
+ PIN-код приложения
Пароль болюсов
+ Пин-код болюса
+ Тайм-аут удержания пароля и пин-кода [s]
+ Время до ввода пароля или PIN-кода
Биометрия
Настраиваемый пароль
+ Настраиваемый пин-код
Без защиты
Небезопасный резервный вход
Биометрической защите требуется главный пароль для безопасности.\n\n Установите главный пароль!
Пароль задан!
+ PIN-код установлен!
Пароль не задан
+ PIN-код не задан
Пароль не был изменён
+ PIN-код не изменён
+ PIN-код очищен!
Введите пароль здесь
+ Введите PIN-код здесь
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/GraphView.java b/core/graphview/src/main/java/com/jjoe64/graphview/GraphView.java
index 51debe1eef..d00fad3de8 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/GraphView.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/GraphView.java
@@ -97,9 +97,7 @@ public class GraphView extends View {
lastDown = 0;
}
} else if (event.getAction() == MotionEvent.ACTION_UP) {
- if (System.currentTimeMillis() - lastDown < 400) {
- return true;
- }
+ return System.currentTimeMillis() - lastDown < 400;
}
return false;
}
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/LabelFormatter.java b/core/graphview/src/main/java/com/jjoe64/graphview/LabelFormatter.java
index 80aad2990a..2f0684c2b1 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/LabelFormatter.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/LabelFormatter.java
@@ -37,7 +37,7 @@ public interface LabelFormatter {
* false if it is a value for the y axis
* @return the formatted number as string
*/
- public String formatLabel(double value, boolean isValueX);
+ String formatLabel(double value, boolean isValueX);
/**
* will be called in order to have a
@@ -50,5 +50,5 @@ public interface LabelFormatter {
*
* @param viewport the used viewport
*/
- public void setViewport(Viewport viewport);
+ void setViewport(Viewport viewport);
}
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/LegendRenderer.java b/core/graphview/src/main/java/com/jjoe64/graphview/LegendRenderer.java
index db901577f7..14a3adf79a 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/LegendRenderer.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/LegendRenderer.java
@@ -78,7 +78,7 @@ public class LegendRenderer {
/**
* wrapped styles
*/
- private Styles mStyles;
+ private final Styles mStyles;
/**
* reference to the graphview
@@ -94,7 +94,7 @@ public class LegendRenderer {
/**
* paint for the drawing
*/
- private Paint mPaint;
+ private final Paint mPaint;
/**
* cached legend width
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/SecondScale.java b/core/graphview/src/main/java/com/jjoe64/graphview/SecondScale.java
index 1fff8ee8a9..7c5dbb12aa 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/SecondScale.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/SecondScale.java
@@ -53,7 +53,7 @@ public class SecondScale {
* For the current version this is always
* true.
*/
- private boolean mYAxisBoundsManual = true;
+ private final boolean mYAxisBoundsManual = true;
/**
* min y value for the y axis bounds
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/ValueDependentColor.java b/core/graphview/src/main/java/com/jjoe64/graphview/ValueDependentColor.java
index a02f22a21e..64b73de54a 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/ValueDependentColor.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/ValueDependentColor.java
@@ -37,5 +37,5 @@ public interface ValueDependentColor {
* @return the color that the bar should be drawn with
* Generate the int via the android.graphics.Color class.
*/
- public int get(T data);
+ int get(T data);
}
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/series/BarGraphSeries.java b/core/graphview/src/main/java/com/jjoe64/graphview/series/BarGraphSeries.java
index ec40a239a4..6b6298c655 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/series/BarGraphSeries.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/series/BarGraphSeries.java
@@ -44,7 +44,7 @@ public class BarGraphSeries extends BaseSeries
/**
* paint to do drawing on canvas
*/
- private Paint mPaint;
+ private final Paint mPaint;
/**
* spacing between the bars in percentage.
@@ -83,7 +83,7 @@ public class BarGraphSeries extends BaseSeries
* stores the coordinates of the bars to
* trigger tap on series events.
*/
- private Map mDataPoints = new HashMap();
+ private final Map mDataPoints = new HashMap();
/**
* creates bar series without any data
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/series/BaseSeries.java b/core/graphview/src/main/java/com/jjoe64/graphview/series/BaseSeries.java
index 8ecdf23a73..bd7cb5081a 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/series/BaseSeries.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/series/BaseSeries.java
@@ -25,6 +25,7 @@ import android.util.Log;
import com.jjoe64.graphview.GraphView;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -61,7 +62,7 @@ public abstract class BaseSeries implements Series
*
* will be filled while drawing via {@link #registerDataPoint(float, float, DataPointInterface)}
*/
- private Map mDataPoints = new HashMap();
+ private final Map mDataPoints = new HashMap();
/**
* title for this series that can be displayed
@@ -84,7 +85,7 @@ public abstract class BaseSeries implements Series
* stores the graphviews where this series is used.
* Can be more than one.
*/
- private List mGraphViews;
+ private final List mGraphViews;
/**
* creates series without data
@@ -101,9 +102,7 @@ public abstract class BaseSeries implements Series
*/
public BaseSeries(E[] data) {
mGraphViews = new ArrayList();
- for (E d : data) {
- mData.add(d);
- }
+ Collections.addAll(mData, data);
}
/**
@@ -168,7 +167,7 @@ public abstract class BaseSeries implements Series
return mData.iterator();
} else {
return new Iterator() {
- Iterator org = mData.iterator();
+ final Iterator org = mData.iterator();
E nextValue = null;
E nextNextValue = null;
boolean plusOne = true;
@@ -350,9 +349,7 @@ public abstract class BaseSeries implements Series
*/
public void resetData(E[] data) {
mData.clear();
- for (E d : data) {
- mData.add(d);
- }
+ Collections.addAll(mData, data);
checkValueOrder(null);
// update graphview
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/series/DataPoint.java b/core/graphview/src/main/java/com/jjoe64/graphview/series/DataPoint.java
index b5f5eb3ef3..6f6cffaf49 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/series/DataPoint.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/series/DataPoint.java
@@ -33,8 +33,8 @@ import java.util.Date;
public class DataPoint implements DataPointInterface, Serializable {
private static final long serialVersionUID=1428263322645L;
- private double x;
- private double y;
+ private final double x;
+ private final double y;
public DataPoint(double x, double y) {
this.x=x;
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/series/DataPointInterface.java b/core/graphview/src/main/java/com/jjoe64/graphview/series/DataPointInterface.java
index 9be683bef8..ac7295fa49 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/series/DataPointInterface.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/series/DataPointInterface.java
@@ -32,10 +32,10 @@ public interface DataPointInterface {
/**
* @return the x value
*/
- public double getX();
+ double getX();
/**
* @return the y value
*/
- public double getY();
+ double getY();
}
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/series/PointsGraphSeries.java b/core/graphview/src/main/java/com/jjoe64/graphview/series/PointsGraphSeries.java
index c57d476d7b..a320b4e735 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/series/PointsGraphSeries.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/series/PointsGraphSeries.java
@@ -41,7 +41,7 @@ public class PointsGraphSeries extends BaseSeries<
* interface to implement a custom
* drawing for the data points.
*/
- public static interface CustomShape {
+ public interface CustomShape {
/**
* called when drawing a single data point.
* use the x and y coordinates to render your
@@ -201,10 +201,8 @@ public class PointsGraphSeries extends BaseSeries<
double orgY = y;
// overdraw
- boolean overdraw = false;
- if (x > graphWidth) { // end right
- overdraw = true;
- }
+ boolean overdraw = x > graphWidth;
+ // end right
if (y < 0) { // end bottom
overdraw = true;
}
diff --git a/core/graphview/src/main/java/com/jjoe64/graphview/series/Series.java b/core/graphview/src/main/java/com/jjoe64/graphview/series/Series.java
index dce32eb78e..73a312bae4 100644
--- a/core/graphview/src/main/java/com/jjoe64/graphview/series/Series.java
+++ b/core/graphview/src/main/java/com/jjoe64/graphview/series/Series.java
@@ -42,22 +42,22 @@ public interface Series {
/**
* @return the lowest x-value of the data
*/
- public double getLowestValueX();
+ double getLowestValueX();
/**
* @return the highest x-value of the data
*/
- public double getHighestValueX();
+ double getHighestValueX();
/**
* @return the lowest y-value of the data
*/
- public double getLowestValueY();
+ double getLowestValueY();
/**
* @return the highest y-value of the data
*/
- public double getHighestValueY();
+ double getHighestValueY();
/**
* get the values for a specific range. It is
@@ -69,7 +69,7 @@ public interface Series {
* @return all datapoints between the from and until x-value
* including the from and until data points.
*/
- public Iterator getValues(double from, double until);
+ Iterator getValues(double from, double until);
/**
* Plots the series to the viewport.
@@ -82,25 +82,25 @@ public interface Series {
* @param canvas canvas to draw on
* @param isSecondScale true if the drawing is for the second scale
*/
- public void draw(GraphView graphView, Canvas canvas, boolean isSecondScale);
+ void draw(GraphView graphView, Canvas canvas, boolean isSecondScale);
/**
* @return the title of the series. Used in the legend
*/
- public String getTitle();
+ String getTitle();
/**
* @return the color of the series. Used in the legend and should
* be used for the plotted points or lines.
*/
- public int getColor();
+ int getColor();
/**
* set a listener for tap on a data point.
*
* @param l listener
*/
- public void setOnDataPointTapListener(OnDataPointTapListener l);
+ void setOnDataPointTapListener(OnDataPointTapListener l);
/**
* called by the tap detector in order to trigger
diff --git a/core/interfaces/src/main/java/info/nightscout/interfaces/overview/OverviewMenus.kt b/core/interfaces/src/main/java/info/nightscout/interfaces/overview/OverviewMenus.kt
new file mode 100644
index 0000000000..0129bcbe19
--- /dev/null
+++ b/core/interfaces/src/main/java/info/nightscout/interfaces/overview/OverviewMenus.kt
@@ -0,0 +1,26 @@
+package info.nightscout.interfaces.overview
+
+import android.content.Context
+import android.widget.ImageButton
+
+interface OverviewMenus {
+ enum class CharType {
+ PRE,
+ TREAT,
+ BAS,
+ ABS,
+ IOB,
+ COB,
+ DEV,
+ BGI,
+ SEN,
+ ACT,
+ DEVSLOPE
+ }
+
+ val setting: List>
+ fun loadGraphConfig()
+ fun setupChartMenu(context: Context, chartButton: ImageButton)
+ fun enabledTypes(graph: Int): String
+ fun isEnabledIn(type: CharType): Int
+}
\ No newline at end of file
diff --git a/core/interfaces/src/main/java/info/nightscout/interfaces/source/DoingOwnUploadSource.kt b/core/interfaces/src/main/java/info/nightscout/interfaces/source/DoingOwnUploadSource.kt
index cd582b2734..c44c70ff22 100644
--- a/core/interfaces/src/main/java/info/nightscout/interfaces/source/DoingOwnUploadSource.kt
+++ b/core/interfaces/src/main/java/info/nightscout/interfaces/source/DoingOwnUploadSource.kt
@@ -1,4 +1,3 @@
package info.nightscout.interfaces.source
-interface DoingOwnUploadSource {
-}
\ No newline at end of file
+interface DoingOwnUploadSource
\ No newline at end of file
diff --git a/core/ui/src/main/res/values-fr-rFR/strings.xml b/core/ui/src/main/res/values-fr-rFR/strings.xml
index bdbf183c60..03b0ca429a 100644
--- a/core/ui/src/main/res/values-fr-rFR/strings.xml
+++ b/core/ui/src/main/res/values-fr-rFR/strings.xml
@@ -29,6 +29,10 @@
Superbolus
Pompe suspendue
Et
+ Patient
+ Résultat
+ Paramètres
+ Voyants d\'état
Remonter les Gly vers NS
Insuline
n/d
@@ -41,6 +45,7 @@
Muet pendant 5 minutes
Muet
Succès
+ Paramètres Avancés
Déverrouiller les paramètres
@@ -109,6 +114,7 @@
Localisation désactivée
Afin que la recherche par Bluetooth puisse marcher sur les nouveaux appareils, la localisation doit être activée. AAPS ne trace pas votre position, sauf lorsque vous activez l\'option Message d\'Urgence.
+ Préférences du plugin
Autorisation SMS manquante
diff --git a/core/ui/src/main/res/values-ru-rRU/strings.xml b/core/ui/src/main/res/values-ru-rRU/strings.xml
index a8f3ef1847..780c453a67 100644
--- a/core/ui/src/main/res/values-ru-rRU/strings.xml
+++ b/core/ui/src/main/res/values-ru-rRU/strings.xml
@@ -45,6 +45,7 @@
Отключить уведомления на 5 минут
Отключить звук
Успешно
+ Дополнительные настройки
Разблокировать настройки
diff --git a/implementation/src/main/res/values-cs-rCZ/strings.xml b/implementation/src/main/res/values-cs-rCZ/strings.xml
index 3d0934c5f9..618307654f 100644
--- a/implementation/src/main/res/values-cs-rCZ/strings.xml
+++ b/implementation/src/main/res/values-cs-rCZ/strings.xml
@@ -24,4 +24,5 @@
Podrobně 14 dní
Denní TIR
Noční TIR
+ Sach
diff --git a/implementation/src/main/res/values-fr-rFR/strings.xml b/implementation/src/main/res/values-fr-rFR/strings.xml
index e60e886bb9..67e5c10fc9 100644
--- a/implementation/src/main/res/values-fr-rFR/strings.xml
+++ b/implementation/src/main/res/values-fr-rFR/strings.xml
@@ -24,4 +24,5 @@
Détail de 14 jours
TIR Jour
TIR Nuit
+ Gluc.
diff --git a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java
index 883ebb5592..6e4039d739 100644
--- a/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java
+++ b/insight/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java
@@ -68,7 +68,8 @@ public class InsightPairingActivity extends DaggerAppCompatActivity implements I
@Override
public void onServiceConnected(ComponentName name, IBinder binder) {
service = ((InsightConnectionService.LocalBinder) binder).getService();
- if (service.isPaired()) return;
+ if (service.isPaired()) {
+ }
else {
service.requestConnection(InsightPairingActivity.this);
service.registerStateCallback(InsightPairingActivity.this);
diff --git a/insight/src/main/res/values-fr-rFR/strings.xml b/insight/src/main/res/values-fr-rFR/strings.xml
index caf8cb153b..218c71d5b1 100644
--- a/insight/src/main/res/values-fr-rFR/strings.xml
+++ b/insight/src/main/res/values-fr-rFR/strings.xml
@@ -14,8 +14,8 @@
Mode de fonctionnement
Intégration des pompes Accu-Chek Insight
Non inséré
- DTI Bolus
- DTI Basale
+ DTQ Bolus
+ DTQ Basale
%1$d%% pour %2$d / %3$d min
Bolus mixte
%1$.2f / %2$.2f U pour %3$d min
@@ -40,7 +40,7 @@
DBT : %1$d%% pour %2$d / %3$d min
Étendue : %1$.2f / %2$.2f U pour %3$d min
Mixte : %1$.2f / %2$.2f U pour %3$d min
- DTI : %1$.2f
+ DTQ : %1$.2f
Réserv.: %1$.2f U
Batt.: %1$d%%
Version du logiciel
diff --git a/plugins/configuration/src/main/res/values-fr-rFR/strings.xml b/plugins/configuration/src/main/res/values-fr-rFR/strings.xml
index bf63fdaf21..33b0772d4b 100644
--- a/plugins/configuration/src/main/res/values-fr-rFR/strings.xml
+++ b/plugins/configuration/src/main/res/values-fr-rFR/strings.xml
@@ -112,8 +112,22 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Maintenance
MAINT
Fournir différentes fonctions de maintenance (ex : envoyer, supprimer le journal).
+ Nettoyer la base de données
Voulez-vous nettoyer la base de données ?\nCela supprimera les modifications suivies et les données historiques de plus de 3 mois.
Entrées effacées
+ Voulez-vous vraiment réinitialiser les bases de données ?
+ Paramètres de maintenance
+ Destinataire de l\'email
+ Nombre de journaux à envoyer
+ Envoyer les journaux par e-mail
+ Supprimer les journaux
+ Version Nightscout :
+ Mode ingénierie actif
+ Fichiers journaux
+ Paramètres journal
+ Divers
+ Réinitialiser les Bases de Données
+ Rétablir les valeurs par défaut
exporté il y a %1$s
exporté à %1$s
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/di/OverviewModule.kt b/plugins/main/src/main/java/info/nightscout/plugins/di/OverviewModule.kt
index b7f7337cca..a969da26bc 100644
--- a/plugins/main/src/main/java/info/nightscout/plugins/di/OverviewModule.kt
+++ b/plugins/main/src/main/java/info/nightscout/plugins/di/OverviewModule.kt
@@ -1,15 +1,22 @@
package info.nightscout.plugins.di
+import dagger.Binds
import dagger.Module
import dagger.android.ContributesAndroidInjector
+import info.nightscout.interfaces.overview.OverviewMenus
import info.nightscout.plugins.general.overview.OverviewFragment
+import info.nightscout.plugins.general.overview.OverviewMenusImpl
import info.nightscout.plugins.general.overview.activities.QuickWizardListActivity
import info.nightscout.plugins.general.overview.dialogs.EditQuickWizardDialog
import info.nightscout.plugins.general.overview.graphData.GraphData
import info.nightscout.plugins.general.overview.notifications.DismissNotificationService
import info.nightscout.plugins.general.overview.notifications.NotificationWithAction
-@Module
+@Module(
+ includes = [
+ OverviewModule.Bindings::class
+ ]
+)
@Suppress("unused")
abstract class OverviewModule {
@@ -19,4 +26,10 @@ abstract class OverviewModule {
@ContributesAndroidInjector abstract fun contributesOverviewFragment(): OverviewFragment
@ContributesAndroidInjector abstract fun notificationWithActionInjector(): NotificationWithAction
@ContributesAndroidInjector abstract fun graphDataInjector(): GraphData
+
+ @Module
+ interface Bindings {
+
+ @Binds fun bindOverviewMenus(overviewMenusImpl: OverviewMenusImpl): OverviewMenus
+ }
}
\ No newline at end of file
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/di/SourceModule.kt b/plugins/main/src/main/java/info/nightscout/plugins/di/SourceModule.kt
index 8e3559aa15..cc2fcb366a 100644
--- a/plugins/main/src/main/java/info/nightscout/plugins/di/SourceModule.kt
+++ b/plugins/main/src/main/java/info/nightscout/plugins/di/SourceModule.kt
@@ -29,7 +29,7 @@ abstract class SourceModule {
@ContributesAndroidInjector abstract fun contributesBGSourceFragment(): BGSourceFragment
@ContributesAndroidInjector abstract fun contributesNSProfileWorker(): ProfilePlugin.NSProfileWorker
- @ContributesAndroidInjector abstract fun contributesNSClientSourceWorker(): info.nightscout.plugins.source.NSClientSourcePlugin.NSClientSourceWorker
+ @ContributesAndroidInjector abstract fun contributesNSClientSourceWorker(): NSClientSourcePlugin.NSClientSourceWorker
@ContributesAndroidInjector abstract fun contributesXdripWorker(): XdripPlugin.XdripWorker
@ContributesAndroidInjector abstract fun contributesDexcomWorker(): DexcomPlugin.DexcomWorker
@ContributesAndroidInjector abstract fun contributesMM640gWorker(): MM640gPlugin.MM640gWorker
@@ -43,6 +43,6 @@ abstract class SourceModule {
@Module
interface Bindings {
- @Binds fun bindNSClientSource(nsClientSourcePlugin: info.nightscout.plugins.source.NSClientSourcePlugin): NSClientSource
+ @Binds fun bindNSClientSource(nsClientSourcePlugin: NSClientSourcePlugin): NSClientSource
}
}
\ No newline at end of file
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewFragment.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewFragment.kt
index 04a99bde0e..f9718c624d 100644
--- a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewFragment.kt
+++ b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewFragment.kt
@@ -29,9 +29,9 @@ import dagger.android.HasAndroidInjector
import dagger.android.support.DaggerFragment
import info.nightscout.core.extensions.directionToIcon
import info.nightscout.core.extensions.valueToUnitsString
-import info.nightscout.core.iob.iobCobCalculator.GlucoseStatusProvider
import info.nightscout.core.graph.OverviewData
import info.nightscout.core.iob.displayText
+import info.nightscout.core.iob.iobCobCalculator.GlucoseStatusProvider
import info.nightscout.core.profile.ProfileSealed
import info.nightscout.core.ui.UIRunnable
import info.nightscout.core.ui.dialogs.OKDialog
@@ -56,6 +56,7 @@ import info.nightscout.interfaces.iob.IobCobCalculator
import info.nightscout.interfaces.logging.UserEntryLogger
import info.nightscout.interfaces.nsclient.NSSettingsStatus
import info.nightscout.interfaces.nsclient.ProcessedDeviceStatusData
+import info.nightscout.interfaces.overview.OverviewMenus
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.interfaces.plugin.PluginBase
import info.nightscout.interfaces.profile.DefaultValueHelper
@@ -70,10 +71,6 @@ import info.nightscout.plugins.R
import info.nightscout.plugins.aps.loop.events.EventNewOpenLoopNotification
import info.nightscout.plugins.databinding.OverviewFragmentBinding
import info.nightscout.plugins.general.overview.activities.QuickWizardListActivity
-import info.nightscout.plugins.general.overview.events.EventUpdateOverviewCalcProgress
-import info.nightscout.plugins.general.overview.events.EventUpdateOverviewGraph
-import info.nightscout.plugins.general.overview.events.EventUpdateOverviewIobCob
-import info.nightscout.plugins.general.overview.events.EventUpdateOverviewSensitivity
import info.nightscout.plugins.general.overview.graphData.GraphData
import info.nightscout.plugins.general.overview.notifications.NotificationStore
import info.nightscout.plugins.general.overview.notifications.events.EventUpdateOverviewNotification
@@ -94,6 +91,10 @@ import info.nightscout.rx.events.EventRefreshOverview
import info.nightscout.rx.events.EventScale
import info.nightscout.rx.events.EventTempBasalChange
import info.nightscout.rx.events.EventTempTargetChange
+import info.nightscout.rx.events.EventUpdateOverviewCalcProgress
+import info.nightscout.rx.events.EventUpdateOverviewGraph
+import info.nightscout.rx.events.EventUpdateOverviewIobCob
+import info.nightscout.rx.events.EventUpdateOverviewSensitivity
import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.weardata.EventData
import info.nightscout.shared.extensions.runOnUiThread
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewMenus.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewMenusImpl.kt
similarity index 88%
rename from plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewMenus.kt
rename to plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewMenusImpl.kt
index 1f0ef27102..c517c6c570 100644
--- a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewMenus.kt
+++ b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewMenusImpl.kt
@@ -14,6 +14,7 @@ import com.google.gson.Gson
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.interfaces.Config
import info.nightscout.interfaces.aps.Loop
+import info.nightscout.interfaces.overview.OverviewMenus
import info.nightscout.plugins.R
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.EventRefreshOverview
@@ -25,7 +26,7 @@ import javax.inject.Inject
import javax.inject.Singleton
@Singleton
-class OverviewMenus @Inject constructor(
+class OverviewMenusImpl @Inject constructor(
private val aapsLogger: AAPSLogger,
private val rh: ResourceHelper,
private val sp: SP,
@@ -33,9 +34,9 @@ class OverviewMenus @Inject constructor(
private val config: Config,
private val loop: Loop,
private val fabricPrivacy: FabricPrivacy
-) {
+) : OverviewMenus {
- enum class CharType(@StringRes val nameId: Int, @AttrRes val attrId: Int, @AttrRes val attrTextId: Int, val primary: Boolean, val secondary: Boolean, @StringRes val shortnameId: Int) {
+ enum class CharTypeData(@StringRes val nameId: Int, @AttrRes val attrId: Int, @AttrRes val attrTextId: Int, val primary: Boolean, val secondary: Boolean, @StringRes val shortnameId: Int) {
PRE(R.string.overview_show_predictions, R.attr.predictionColor, R.attr.menuTextColor, primary = true, secondary = false, shortnameId = R.string.prediction_shortname),
TREAT(R.string.overview_show_treatments, R.attr.cobColor, R.attr.menuTextColor, primary = true, secondary = false, shortnameId = R.string.treatments_shortname),
BAS(R.string.overview_show_basals, R.attr.basal, R.attr.menuTextColor, primary = true, secondary = false, shortnameId = R.string.basal_shortname),
@@ -55,9 +56,9 @@ class OverviewMenus @Inject constructor(
const val SCALE_ID = 1001
}
- fun enabledTypes(graph: Int): String {
+ override fun enabledTypes(graph: Int): String {
val r = StringBuilder()
- for (type in CharType.values()) if (_setting[graph][type.ordinal]) {
+ for (type in CharTypeData.values()) if (_setting[graph][type.ordinal]) {
r.append(rh.gs(type.shortnameId))
r.append(" ")
}
@@ -66,7 +67,7 @@ class OverviewMenus @Inject constructor(
private var _setting: MutableList> = ArrayList()
- val setting: List>
+ override val setting: List>
@Synchronized get() = _setting.toMutableList() // implicitly does a list copy
@Synchronized
@@ -77,23 +78,23 @@ class OverviewMenus @Inject constructor(
}
@Synchronized
- fun loadGraphConfig() {
+ override fun loadGraphConfig() {
val sts = sp.getString(R.string.key_graph_config, "")
if (sts.isNotEmpty()) {
_setting = Gson().fromJson(sts, Array>::class.java).toMutableList()
// reset when new CharType added
for (s in _setting)
- if (s.size != CharType.values().size) {
+ if (s.size != OverviewMenus.CharType.values().size) {
_setting = ArrayList()
- _setting.add(Array(CharType.values().size) { true })
+ _setting.add(Array(OverviewMenus.CharType.values().size) { true })
}
} else {
_setting = ArrayList()
- _setting.add(Array(CharType.values().size) { true })
+ _setting.add(Array(OverviewMenus.CharType.values().size) { true })
}
}
- fun setupChartMenu(context: Context, chartButton: ImageButton) {
+ override fun setupChartMenu(context: Context, chartButton: ImageButton) {
val settingsCopy = setting
val numOfGraphs = settingsCopy.size // 1 main + x secondary
@@ -120,12 +121,12 @@ class OverviewMenus @Inject constructor(
dividerItem.isCheckable = true
dividerItem.isChecked = true
}
- CharType.values().forEach { m ->
+ CharTypeData.values().forEach { m ->
if (g == 0 && !m.primary) return@forEach
if (g > 0 && !m.secondary) return@forEach
var insert = true
- if (m == CharType.PRE) insert = predictionsAvailable
- if (m == CharType.DEVSLOPE) insert = config.isDev()
+ if (m == CharTypeData.PRE) insert = predictionsAvailable
+ if (m == CharTypeData.DEVSLOPE) insert = config.isDev()
if (used.contains(m.ordinal)) insert = false
for (g2 in g + 1 until numOfGraphs) {
if (settingsCopy[g2][m.ordinal]) insert = false
@@ -165,7 +166,7 @@ class OverviewMenus @Inject constructor(
it.itemId == numOfGraphs -> {
// add new empty
- _setting.add(Array(CharType.values().size) { false })
+ _setting.add(Array(CharTypeData.values().size) { false })
}
it.itemId < 100 -> {
@@ -194,7 +195,7 @@ class OverviewMenus @Inject constructor(
}
}
- fun isEnabledIn(type: CharType): Int {
+ override fun isEnabledIn(type: OverviewMenus.CharType): Int {
val settingsCopy = setting
val numOfGraphs = settingsCopy.size // 1 main + x secondary
for (g in 0 until numOfGraphs) if (settingsCopy[g][type.ordinal]) return g
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewPlugin.kt
index 77c7426a82..666e72a3f5 100644
--- a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewPlugin.kt
+++ b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/OverviewPlugin.kt
@@ -5,31 +5,32 @@ import androidx.annotation.StringRes
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreference
import dagger.android.HasAndroidInjector
+import info.nightscout.core.events.EventIobCalculationProgress
+import info.nightscout.core.events.EventNewNotification
import info.nightscout.core.extensions.putDouble
import info.nightscout.core.extensions.putInt
import info.nightscout.core.extensions.putString
import info.nightscout.core.extensions.storeDouble
import info.nightscout.core.extensions.storeInt
import info.nightscout.core.extensions.storeString
-import info.nightscout.core.events.EventNewNotification
import info.nightscout.core.graph.OverviewData
import info.nightscout.core.ui.dialogs.OKDialog
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.interfaces.Config
import info.nightscout.interfaces.Overview
+import info.nightscout.interfaces.overview.OverviewMenus
import info.nightscout.interfaces.plugin.PluginBase
import info.nightscout.interfaces.plugin.PluginDescription
import info.nightscout.interfaces.plugin.PluginType
import info.nightscout.plugins.R
-import info.nightscout.plugins.general.overview.events.EventUpdateOverviewCalcProgress
import info.nightscout.plugins.general.overview.notifications.NotificationStore
import info.nightscout.plugins.general.overview.notifications.NotificationWithAction
import info.nightscout.plugins.general.overview.notifications.events.EventUpdateOverviewNotification
-import info.nightscout.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
import info.nightscout.rx.AapsSchedulers
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.EventDismissNotification
import info.nightscout.rx.events.EventPumpStatusChanged
+import info.nightscout.rx.events.EventUpdateOverviewCalcProgress
import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewCalcProgress.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewCalcProgress.kt
deleted file mode 100644
index cb4aabd394..0000000000
--- a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewCalcProgress.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-package info.nightscout.plugins.general.overview.events
-
-import info.nightscout.rx.events.Event
-
-class EventUpdateOverviewCalcProgress(val from: String) : Event()
\ No newline at end of file
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewGraph.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewGraph.kt
deleted file mode 100644
index 37bcf5d7ea..0000000000
--- a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewGraph.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-package info.nightscout.plugins.general.overview.events
-
-import info.nightscout.rx.events.Event
-
-class EventUpdateOverviewGraph(val from: String) : Event()
\ No newline at end of file
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewIobCob.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewIobCob.kt
deleted file mode 100644
index dd0a2ff82e..0000000000
--- a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewIobCob.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-package info.nightscout.plugins.general.overview.events
-
-import info.nightscout.rx.events.Event
-
-class EventUpdateOverviewIobCob(val from: String) : Event()
\ No newline at end of file
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewSensitivity.kt b/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewSensitivity.kt
deleted file mode 100644
index d9490a803a..0000000000
--- a/plugins/main/src/main/java/info/nightscout/plugins/general/overview/events/EventUpdateOverviewSensitivity.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-package info.nightscout.plugins.general.overview.events
-
-import info.nightscout.rx.events.Event
-
-class EventUpdateOverviewSensitivity(val from: String) : Event()
\ No newline at end of file
diff --git a/plugins/main/src/main/res/values-ru-rRU/strings.xml b/plugins/main/src/main/res/values-ru-rRU/strings.xml
index 20d737e210..a4646e19e4 100644
--- a/plugins/main/src/main/res/values-ru-rRU/strings.xml
+++ b/plugins/main/src/main/res/values-ru-rRU/strings.xml
@@ -1,7 +1,35 @@
+ SMS коммуникатор
SMS
+ Выполнить дистанционное управление AAPS при помощи команд SMS.
+ из приложения Authenticator для %1$s и дополните пином в конце
+ Дополнительный обязательный пин-код в конце маркера
+ Дополнительные цифры, которые должны запоминаться и добавляться в конце каждого сгенерированного одноразового пароля
+ Настройка аутентификации
+ Код для проверки:
+ OTP + ПИН-код
+ Проверочный код состоит из 6 цифр, отображаемых приложением Authenticator (известным как OTP), за которым следует 3 или более цифр обязательного PIN-кода.
+ Сбросить аутентификаторы
+ Сбросить ключ идентификации
+ Вы действительно хотите сбросить ключ аутентификации? Все сконфигурированные в настоящее время ключи станут недопустимы, и придется их настроить заново.
+ Создан новый ключ аутентификации! Для идентификации используйте обновленный QRCode.
+ Экспорт секретного кода OTP
+ Вы действительно хотите скопировать пароль OTP в буфер обмена?\n\nЭто может потребоваться только в том случае, если у вашего приложения идентификации проблемы при сканировании QR кода, вы хотите ввести его вручную или настроить аппаратный маркер OTP с помощью специального приложения.
+ Секретный одноразовый код OTP (в формате Base32) экспортирован и скопирован в буфер обмена. Вставьте его в систему идентификации или аппаратный маркер OTP!
+ 1. Установить Аутентификатор
+ 2. Сканируйте код для настройки OTP кодов AAPS
+ 3. Проверьте одноразовый пароль
+ Сбросить авторизацию
+ На каждом отслеживающем телефоне установите приложение Authenticator, поддерживающее маркеры TOTP RFC 6238. Популярные бесплатные приложения: \n Authy\n Google Authenticator\n LastPass Authenticator\n FreeOTP Authenticator
+ После сброса аутентификатора вы делаете все созданные идентификаторы недействительными. Вам нужно будет снова создать их!
+ Неверный код. Команда отменена.
+ Время ожидания окончания предыдущего соединения с помпой истекло
+ разрешенные телефонные номера
+ + XXXXXXXXXX; + YYYYYYYYYY
+ Для подачи болюса %1$.2fед ответьте кодом %2$s
+ Для подачи болюса %1$.2fед ответьте кодом %2$s
Чтобы установить временную цель %1$s ответьте кодом %2$s
Чтобы отменить временную цель ответьте кодом %1$s
Чтобы отключить службу удаленных SMS-сообщений ответьте кодом %1$s.\n\n Имейте в виду, что вы сможете вновь активировать ее только с основного телефона AAPS.
@@ -14,6 +42,8 @@
Болюс %1$.2f ед. подан успешно
Болюс на еду %1$.2f ед. подан успешно
Цель %1$s на %2$d минут
+ Цель %1$s на %2$d минут установлена успешно
+ Временная цель успешно отменена
Разрешить команды через смс
Зцикл остановлен
Зцикл активирован
@@ -22,6 +52,7 @@
Ошибка подключения к помпе
Для разъединения с помпой на %1$d мин ответьте кодом %2$s
Связь с помпой отключена
+ Связь с помпой возобновлена
Удаленная команда не разрешена
Удаленный болюс недоступен, повторите попытку позже.
Для начала подачи базала %1$.2f ед./ч на %2$d мин. ответьте кодом %3$s
@@ -47,24 +78,51 @@
Отмена врем базала не состоялась
Сбой отмены пролонгированного болюса
Неизвестная команда или неверный ответ
+ В очереди есть еще один болюс. Повторите попытку позже.
Неверное значение длительности
ЗЦикл остановлен
ЗЦикл возобновлен
Неверный номер телефона для смс
+ Калибровка отправлена. В xDrip+ должна быть включена возможность приема.
xDrip + не получает калибровки
Недопустимое тело сообщения
Отправить SMS, если инициируется запись о недоступности помпы
Сообщить о недоступности помпы
+ Неверный формат
+ ГК:
+ Предыдущая ГК:
+ дельта:
+ IOB: активный инсулин
+ болюс:
+ базал:
+ %1$dмин. назад
+ Остановлен (на %1$d мин)
+ Статус чтения: неудача
+ Переключатель профиля создан
+ Длительность временного базала TBR должна быть кратной %1$d минутам и больше 0.
+ QR код для создания одноразового пароля
Lyumjev
+ Предустановки для Humalog и Novorapid / Novolog
+ Предустановки для Fiasp
+ Предустановки для Lyumjev
+ Позволяет самостоятельно задавать пик активности инсулина - только для опытных пользователей
+ ИНС
+ Время пика активного инс IOB
+ Время пика [min]
+ Свободный от пиков Oref
+ Быстро действующий Oref
Сверхбыстрый Oref
+ Значение времени действия инс %1$f слишком мало - применено %2$f!
Новорапид, Хумалог
Фиасп
Cтрока состояния xDrip (часы)
Статус xDrip
+ Показать информацию о работе алгоритма ИПЖ на экране смарт-часов xDrip+.
Показать IOB подробно
+ Показать разбивку IOB на болюсный и базальный IOB на часах
Зцикл не работает
Показать BGI
Добавить BGI в строку состояния
@@ -72,21 +130,51 @@
Еда
Показывает заданные в Nightscout настройки для приема пищи
+ Фильтр
+ Еда
кДж
Энергия
Белки
Жиры
+ Категория
+ Подкатегория
Калькулятор
Выберите темную, светлую или системную тему
+ Цветовая схема приложения
+ Тёмная тема
+ Светлая тема
+ Использовать тему устройства
Профиль
+ ЛП
+ Задайте профиль, доступный в автономном режиме.
+ добавить новый в список
Хотите переключить профиль и сбросить изменения, внесенные в текущий профиль?
Сначала сохраните или сбросьте текущие изменения
Удалить текущий профиль?
+ Единицы:
+ Отсутствует название профиля
+ Ошибка в значении углеводного коэффициента IC
+ Ошибка в величине базала
+ Ошибка в целевых значениях
+ Ошибка в значении фактора чувствительности к инсулину ISF
Имя профиля содержит точки.\nЭто не поддерживается NS.\nПрофиль не выгружен в NS.
+ Неверный профиль %1$s не принят из NS
+ Смотреть
+ Ошибки
+ Выберите профиль для изменения
+ Название профиля:
+ добавить новый профиль
+ клонировать текущий профиль
+ удалить текущий профиль
+ Время действия инсулина DIA
+ ЦЕЛЬ
+ БАЗАЛ
Завершено, отлично!
+ Не завершено
+ Прошло времени
Максимум активного инсулина IOB установлен правильно
ГК доступна из выбранного источника
Служба синхронизации имеет разрешение на запись
@@ -245,6 +333,7 @@
Чувствительность
Отклонение
Активные углеводы COB
+ Активный инсулин IOB
Базал
Абсолютный инсулин
ОЖИД
diff --git a/plugins/sync/src/main/java/info/nightscout/plugins/sync/tidepool/elements/ProfileElement.kt b/plugins/sync/src/main/java/info/nightscout/plugins/sync/tidepool/elements/ProfileElement.kt
index 3743e41d5d..a9800f195b 100644
--- a/plugins/sync/src/main/java/info/nightscout/plugins/sync/tidepool/elements/ProfileElement.kt
+++ b/plugins/sync/src/main/java/info/nightscout/plugins/sync/tidepool/elements/ProfileElement.kt
@@ -34,7 +34,7 @@ class ProfileElement(ps: EffectiveProfileSwitch, serialNumber: String, dateUtil:
init {
type = "pumpSettings"
- val profile: Profile? = ProfileSealed.EPS(ps)
+ val profile: Profile = ProfileSealed.EPS(ps)
checkNotNull(profile)
for (br in profile.getBasalValues())
basalSchedules.Normal.add(BasalRate(br.timeAsSeconds * 1000, br.value))
diff --git a/pump/combo/src/main/java/info/nightscout/pump/combo/ruffyscripter/history/PumpAlert.java b/pump/combo/src/main/java/info/nightscout/pump/combo/ruffyscripter/history/PumpAlert.java
index e759739f0a..8b4131e1bd 100644
--- a/pump/combo/src/main/java/info/nightscout/pump/combo/ruffyscripter/history/PumpAlert.java
+++ b/pump/combo/src/main/java/info/nightscout/pump/combo/ruffyscripter/history/PumpAlert.java
@@ -1,6 +1,7 @@
package info.nightscout.pump.combo.ruffyscripter.history;
import java.util.Date;
+import java.util.Objects;
public class PumpAlert extends HistoryRecord {
public final Integer warningCode;
@@ -23,11 +24,11 @@ public class PumpAlert extends HistoryRecord {
PumpAlert pumpAlert = (PumpAlert) o;
if (timestamp != pumpAlert.timestamp) return false;
- if (warningCode != null ? !warningCode.equals(pumpAlert.warningCode) : pumpAlert.warningCode != null)
+ if (!Objects.equals(warningCode, pumpAlert.warningCode))
return false;
- if (errorCode != null ? !errorCode.equals(pumpAlert.errorCode) : pumpAlert.errorCode != null)
+ if (!Objects.equals(errorCode, pumpAlert.errorCode))
return false;
- return message != null ? message.equals(pumpAlert.message) : pumpAlert.message == null;
+ return Objects.equals(message, pumpAlert.message);
}
@Override
diff --git a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/ApplicationLayer.kt b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/ApplicationLayer.kt
index 6077721da9..15aa500b76 100644
--- a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/ApplicationLayer.kt
+++ b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/ApplicationLayer.kt
@@ -719,8 +719,7 @@ object ApplicationLayer {
command = extractAppLayerPacketCommand(tpLayerPacket),
version = tpLayerPacket.payload[VERSION_BYTE_OFFSET],
payload = ArrayList(tpLayerPacket.payload.subList(PAYLOAD_BYTES_OFFSET, tpLayerPacket.payload.size))
- ) {
- }
+ )
/**
* Produces transport layer DATA packet info containing this application layer
@@ -1680,10 +1679,10 @@ object ApplicationLayer {
* This is preferred over directly using the [Packet] constructor.
*/
fun checkAndParseTransportLayerDataPacket(tpLayerPacket: TransportLayer.Packet):
- ApplicationLayer.Packet {
+ Packet {
try {
logger(LogLevel.VERBOSE) { "Parsing DATA packet as application layer packet" }
- val appLayerPacket = ApplicationLayer.Packet(tpLayerPacket)
+ val appLayerPacket = Packet(tpLayerPacket)
logger(LogLevel.VERBOSE) {
"This is an application layer packet with command ${appLayerPacket.command} and payload ${appLayerPacket.payload.toHexString()}"
}
@@ -1709,7 +1708,7 @@ object ApplicationLayer {
}
return appLayerPacket
- } catch (e: ApplicationLayer.InvalidCommandIDException) {
+ } catch (e: InvalidCommandIDException) {
logger(LogLevel.WARN) {
"Got an application layer packet with invalid/unknown command ID 0x${e.commandID.toString(16)} " +
"service ID ${e.serviceID.name} and payload (with ${e.payload.size} byte(s)) ${e.payload.toHexString()}" +
@@ -1719,7 +1718,7 @@ object ApplicationLayer {
} catch (e: ErrorCodeException) {
// We already logged the error code, so just pass through the exception
throw e
- } catch (e: ApplicationLayer.ExceptionBase) {
+ } catch (e: ExceptionBase) {
logger(LogLevel.ERROR) { "Could not parse DATA packet as application layer packet: $e" }
throw e
}
diff --git a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/PumpIO.kt b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/PumpIO.kt
index aeca814ec7..d16fad4d3c 100644
--- a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/PumpIO.kt
+++ b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/PumpIO.kt
@@ -134,7 +134,7 @@ class PumpIO(
// and [List.toComboFrame] for details).
private val framedComboIO = FramedComboIO(bluetoothDevice)
- private var initialMode: PumpIO.Mode? = null
+ private var initialMode: Mode? = null
private var transportLayerIO = TransportLayer.IO(
pumpStateStore, bluetoothDevice.address, framedComboIO
diff --git a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/TransportLayer.kt b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/TransportLayer.kt
index 1e182bcf1b..a06c4ec421 100644
--- a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/TransportLayer.kt
+++ b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/base/TransportLayer.kt
@@ -159,8 +159,8 @@ object TransportLayer {
// Utility function to be able to throw an exception in case of
// an invalid command ID in the Packet constructor below.
- private fun checkedGetCommand(value: Int, bytes: List): TransportLayer.Command =
- TransportLayer.Command.fromInt(value) ?: throw TransportLayer.InvalidCommandIDException(value, bytes)
+ private fun checkedGetCommand(value: Int, bytes: List): Command =
+ Command.fromInt(value) ?: throw InvalidCommandIDException(value, bytes)
/**
* Class containing Combo transport layer packet data.
@@ -835,7 +835,7 @@ object TransportLayer {
* @throws IncorrectPacketException if expectedCommand is non-null and
* the received packet's command does not match expectedCommand.
*/
- suspend fun receive(expectedCommand: Command? = null): TransportLayer.Packet {
+ suspend fun receive(expectedCommand: Command? = null): Packet {
// In here, we mainly listen to the packetReceiverChannel
// for incoming packets from the packet receiver coroutine.
// The actual reception takes place there. startInternal()
diff --git a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/main/RTNavigation.kt b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/main/RTNavigation.kt
index b9b7c4c604..7e6dfa89d7 100644
--- a/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/main/RTNavigation.kt
+++ b/pump/combov2/comboctl/src/commonMain/kotlin/info/nightscout/comboctl/main/RTNavigation.kt
@@ -953,7 +953,7 @@ suspend fun navigateToRTScreen(
null
}
- if (path?.isEmpty() ?: false)
+ if (path?.isEmpty() == true)
return currentParsedScreen
if (path == null) {
diff --git a/pump/combov2/src/main/AndroidManifest.xml b/pump/combov2/src/main/AndroidManifest.xml
index d83e5ddd6d..b7420b34af 100644
--- a/pump/combov2/src/main/AndroidManifest.xml
+++ b/pump/combov2/src/main/AndroidManifest.xml
@@ -1,13 +1,12 @@
-
+
diff --git a/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt b/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt
index 75fac0b0c2..53d767b6d1 100644
--- a/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt
+++ b/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt
@@ -44,6 +44,7 @@ import info.nightscout.interfaces.queue.CommandQueue
import info.nightscout.interfaces.ui.UiInteraction
import info.nightscout.interfaces.utils.DecimalFormatter
import info.nightscout.interfaces.utils.TimeChangeType
+import info.nightscout.pump.combov2.activities.ComboV2PairingActivity
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.EventDismissNotification
import info.nightscout.rx.events.EventInitializationChanged
@@ -326,6 +327,8 @@ class ComboV2Plugin @Inject constructor (
val pairPref: Preference? = findPreference(rh.gs(R.string.key_combov2_pair_with_pump))
val unpairPref: Preference? = findPreference(rh.gs(R.string.key_combov2_unpair_pump))
+ pairPref?.intent = Intent(activity, ComboV2PairingActivity::class.java)
+
val isInitiallyPaired = pairedStateUIFlow.value
pairPref?.isEnabled = !isInitiallyPaired
unpairPref?.isEnabled = isInitiallyPaired
diff --git a/pump/combov2/src/main/res/layout/combov2_pairing_activity.xml b/pump/combov2/src/main/res/layout/combov2_pairing_activity.xml
index 83b88bd19e..960e9ccb5d 100644
--- a/pump/combov2/src/main/res/layout/combov2_pairing_activity.xml
+++ b/pump/combov2/src/main/res/layout/combov2_pairing_activity.xml
@@ -7,7 +7,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- tools:context=".plugins.pump.combov2.activities.ComboV2PairingActivity">
+ tools:context=".activities.ComboV2PairingActivity">
Accu-Chek Combo
+ Nativní integrace pro pumpy Accu-Chek Combo
+ Nelze se připojit k pumpě
+ Není spárováno s pumpou
+ Spojení ukončené pumpou
+ Varování Combo
+ Chyba Combo
+ Zavolejte hotline pro aktualizaci
+ Chyba Bluetooth; opakujte párování
+ Zásobník je prázdný
Vybitá baterie
Okluze
+ Konec zálohy pumpy
Porucha mechaniky
+ Chyba elektroniky
+ Přerušení napájení
+ Vypršela doba zápůjčky
+ Chyba zásobníku
+ Infuzní set není naplněný
+ Rozšířený bolus není podporován
+ Accu-Chek Combo v2
+ Párovat s pumpou
+ Zrušit párování pumpy
+ Stav ovladače
+ Současná aktivita
Bluetooth MAC adresa
+ Začít párovat
+ Probíhá Combo párování
+ Kroky k provedení párování s Combo:\n\n
+1. Na vaší pumpě přejděte do nastavení Bluetooth\n
+2. Zkontrolujte, zda je zařízení již zobrazeno jako spárované. pokud ano, přejděte na obrazovku pumpy \"Odstranit zařízení\" a odstranit/zrušit párování tohoto zařízení\n
+3. Přejděte na obrazovku pumpy \"Přidat zařízení\" a spárujte na pumpě\n
+4. Klikněte na tlačítko \"Spustit párování\" níže pro zahájení párování v AndroidAPS\n
+ Po nějaké době se na obrazovce pumpy zobrazí jméno telefonu; stiskněte KONTROLA pro potvrzení.\n\n
+Po úspěšném dokončení párování, potvrďte dokončení párování na vaší pumpě a vráťte se na hlavní obrazovku pumpy dvojím stisknutím tlačítka KONEC.\n\n
+Pokud po více než ~5 minutách není navázáno žádné spojení:\n\n
+1. Stiskněte tlačítko Zpět nebo tlačítko \"Zrušit párování\"\n
+2. Zrušte párování na Combo (současně stiskněte tlačítka „UP i MENU“ pro zrušení párování)\n
+3. Zkuste znovu spárovat
+ 0123456789
+ Vložte PIN
+ Zrušit párování
+ 10místný PIN
+ Úspěšně spárováno s Combo
+ Párování s Combo zrušeno uživatelem
+ Časový limit pro vyhledávání Combo dosažen
+ Párování se nezdařilo z důvodu chyby: %1$s
+ Párování přerušeno z neznámých důvodů
+ Vyhledávání pumpy
+ Navazování připojení Bluetooth (pokus č. %1$d)
+ Provádím navazování spojení s pumpou
+ Pumpa vyžaduje desetimístný kód PIN
+ Dokončování párování
+ Žádné spojení během %1$d min
+ Před méně než minutou
+ Nastavení aktuálního času pumpy
+ Nastavení aktuálního data pumpy
Není inicializován
+ Kontrola pumpy
Připraven
Pozastaveno
+ Pumpa pozastavena
+ Provádění příkazu
+ Načítám bazální profil
Nastavení bazálního profilu
+ Nastavení %1$d%% dočasného bazálu na %2$d minut
+ Zrušení probíhajícího dočasného bazálu
+ Podávání %1$.1f U
+ Načítám CDD historii
+ Aktualizace data a času v pumpě
+ Nahrávám stav pumpy
+ PIN nefungoval. Zkontrolujte, zda jste neudělali překlep. Pokud se to stále děje, zrušte a opakujte párování.
+ Délka hledání (v sekundách)
+ Povolit podrobné protokolování
+ Získávání bazálního profilu; čtení %1$d. faktoru
+ Nastavení bazálního profilu; zapisování %1$d. faktoru
+ Podávání bolusu (podáno %1$.1f z %2$.1f U)
+ Nelze podat bolus - pumpa je pozastavena
+ Nedostatečný inzulin v zásobníku
Bolus zrušen
Provádění bolusu selhalo. Zdá se, že žádný bolus nebyl podán. Zkontrolujte pumpu a případně pošlete bolus znovu. Jako bezpečnostní opatření podání bolusu není opakováno.
+ Bolus nebyl podán
+ Nelze získat přístup k datům pumpy; pumpa musí být znovu spárována
+ Zjištěny nečekané bolusy. Z bezpečnostních důvodů bolus zrušen.
+ Nesprávný aktivní bazální profil; profil 1 musí být aktivní, ne profil %1$d
+ Nerozpoznaná Combo výstraha
+ Combo výstraha
+ %1$.1f %2$s (%3$s)
%1$d%% (zbývá %2$d min)
+ %1$d%% (zbývá méně než 1 min)
+ Načítání CDD zrušeno
+ Načítání CDD selhalo
+ {fa-bed}
Slabá baterie v pumpě
+ V zásobníku je málo inzulínu
+ Nastavení dočasného bazálu bylo úspěšné
+ Nastavení dočasného bazálu selhalo
+ Při úpravě dočasného bazálu došlo k neočekávanému limitu: vyžadováno %1$d%%, dosažen limit %1$d%%
+ Nelze nastavit absolutní dočasný bazál, pokud je bazální dávka nulová
+ Párovat AndroidAPS a Android s momentálně nespárovanou pumpou Accu-Chek Combo
+ Zrušit párování AndroidAPS a Androidu v současné době spárované Accu-Chek Combo
+ Neznámý dočasný bazál byl zjištěn a zastaven. Procentuální hodnota: %1$d%%; zbývající doba trvání: %2$s
+ Chyba připojení: %1$s
Poslední spoj: před %1$d min
+ Výstraha: %s
+ Poslední bolus: %1$sU @ %2$s
Doč. bazál: %s
Zásobník: %dU
prázdný
nízká
+ plná
+ Bat: %s
+ Detekovat a vložit automaticky výmenu zásobníku
+ Detekovat a vložit automaticky výmenu baterie
+ Výměna zásobníku inzulínu automaticky vložena ovladačem combov2
+ Výměna baterie automaticky vložena ovladačem combov2
+ Časové pásmo změněno
+ Datum a/nebo čas změněn
+ Začal letní čas (DST)
+ Letní čas (DST) skončil
diff --git a/pump/combov2/src/main/res/values-fr-rFR/strings.xml b/pump/combov2/src/main/res/values-fr-rFR/strings.xml
index 5d908997f9..6e3345169d 100644
--- a/pump/combov2/src/main/res/values-fr-rFR/strings.xml
+++ b/pump/combov2/src/main/res/values-fr-rFR/strings.xml
@@ -16,8 +16,9 @@
Erreur mécanique
Erreur électronique
Coupure de l\'alimentation
- Fin de la pompe de prêt
+ Fin de fonctionnement de la pompe de prêt
Erreur de réservoir
+ Ensemble d\'infusion non amorcé
Le bolus étendu n\'est pas pris en charge
Accu-Chek Combo v2
Appairer la pompe
@@ -58,17 +59,59 @@
Réglage du DBT %1$d%% pendant %2$d minutes
Annulation du DBT en cours
Injection de %1$.1fU de bolus en cours
- Récupération de l\'historique DTI
+ Récupération de l\'historique DTQ
Mise à jour date et heure de la pompe
Mise à jour de l\'état pompe
+ Le code PIN n\'a pas fonctionné. Vérifiez s\'il y a eu une faute de frappe. Si cela persiste, annulez et recommencez l\'appairage.
+ Durée de recherche (en secondes)
+ Activer les informations log détaillées de la Combo
+ Récupération du profil basal, %1$d valeure(s) lue(s)
+ Paramétrage du profil basal, %1$d valeure(s) écrite(s)
+ Injection du bolus (%1$.1f sur %2$.1f U injectés)
+ Impossible d\'injecter le traitement - la pompe est suspendue
+ Insuline insuffisante dans le réservoir
Bolus annulé
Administration bolus échouée. Il semble qu’aucun bolus n’a été administré. Pour être sûr, veuillez vérifier la pompe pour éviter un double bolus ensuite refaire le bolus une nouvelle fois.
+ Bolus non injecté
+ Impossible d\'accéder aux données de la pompe, la pompe doit être à nouveau appairée
+ Détection de bolus non comptabilisés. Annulation du bolus pour des raisons de sécurité.
+ Profil actif incorrect, le profil 1 doit être actif et non le profil %1$d
+ Alerte Combo inconnue
+ Alerte Combo
%1$.1f %2$s (%3$s)
%1$d%% (%2$d min restantes)
+ %1$d%% (moins de 1 min restantes)
+ Chargement des DTQ annulé
+ Échec de la récupération des DTQ
+ {fa-bed}
+ {fa-battery-empty}
+ {fa-battery-quarter}
+ {fa-battery-full}
Pile pompe faible
+ Niveau réservoir pompe bas
+ Paramétrage du DBT réussi
+ Échec du réglage du DBT
+ Limite inattendue lors de l’ajustement du DBT: le pourcentage cible de %1$d%%, a dépassé la limite de %1$d%%
+ Impossible de définir le DBT absolu si le débit de basal est zéro
+ Appairer AndroidAPS et Android avec une pompe Accu-Chek Combo non appariée
+ Dissocier AndroidAPS et Android de la pompe Accu-Chek Combo actuelle
+ Un DBT inconnu a été détecté et arrêté, pourcentage: %1$d%%, durée restante: %2$s
+ Erreur de connexion: %1$s
Dernière connexion : il y a %1$d min
+ Alerte: %s
+ Dernier bolus: %1$sU @ %2$s
Temps : %s
Réserve : %dU
vide
basse
+ plein
+ Pile: %s
+ Détection et enregistrement automatique du changement du réservoir
+ Détection et enregistrement automatique du changement de pile
+ Changement de réservoir détecté automatiquement par le pilote ComboV2
+ Changement de pile détecté automatiquement par le pilote ComboV2
+ Fuseau horaire modifié
+ Date et/ou heure modifiée(s)
+ Changement d\'heure commencé
+ Changement d\'heure terminée
diff --git a/pump/combov2/src/main/res/values-ru-rRU/strings.xml b/pump/combov2/src/main/res/values-ru-rRU/strings.xml
index b37825e22b..6cf9e78077 100644
--- a/pump/combov2/src/main/res/values-ru-rRU/strings.xml
+++ b/pump/combov2/src/main/res/values-ru-rRU/strings.xml
@@ -1,23 +1,127 @@
Accu Chek Combo
+ Нативная интеграция с помпами Accu-Chek Combo
+ Не удалось подключиться к помпе
+ Нет сопряжения с помпой
+ Помпа прекратила подключение
+ Предупреждение от Combo
+ Ошибка Combo
+ Позвонить на Горячую линию для обновления
+ Сбой Bluetooth; повторить сопряжение
+ Резервуар помпы пуст
Батарея разряжена
закупорка
+ Завершение резервирования данных помпы
Механическая ошибка
+ Ошибка электроники
+ Прерывание подачи электропитания
+ Конец операции по сдаче
+ Ошибка резервуара
+ Инфузионный набор не заполнен
+ Пролонгированный болюс не поддерживается
+ Accu Chek Combo v2
+ Сопряжение с помпой
+ Разорвать сопряжение с помпой
+ Статус драйвера помпы
+ Текущие действия
Адрес Bluetooth
Начните сопряжение
+ Идёт сопряжение с Combo
+ Для выполнения сопряжения с Combo:\n\n
+1. На помпе перейдите в настройки Bluetooth\n
+2. Проверьте, есть ли здесь ранее сопряженное устройство; если да, то перейдите на экран «Удалить устройство» и удалите его\n
+3. Перейдите на экран помпы «Добавить устройство» и запустите процесс сопряжение\n
+4. Нажмите на кнопку «Начать подключение» ниже, чтобы начать сопряжение в AndroidAPS\n
+ Через некоторое время имя телефона отображается на экране насоса, нажмите кнопку-галочку CHECK для подтверждения.\n\n
+При успешно завершенном подключении, подтвердите это на помпе и вернитесь в главное окно помпы дважды нажав кнопку CHECK.\n\n
+Если соединение не установлено более чем через ~5 минут:\n\n
+1. Нажмите кнопку \"Назад\" или кнопку \"Отменить сопряжение\"\n
+2. Отмените сопряжение на Combo (нажав кнопку ВВЕРХ и кнопку МЕНЮ одновременно)\n
+3. Повторите процедуру сопряжения заново
+ 0123456789
+ Введите PIN-код
Отменить сопряжение
+ 10-значный PIN-код
+ Сопряжение с Combo завершено успешно
+ Сопряжение с Combo отменено пользователем
+ Тайм-аут сканирования Combo
+ Сопряжение не состоялось из-за ошибки: %1$s
+ Сопряжение прервано по неизвестной причине
+ Поиск помпы
+ Установка Bluetooth-соединения (попытка № %1$d)
+ Cинхронизация связи с помпой
+ Помпа запрашивает 10-значный PIN-код
+ Завершение сопряжения
+ Нет соединения на протяжении %1$d минут
+ Менее минуты назад
+ Установка времени на помпе
+ Установка даты на помпе
Нет инициализации
+ Проверка помпы
Помпа готова
Помпа остановлена
+ Помпа остановлена
+ Выполнение команды
+ Получение базального профиля
Установка базального профиля
+ Установка %1$d%% врем базала TBR на %2$d минут
+ Отмена текущего врем базала TBR
+ Подается болюс %1$.1f ед
+ Получение суточной истории дозировок TDD
+ Обновление даты и времени помпы
+ Обновление статуса помпы
+ PIN-код не принят. Проверьте наличие опечаток. Если
+ ошибка повторится, отмените сопряжение и повторите процесс.
+ Время обнаружения (в секундах)
+ Включить подробное журналирование Combo
+ Получение базового профиля; %1$d фактор(ов) прочитано
+ Получение базового профиля; %1$d фактор(ов) прочитано
+ Подача болюса (введено %1$.1f из %2$.1f ед.)
+ Болюс не подан - помпа остановлена
+ Недостаточно инсулина в резервуаре
Болюс отменен
Подача болюса не состоялась. Чтобы удостовериться, проверьте помпу во избежание двойного болюса и повторите подачу. Для защиты от ложных срабатываний болюсы не повторяются автоматически.
+ Болюс не подан
+ Не удается получить данные с помпы; следует заново выполнить сопряжение
+ Обнаружены неучтенные подачи болюса. Отмена болюса по соображениям безопасности.
+ Некорректный активный базальный профиль; должен быть активным профиль 1, а не %1$d
+ Неопознанное оповещение Combo
+ Оповещение Combo
+ %1$.1f%2$s(%3$s)
%1$d%% (%2$d мин осталось)
+ %1$d%% (осталось меньше 1 минуты)
+ Загрузка TDD отменена
+ Не удалось получить TDD
+ {fa-bed}
+ {fa-battery-empty}
+ {fa-battery-quarter}
+ {fa-battery-full}
Низкий заряд батареи помпы
+ Низкий уровень инсулина в картридже помпы
+ Настройки TBR выполнены
+ Не удалось установить TBR
+ Непредвиденный предел, встретившийся при настройке TBR: целевой процент составил %1$d%%, а достиг предела %1$d%%
+ Невозможно установить абсолютный TBR, если базовая скорость равна нулю
+ Выполнить сопряжение AndroidAPS и Android с помпой Accu-Chek Combo
+ Отключить AndroidAPS и AndroidAPS от помпы Accu-Chek Combo
+ Обнаружена и остановлена неизвестная временная базальная скоростьTBR; в процентах: %1$d%%; оставшаяся продолжительность: %2$s
+ Ошибка соединения: %1$s
Предыдущее соединение: %1$d мин. назад
+ Предупреждение: %s
+ Предыдущий болюс: %1$s ед. @ %2$s
Временн %s
Резервуар: %dед
пусто
низкая
+ заряжена полностью
+ Батарея: %s
+ Автоматически определять и вносить запись о замене резервуара инсулина
+ Автоматически определять и вносить запись о замене батареи
+ Запись о замене резервуара инсулина автоматически вносится драйвером combov2
+ Запись о замене батареи автоматически вносится драйвером combov2
+ Часовой пояс изменен
+ Дата и/или время изменены
+ Начато летнее/зимнее время (ДСТ)
+ Летнее/зимнее время окончено (ДСТ)
diff --git a/pump/combov2/src/main/res/xml/pref_combov2.xml b/pump/combov2/src/main/res/xml/pref_combov2.xml
index 952fb7ae2c..9db6d53212 100644
--- a/pump/combov2/src/main/res/xml/pref_combov2.xml
+++ b/pump/combov2/src/main/res/xml/pref_combov2.xml
@@ -12,9 +12,6 @@
android:title="@string/combov2_pair_with_pump_title"
android:summary="@string/combov2_pair_with_pump_summary"
android:shouldDisableView="true">
-
Utiliser les bolus étendus pour > 200%%
Afficher le bolus étendu en %%
État Bluetooth
- DTI
+ DTQ
Incrément Bolus
Incrément Basal
Firmware
diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java
index bb6b67a12e..16f53a55dc 100644
--- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java
+++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManager.java
@@ -37,18 +37,14 @@ import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchConfig;
import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchLifecycleEvent;
import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState;
import info.nightscout.androidaps.plugins.pump.eopatch.vo.TempBasal;
-import info.nightscout.interfaces.plugin.ActivePlugin;
-import info.nightscout.interfaces.profile.ProfileFunction;
import info.nightscout.interfaces.pump.DetailedBolusInfo;
import info.nightscout.interfaces.pump.PumpSync;
import info.nightscout.interfaces.pump.defs.PumpType;
-import info.nightscout.interfaces.queue.CommandQueue;
import info.nightscout.rx.AapsSchedulers;
import info.nightscout.rx.bus.RxBus;
import info.nightscout.rx.events.EventCustomActionsChanged;
import info.nightscout.rx.events.EventPumpStatusChanged;
import info.nightscout.rx.events.EventRefreshOverview;
-import info.nightscout.rx.logging.AAPSLogger;
import info.nightscout.shared.interfaces.ResourceHelper;
import info.nightscout.shared.sharedPreferences.SP;
import info.nightscout.shared.utils.DateUtil;
@@ -63,10 +59,6 @@ public class PatchManager implements IPatchManager {
@Inject PatchManagerImpl patchManager;
@Inject IPreferenceManager pm;
- @Inject ProfileFunction profileFunction;
- @Inject ActivePlugin activePlugin;
- @Inject CommandQueue commandQueue;
- @Inject AAPSLogger aapsLogger;
@Inject ResourceHelper resourceHelper;
@Inject RxBus rxBus;
@Inject Context context;
diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java
index 8762f934fe..834e131927 100644
--- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java
+++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchManagerImpl.java
@@ -54,7 +54,6 @@ import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.StopComboBolusTa
import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.StopExtBolusTask;
import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.StopNowBolusTask;
import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.StopTempBasalTask;
-import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.SyncBasalHistoryTask;
import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.TaskBase;
import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.TaskFunc;
import info.nightscout.androidaps.plugins.pump.eopatch.ble.task.UpdateConnectionTask;
@@ -91,8 +90,6 @@ import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchConfig;
import info.nightscout.androidaps.plugins.pump.eopatch.vo.PatchState;
import info.nightscout.androidaps.plugins.pump.eopatch.vo.TempBasal;
import info.nightscout.interfaces.pump.DetailedBolusInfo;
-import info.nightscout.interfaces.pump.PumpSync;
-import info.nightscout.interfaces.pump.defs.PumpType;
import info.nightscout.rx.AapsSchedulers;
import info.nightscout.rx.logging.AAPSLogger;
import info.nightscout.rx.logging.LTag;
@@ -111,7 +108,6 @@ public class PatchManagerImpl {
@Inject SP sp;
@Inject AAPSLogger aapsLogger;
@Inject AapsSchedulers aapsSchedulers;
- @Inject PumpSync pumpSync;
@Inject StartBondTask START_BOND;
@Inject GetPatchInfoTask GET_PATCH_INFO;
@@ -562,9 +558,6 @@ public class PatchManagerImpl {
@Inject
PatchStateManager patchStateManager;
- @Inject
- SyncBasalHistoryTask syncBasalHistoryTask;
-
void onAlarmNotification(AlarmNotification notification) throws Throwable {
patchStateManager.updatePatchState(PatchState.create(notification.patchState, System.currentTimeMillis()));
diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchStateManager.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchStateManager.java
index b788b49fec..6931f5b1f9 100644
--- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchStateManager.java
+++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/PatchStateManager.java
@@ -80,10 +80,10 @@ public class PatchStateManager {
// Resume --> onBasalResume
onBasalResumeState();
- } else if (oldState.isNormalBasalAct() == false) {
+ } else if (!oldState.isNormalBasalAct()) {
// Start --> onBasalStarted
}
- } else if (oldState.isNormalBasalPaused() == false && newState.isNormalBasalPaused()) {
+ } else if (!oldState.isNormalBasalPaused() && newState.isNormalBasalPaused()) {
if (newState.isTempBasalAct()) {
} else {
// pause
@@ -93,25 +93,21 @@ public class PatchStateManager {
/* Temp Basal ------------------------------------------------------------------------------------------- */
if (newState.isTempBasalAct()) {
- if (oldState.isTempBasalAct() == false) {
+ if (!oldState.isTempBasalAct()) {
// Start
onTempBasalStartState();
}
}
boolean tempBasalStopped = false;
- boolean tempBasalFinished = false;
+ boolean tempBasalFinished = newState.isTempBasalDone() && !newState.isPatchInternalSuspended();
- if (newState.isTempBasalDone() && !newState.isPatchInternalSuspended()) {
- tempBasalFinished = true;
- }
-
- if (oldState.isTempBasalDone() == false) {
+ if (!oldState.isTempBasalDone()) {
if (newState.isTempBasalDone()) {
tempBasalStopped = true;
onTempBasalDoneState();
- } else if (oldState.isTempBasalAct() && newState.isTempBasalAct() == false) {
+ } else if (oldState.isTempBasalAct() && !newState.isTempBasalAct()) {
tempBasalStopped = true;
onTempBasalCancelState();
@@ -126,15 +122,15 @@ public class PatchStateManager {
}
}
- if (newState.isTempBasalAct() == false && pm.getTempBasalManager().getStartedBasal() != null) {
+ if (!newState.isTempBasalAct() && pm.getTempBasalManager().getStartedBasal() != null) {
pm.getTempBasalManager().updateBasalStopped();
}
/* Now Bolus -------------------------------------------------------------------------------------------- */
- if (oldState.isNowBolusRegAct() == false && newState.isNowBolusRegAct() == true) {
+ if (!oldState.isNowBolusRegAct() && newState.isNowBolusRegAct()) {
// Start
- } else if (oldState.isNowBolusDone() == false) {
- if (oldState.isNowBolusRegAct() && newState.isNowBolusRegAct() == false) {
+ } else if (!oldState.isNowBolusDone()) {
+ if (oldState.isNowBolusRegAct() && !newState.isNowBolusRegAct()) {
// Cancel
} else if (newState.isNowBolusDone()) {
// Done
@@ -143,23 +139,23 @@ public class PatchStateManager {
BolusCurrent bolusCurrent = pm.getBolusCurrent();
- if (newState.isNowBolusRegAct() == false && bolusCurrent.historyId(BolusType.NOW) > 0
+ if (!newState.isNowBolusRegAct() && bolusCurrent.historyId(BolusType.NOW) > 0
&& bolusCurrent.endTimeSynced(BolusType.NOW)) {
bolusCurrent.clearBolus(BolusType.NOW);
}
/* Extended Bolus --------------------------------------------------------------------------------------- */
- if (oldState.isExtBolusRegAct() == false && newState.isExtBolusRegAct() == true) {
+ if (!oldState.isExtBolusRegAct() && newState.isExtBolusRegAct()) {
// Start
- } else if (oldState.isExtBolusDone() == false) {
- if (oldState.isExtBolusRegAct() && newState.isExtBolusRegAct() == false) {
+ } else if (!oldState.isExtBolusDone()) {
+ if (oldState.isExtBolusRegAct() && !newState.isExtBolusRegAct()) {
// Cancel
} else if (newState.isExtBolusDone()) {
// Done
}
}
- if (newState.isExtBolusRegAct() == false && bolusCurrent.historyId(BolusType.EXT) > 0
+ if (!newState.isExtBolusRegAct() && bolusCurrent.historyId(BolusType.EXT) > 0
&& bolusCurrent.endTimeSynced(BolusType.EXT)) {
bolusCurrent.clearBolus(BolusType.EXT);
}
@@ -243,7 +239,7 @@ public class PatchStateManager {
if (normalBasal != null) {
pm.getNormalBasalManager().updateBasalStarted();
normalBasal.updateNormalBasalIndex();
- pm.flushNormalBasalManager();;
+ pm.flushNormalBasalManager();
}
}
diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SyncBasalHistoryTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SyncBasalHistoryTask.java
index 20265ec379..0af9abd65c 100644
--- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SyncBasalHistoryTask.java
+++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/SyncBasalHistoryTask.java
@@ -101,7 +101,7 @@ public class SyncBasalHistoryTask extends TaskBase {
}
public synchronized int updateInjected(float[] normal, float[] temp, int start, int end) {
- if (pm.getPatchState().isPatchInternalSuspended() && pm.getPatchConfig().isInBasalPausedTime() == false) {
+ if (pm.getPatchState().isPatchInternalSuspended() && !pm.getPatchConfig().isInBasalPausedTime()) {
return -1;
}
diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/UpdateConnectionTask.java b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/UpdateConnectionTask.java
index 3215230257..c90abe5bd5 100644
--- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/UpdateConnectionTask.java
+++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ble/task/UpdateConnectionTask.java
@@ -16,7 +16,7 @@ import io.reactivex.rxjava3.core.Single;
public class UpdateConnectionTask extends TaskBase {
@Inject PatchStateManager patchStateManager;
- private UpdateConnection UPDATE_CONNECTION;
+ private final UpdateConnection UPDATE_CONNECTION;
@Inject
public UpdateConnectionTask() {
diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/ViewModelFactory.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/ViewModelFactory.kt
index 0a351591e1..ba148d8086 100644
--- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/ViewModelFactory.kt
+++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/ui/viewmodel/ViewModelFactory.kt
@@ -10,7 +10,7 @@ import kotlin.reflect.KClass
@MustBeDocumented
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
-@kotlin.annotation.Retention(AnnotationRetention.RUNTIME)
+@Retention(AnnotationRetention.RUNTIME)
@MapKey
internal annotation class ViewModelKey(val value: KClass)
diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/vo/BolusCurrent.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/vo/BolusCurrent.kt
index b094b163a0..24f64b33e5 100644
--- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/vo/BolusCurrent.kt
+++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/vo/BolusCurrent.kt
@@ -21,7 +21,7 @@ import io.reactivex.rxjava3.subjects.BehaviorSubject
* BolusCurrent : 현재 패치에서 진행 중인 '볼루스의 정보'를 표현한 클래스.
*/
-class BolusCurrent(): IPreference {
+class BolusCurrent : IPreference {
@Transient
private val subject: BehaviorSubject = BehaviorSubject.create()
diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/vo/PatchState.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/vo/PatchState.kt
index f40e3c732d..8141d83553 100644
--- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/vo/PatchState.kt
+++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/vo/PatchState.kt
@@ -22,8 +22,7 @@ class PatchState: IPreference {
private val stateBytes: ByteArray
var updatedTimestamp: Long = 0
- constructor(): this(ByteArray(SIZE), 0) {
- }
+ constructor(): this(ByteArray(SIZE), 0)
constructor(stateBytes: ByteArray, updatedTimestamp: Long) {
this.stateBytes = stateBytes
diff --git a/pump/eopatch/src/main/res/values-ru-rRU/strings.xml b/pump/eopatch/src/main/res/values-ru-rRU/strings.xml
index 946e851722..a132ab7232 100644
--- a/pump/eopatch/src/main/res/values-ru-rRU/strings.xml
+++ b/pump/eopatch/src/main/res/values-ru-rRU/strings.xml
@@ -92,6 +92,7 @@
Подключено к Patch.
Отменить сопряжение
дней
+ ед
После приостановки текущий болюс & Временный базал будет отменен. \n\nСкорость базала: %1$s ед/ч\nОсталось времени: %2$s\n& инсулина: %3$.2f U
После приостановки текущий болюс будет отменен. \n\n Осталось инсулина: %1$.2f U
После приостановки текущий Временный базал будет отменен.\n\n Скорость базала: %1$s ед/ч\n Осталось времени: %2$s
diff --git a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUITask.kt b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUITask.kt
index 95dd6aadc0..c70f1c21f6 100644
--- a/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUITask.kt
+++ b/pump/medtronic/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/comm/ui/MedtronicUITask.kt
@@ -79,9 +79,7 @@ class MedtronicUITask {
MedtronicCommandType.SetTemporaryBasal -> {
val tbr = getTbrSettings()
- if (tbr != null) {
- result = communicationManager.setTemporaryBasal(tbr)
- }
+ result = communicationManager.setTemporaryBasal(tbr)
}
MedtronicCommandType.ReadTemporaryBasal -> {
@@ -128,7 +126,7 @@ class MedtronicUITask {
}
}
- private fun getTbrSettings(): TempBasalPair? {
+ private fun getTbrSettings(): TempBasalPair {
return TempBasalPair(getDoubleFromParameters(0)!!, //
false, //
getIntegerFromParameters(1))
diff --git a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/di/OmnipodInjectHelpers.kt b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/di/OmnipodInjectHelpers.kt
index 8e0bf4b0b2..f52ca75a6e 100644
--- a/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/di/OmnipodInjectHelpers.kt
+++ b/pump/omnipod-common/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/common/di/OmnipodInjectHelpers.kt
@@ -13,7 +13,7 @@ import kotlin.reflect.KClass
annotation class OmnipodPluginQualifier
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
-@kotlin.annotation.Retention(AnnotationRetention.RUNTIME)
+@Retention(AnnotationRetention.RUNTIME)
@MapKey
annotation class ViewModelKey(val value: KClass)
diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt
index a031ec7331..8fd963dbba 100644
--- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt
+++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/driver/OmnipodDashManagerImpl.kt
@@ -309,7 +309,7 @@ class OmnipodDashManagerImpl @Inject constructor(
.setUniqueId(podStateManager.uniqueId!!.toInt())
.setSequenceNumber(podStateManager.messageSequenceNumber)
.setNonce(NONCE)
- .setNumberOfUnits(Round.roundTo(podStateManager.firstPrimeBolusVolume!! * PodConstants.POD_PULSE_BOLUS_UNITS, POD_PULSE_BOLUS_UNITS))
+ .setNumberOfUnits(Round.roundTo(podStateManager.firstPrimeBolusVolume!! * POD_PULSE_BOLUS_UNITS, POD_PULSE_BOLUS_UNITS))
.setDelayBetweenPulsesInEighthSeconds(podStateManager.primePulseRate!!.toByte())
.setProgramReminder(ProgramReminder(atStart = false, atEnd = false, atInterval = 0))
.build(),
@@ -412,7 +412,7 @@ class OmnipodDashManagerImpl @Inject constructor(
)
observables.add(
observeSendProgramBolusCommand(
- Round.roundTo(podStateManager.secondPrimeBolusVolume!! * PodConstants.POD_PULSE_BOLUS_UNITS, PodConstants.POD_PULSE_BOLUS_UNITS),
+ Round.roundTo(podStateManager.secondPrimeBolusVolume!! * POD_PULSE_BOLUS_UNITS, POD_PULSE_BOLUS_UNITS),
podStateManager.primePulseRate!!.toByte(),
confirmationBeeps = false,
completionBeeps = false
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/PumpPluginAbstract.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/PumpPluginAbstract.kt
index 57901356a4..ef860a0706 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/PumpPluginAbstract.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/PumpPluginAbstract.kt
@@ -75,7 +75,6 @@ abstract class PumpPluginAbstract protected constructor(
protected var displayConnectionMessages = false
var pumpType: PumpType = PumpType.GENERIC_AAPS
- get() = field
set(value) {
field = value
pumpDescription.fillFor(value)
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/BasalProfileStatus.java b/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/BasalProfileStatus.java
index f180acb7d8..876ab1fad9 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/BasalProfileStatus.java
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/BasalProfileStatus.java
@@ -9,6 +9,5 @@ public enum BasalProfileStatus {
NotInitialized, //
ProfileOK, //
ProfileChanged, //
- ;
}
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/PumpHistoryEntryGroup.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/PumpHistoryEntryGroup.kt
index c14391b8eb..d87afc8b35 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/PumpHistoryEntryGroup.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/PumpHistoryEntryGroup.kt
@@ -65,11 +65,11 @@ enum class PumpHistoryEntryGroup(val resourceId: Int, val pumpTypeGroupConfig: P
if (pumpTypeGroupConfig == PumpTypeGroupConfig.All) {
outList = translatedList!!.stream()
.filter { pre -> pre.pumpTypeGroupConfig == PumpTypeGroupConfig.All }
- .toList();
+ .toList()
} else {
outList = translatedList!!.stream()
.filter { pre -> (pre.pumpTypeGroupConfig == PumpTypeGroupConfig.All || pre.pumpTypeGroupConfig == pumpTypeGroupConfig) }
- .toList();
+ .toList()
}
return outList
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/PumpUpdateFragmentType.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/PumpUpdateFragmentType.kt
index 2d68ae117d..7865a1df64 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/PumpUpdateFragmentType.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/defs/PumpUpdateFragmentType.kt
@@ -28,22 +28,21 @@ enum class PumpUpdateFragmentType {
Custom_8
;
- final var children: List? = null
+ var children: List? = null
- constructor() {
- }
+ constructor()
constructor(children: List) {
- this.children = children;
+ this.children = children
}
fun isOptionIncluded(type: PumpUpdateFragmentType): Boolean {
if (this == type)
return true
else if (this.children != null && this.children!!.contains(type))
- return true;
+ return true
- return false;
+ return false
}
}
\ No newline at end of file
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/driver/history/PumpDataConverter.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/driver/history/PumpDataConverter.kt
index 5b8c29e342..37f5605b0d 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/driver/history/PumpDataConverter.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/driver/history/PumpDataConverter.kt
@@ -1,4 +1,3 @@
package info.nightscout.pump.common.driver.history
-interface PumpDataConverter {
-}
\ No newline at end of file
+interface PumpDataConverter
\ No newline at end of file
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/driver/history/PumpHistoryDataProviderAbstract.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/driver/history/PumpHistoryDataProviderAbstract.kt
index 9affc65cf8..cd94e092eb 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/driver/history/PumpHistoryDataProviderAbstract.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/driver/history/PumpHistoryDataProviderAbstract.kt
@@ -7,7 +7,7 @@ import java.util.GregorianCalendar
abstract class PumpHistoryDataProviderAbstract : PumpHistoryDataProvider {
override fun getInitialData(): List {
- return getData(getInitialPeriod());
+ return getData(getInitialPeriod())
}
override fun getSpinnerWidthInPixels(): Int {
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/events/EventPumpChanged.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/events/EventPumpChanged.kt
index b43b7d1046..4a2b93cc7f 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/events/EventPumpChanged.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/events/EventPumpChanged.kt
@@ -4,5 +4,4 @@ import info.nightscout.rx.events.Event
class EventPumpChanged(var serialNumber: String,
var connectionAddress: String,
- var parameters: MutableMap? = null) : Event() {
-}
\ No newline at end of file
+ var parameters: MutableMap? = null) : Event()
\ No newline at end of file
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/events/EventPumpConnectionParametersChanged.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/events/EventPumpConnectionParametersChanged.kt
index 7f4f58c13d..6c588af1df 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/events/EventPumpConnectionParametersChanged.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/events/EventPumpConnectionParametersChanged.kt
@@ -2,5 +2,4 @@ package info.nightscout.pump.common.events
import info.nightscout.rx.events.Event
-class EventPumpConnectionParametersChanged : Event() {
-}
\ No newline at end of file
+class EventPumpConnectionParametersChanged : Event()
\ No newline at end of file
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpDbEntry.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpDbEntry.kt
index 7ed79f6179..98c6d1c021 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpDbEntry.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpDbEntry.kt
@@ -77,7 +77,7 @@ data class PumpDbEntryCarbs(var date: Long,
var pumpId: Long? = null) {
constructor(detailedBolusInfo: DetailedBolusInfo,
- creator: info.nightscout.pump.common.sync.PumpSyncEntriesCreator
+ creator: PumpSyncEntriesCreator
) : this(detailedBolusInfo.timestamp,
detailedBolusInfo.carbs,
creator.model(),
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpSyncStorage.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpSyncStorage.kt
index e57056fbde..b481e1c3b0 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpSyncStorage.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/sync/PumpSyncStorage.kt
@@ -110,7 +110,7 @@ class PumpSyncStorage @Inject constructor(
return pumpSyncStorageTBR
}
- fun addBolusWithTempId(detailedBolusInfo: DetailedBolusInfo, writeToInternalHistory: Boolean, creator: info.nightscout.pump.common.sync.PumpSyncEntriesCreator): Boolean {
+ fun addBolusWithTempId(detailedBolusInfo: DetailedBolusInfo, writeToInternalHistory: Boolean, creator: PumpSyncEntriesCreator): Boolean {
val temporaryId = creator.generateTempId(detailedBolusInfo.timestamp)
val result = pumpSync.addBolusWithTempId(
detailedBolusInfo.timestamp,
@@ -157,7 +157,7 @@ class PumpSyncStorage @Inject constructor(
"carbs=${carbsDto.carbs}, pumpSerial=${carbsDto.serialNumber}] - Result: $result")
}
- fun addTemporaryBasalRateWithTempId(temporaryBasal: PumpDbEntryTBR, writeToInternalHistory: Boolean, creator: info.nightscout.pump.common.sync.PumpSyncEntriesCreator): Boolean {
+ fun addTemporaryBasalRateWithTempId(temporaryBasal: PumpDbEntryTBR, writeToInternalHistory: Boolean, creator: PumpSyncEntriesCreator): Boolean {
val timeNow: Long = System.currentTimeMillis()
val temporaryId = creator.generateTempId(timeNow)
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/ui/PumpHistoryActivity.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/ui/PumpHistoryActivity.kt
index 8943d4a01a..c62a261015 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/ui/PumpHistoryActivity.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/ui/PumpHistoryActivity.kt
@@ -72,14 +72,6 @@ class PumpHistoryActivity : DaggerAppCompatActivity() {
}
- override fun onResume() {
- super.onResume()
- //filterHistory(selectedGroup)
- //setHistoryTypeSpinner()
- //aapsLogger.info(LTag.PUMP, "onResume")
- //binding.pumpHistoryRoot.requestLayout()
- }
-
private fun setHistoryTypeSpinner() {
manualChange = true
for (i in typeListFull!!.indices) {
@@ -119,12 +111,12 @@ class PumpHistoryActivity : DaggerAppCompatActivity() {
binding.pumpHistoryText.text = historyDataProvider.getText(PumpHistoryText.PUMP_HISTORY)
binding.pumpHistoryType.adapter = spinnerAdapter
- binding.pumpHistoryType.getLayoutParams().width = fromDpToSize(historyDataProvider.getSpinnerWidthInPixels())
- binding.pumpHistoryType.requestLayout();
- binding.pumpHistoryType.setOnItemSelectedListener(object : AdapterView.OnItemSelectedListener {
+ binding.pumpHistoryType.layoutParams.width = fromDpToSize(historyDataProvider.getSpinnerWidthInPixels())
+ binding.pumpHistoryType.requestLayout()
+ binding.pumpHistoryType.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
if (manualChange) return
- val selected = binding.pumpHistoryType.getSelectedItem() as TypeList
+ val selected = binding.pumpHistoryType.selectedItem as TypeList
showingType = selected
selectedGroup = selected.entryGroup
filterHistory(selectedGroup)
@@ -138,7 +130,7 @@ class PumpHistoryActivity : DaggerAppCompatActivity() {
if (manualChange) return
filterHistory(PumpHistoryEntryGroup.All)
}
- })
+ }
binding.pumpHistoryTypeText.requestLayout()
}
diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/utils/ProfileUtil.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/utils/ProfileUtil.kt
index ae36570483..db30c0fd56 100644
--- a/pump/pump-common/src/main/java/info/nightscout/pump/common/utils/ProfileUtil.kt
+++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/utils/ProfileUtil.kt
@@ -32,7 +32,7 @@ object ProfileUtil {
return if (stringBuilder.length > 3) stringBuilder.substring(0, stringBuilder.length - 2) else stringBuilder.toString()
}
- fun getBasalProfilesDisplayableAsStringOfArray(profile: Profile, pumpType: PumpType): String? {
+ fun getBasalProfilesDisplayableAsStringOfArray(profile: Profile, pumpType: PumpType): String {
val stringBuilder = java.lang.StringBuilder()
// for (basalValue in profiles) {
// val basalValueValue = pumpType.determineCorrectBasalSize(basalValue.value)
diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkCommunicationManager.java b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkCommunicationManager.java
index 1980fda522..bbb9942ecc 100644
--- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkCommunicationManager.java
+++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/RileyLinkCommunicationManager.java
@@ -157,7 +157,7 @@ public abstract class RileyLinkCommunicationManager {
// FIXME wakeUp successful !!!!!!!!!!!!!!!!!!
- nextWakeUpRequired = System.currentTimeMillis() + (receiverDeviceAwakeForMinutes * 60 * 1000);
+ nextWakeUpRequired = System.currentTimeMillis() + ((long) receiverDeviceAwakeForMinutes * 60 * 1000);
} else {
aapsLogger.debug(LTag.PUMPBTCOMM, "Last pump communication was recent, not waking pump.");
}
diff --git a/settings.gradle b/settings.gradle
index e1966cd127..0421d19e41 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -40,3 +40,4 @@ include ':pump:pump-common'
include ':pump:pump-core'
include ':pump:rileylink'
include ':plugins:sync'
+include ':workflow'
diff --git a/ui/src/main/res/values-fr-rFR/strings.xml b/ui/src/main/res/values-fr-rFR/strings.xml
index 4c59d6c3a1..a5ea0bfe1c 100644
--- a/ui/src/main/res/values-fr-rFR/strings.xml
+++ b/ui/src/main/res/values-fr-rFR/strings.xml
@@ -17,6 +17,7 @@
Moniteur d\'activité
Voulez-vous réinitialiser les statistiques d\'activité ?
+ Voulez-vous réinitialiser les statistiques de DTQ ?
Statistiques
Calcul en cours
Âge invalide
@@ -117,8 +118,8 @@
Profil par défaut
Profil actuel
Profils disponibles
- Âge: %1$d DTI: %2$.0f U
- Âge: %1$d DTI: %2$.0f U %3$d%%
+ Âge: %1$d DTQ: %2$.0f U
+ Âge: %1$d DTQ: %2$.0f U %3$d%%
Âge: %1$d Poids: %2$.0f kg
Profil par défaut DPV
% saisi invalide
diff --git a/ui/src/main/res/values-ru-rRU/strings.xml b/ui/src/main/res/values-ru-rRU/strings.xml
index f82c5d1875..ba0ae83126 100644
--- a/ui/src/main/res/values-ru-rRU/strings.xml
+++ b/ui/src/main/res/values-ru-rRU/strings.xml
@@ -102,6 +102,10 @@
Удалить записи о начале работы AAPS
Скрыть цикл
Показать цикл
+ Запись пользователя
+ Клонировать
+ Показать записи цикла
+ Скрыть записи цикла
Профиль 1
Профиль 2
diff --git a/wear/src/main/java/info/nightscout/androidaps/comm/DataLayerListenerServiceWear.kt b/wear/src/main/java/info/nightscout/androidaps/comm/DataLayerListenerServiceWear.kt
index c16c02e53e..230ae6ee79 100644
--- a/wear/src/main/java/info/nightscout/androidaps/comm/DataLayerListenerServiceWear.kt
+++ b/wear/src/main/java/info/nightscout/androidaps/comm/DataLayerListenerServiceWear.kt
@@ -58,10 +58,6 @@ class DataLayerListenerServiceWear : WearableListenerService() {
}
}
- override fun onPeerConnected(p0: Node) {
- super.onPeerConnected(p0)
- }
-
override fun onCapabilityChanged(p0: CapabilityInfo) {
super.onCapabilityChanged(p0)
handler.post { updateTranscriptionCapability() }
diff --git a/wear/src/main/res/values-fr-rFR/strings.xml b/wear/src/main/res/values-fr-rFR/strings.xml
index 6401a78a73..ba91c0f710 100644
--- a/wear/src/main/res/values-fr-rFR/strings.xml
+++ b/wear/src/main/res/values-fr-rFR/strings.xml
@@ -113,7 +113,7 @@
Pompe
Boucle
Changement de profil
- DTI
+ DTQ
GA
IA
aucun statut
diff --git a/workflow/.gitignore b/workflow/.gitignore
new file mode 100644
index 0000000000..42afabfd2a
--- /dev/null
+++ b/workflow/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/workflow/build.gradle b/workflow/build.gradle
new file mode 100644
index 0000000000..d19ca54a90
--- /dev/null
+++ b/workflow/build.gradle
@@ -0,0 +1,29 @@
+plugins {
+ id 'com.android.library'
+ id 'kotlin-android'
+ id 'kotlin-kapt'
+ id 'kotlin-allopen'
+ id 'com.hiya.jacoco-android'
+}
+
+apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle"
+apply from: "${project.rootDir}/core/core-main/android_module_dependencies.gradle"
+apply from: "${project.rootDir}/core/core-main/test_dependencies.gradle"
+apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle"
+
+android {
+ namespace 'info.nightscout.workflow'
+}
+
+dependencies {
+ implementation project(':core:libraries')
+ implementation project(':core:graphview')
+ implementation project(':app-wear-shared:shared')
+ implementation project(':database:entities')
+ implementation project(':database:impl')
+ implementation project(':core:core-main')
+ implementation project(':core:interfaces')
+ implementation project(':core:graph')
+ implementation project(':core:ui')
+ implementation project(':core:utils')
+}
\ No newline at end of file
diff --git a/workflow/consumer-rules.pro b/workflow/consumer-rules.pro
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/workflow/proguard-rules.pro b/workflow/proguard-rules.pro
new file mode 100644
index 0000000000..481bb43481
--- /dev/null
+++ b/workflow/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/workflow/src/main/AndroidManifest.xml b/workflow/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..44008a4332
--- /dev/null
+++ b/workflow/src/main/AndroidManifest.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/DummyWorker.kt b/workflow/src/main/java/info/nightscout/workflow/DummyWorker.kt
similarity index 85%
rename from app/src/main/java/info/nightscout/androidaps/workflow/DummyWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/DummyWorker.kt
index fd30c54dc6..b53496eb57 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/DummyWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/DummyWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/InvokeLoopWorker.kt b/workflow/src/main/java/info/nightscout/workflow/InvokeLoopWorker.kt
similarity index 97%
rename from app/src/main/java/info/nightscout/androidaps/workflow/InvokeLoopWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/InvokeLoopWorker.kt
index 6a2ffe70e9..35fa137425 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/InvokeLoopWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/InvokeLoopWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/LoadBgDataWorker.kt
similarity index 98%
rename from app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/LoadBgDataWorker.kt
index 3db1fedb8a..03edabdc2d 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/LoadBgDataWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/LoadBgDataWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBasalDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareBasalDataWorker.kt
similarity index 97%
rename from app/src/main/java/info/nightscout/androidaps/workflow/PrepareBasalDataWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/PrepareBasalDataWorker.kt
index c2b6655434..9b3ad921b1 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBasalDataWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/PrepareBasalDataWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import android.graphics.DashPathEffect
@@ -8,14 +8,13 @@ import androidx.work.WorkerParameters
import androidx.work.workDataOf
import com.jjoe64.graphview.series.LineGraphSeries
import dagger.android.HasAndroidInjector
-import info.nightscout.androidaps.R
+import info.nightscout.core.events.EventIobCalculationProgress
import info.nightscout.core.graph.OverviewData
import info.nightscout.core.graph.data.ScaledDataPoint
import info.nightscout.core.utils.receivers.DataWorkerStorage
import info.nightscout.core.workflow.CalculationWorkflow
import info.nightscout.interfaces.iob.IobCobCalculator
import info.nightscout.interfaces.profile.ProfileFunction
-import info.nightscout.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
import info.nightscout.rx.bus.RxBus
import info.nightscout.shared.interfaces.ResourceHelper
import javax.inject.Inject
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBgDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareBgDataWorker.kt
similarity index 98%
rename from app/src/main/java/info/nightscout/androidaps/workflow/PrepareBgDataWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/PrepareBgDataWorker.kt
index 8b0952e7da..83b4efbb35 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBgDataWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/PrepareBgDataWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBucketedDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareBucketedDataWorker.kt
similarity index 98%
rename from app/src/main/java/info/nightscout/androidaps/workflow/PrepareBucketedDataWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/PrepareBucketedDataWorker.kt
index 3a058c93ff..4a71703d1a 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareBucketedDataWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/PrepareBucketedDataWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareIobAutosensGraphDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareIobAutosensGraphDataWorker.kt
similarity index 98%
rename from app/src/main/java/info/nightscout/androidaps/workflow/PrepareIobAutosensGraphDataWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/PrepareIobAutosensGraphDataWorker.kt
index 2f537386d0..ef9ed49633 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareIobAutosensGraphDataWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/PrepareIobAutosensGraphDataWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import android.graphics.DashPathEffect
@@ -9,8 +9,7 @@ import androidx.work.workDataOf
import com.jjoe64.graphview.series.BarGraphSeries
import com.jjoe64.graphview.series.LineGraphSeries
import dagger.android.HasAndroidInjector
-import info.nightscout.androidaps.R
-import info.nightscout.core.iob.iobCobCalculator.data.AutosensDataObject
+import info.nightscout.core.events.EventIobCalculationProgress
import info.nightscout.core.graph.OverviewData
import info.nightscout.core.graph.data.DataPointWithLabelInterface
import info.nightscout.core.graph.data.DeviationDataPoint
@@ -20,6 +19,7 @@ import info.nightscout.core.graph.data.Scale
import info.nightscout.core.graph.data.ScaledDataPoint
import info.nightscout.core.iob.combine
import info.nightscout.core.iob.copy
+import info.nightscout.core.iob.iobCobCalculator.data.AutosensDataObject
import info.nightscout.core.utils.receivers.DataWorkerStorage
import info.nightscout.core.workflow.CalculationWorkflow
import info.nightscout.database.ValueWrapper
@@ -28,10 +28,9 @@ import info.nightscout.interfaces.aps.AutosensResult
import info.nightscout.interfaces.aps.SMBDefaults
import info.nightscout.interfaces.iob.IobCobCalculator
import info.nightscout.interfaces.iob.IobTotal
+import info.nightscout.interfaces.overview.OverviewMenus
import info.nightscout.interfaces.profile.ProfileFunction
import info.nightscout.interfaces.utils.DecimalFormatter
-import info.nightscout.plugins.general.overview.OverviewMenus
-import info.nightscout.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PreparePredictionsWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PreparePredictionsWorker.kt
similarity index 97%
rename from app/src/main/java/info/nightscout/androidaps/workflow/PreparePredictionsWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/PreparePredictionsWorker.kt
index fb9a7faabc..61dd6958b5 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/PreparePredictionsWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/PreparePredictionsWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
@@ -14,9 +14,9 @@ import info.nightscout.database.impl.AppRepository
import info.nightscout.interfaces.Config
import info.nightscout.interfaces.aps.Loop
import info.nightscout.interfaces.nsclient.ProcessedDeviceStatusData
+import info.nightscout.interfaces.overview.OverviewMenus
import info.nightscout.interfaces.profile.DefaultValueHelper
import info.nightscout.interfaces.profile.ProfileFunction
-import info.nightscout.plugins.general.overview.OverviewMenus
import info.nightscout.rx.bus.RxBus
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.utils.T
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTemporaryTargetDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareTemporaryTargetDataWorker.kt
similarity index 95%
rename from app/src/main/java/info/nightscout/androidaps/workflow/PrepareTemporaryTargetDataWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/PrepareTemporaryTargetDataWorker.kt
index fe06c05f94..cd402b458a 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTemporaryTargetDataWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/PrepareTemporaryTargetDataWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
@@ -7,7 +7,7 @@ import androidx.work.workDataOf
import com.jjoe64.graphview.series.DataPoint
import com.jjoe64.graphview.series.LineGraphSeries
import dagger.android.HasAndroidInjector
-import info.nightscout.androidaps.R
+import info.nightscout.core.events.EventIobCalculationProgress
import info.nightscout.core.extensions.target
import info.nightscout.core.graph.OverviewData
import info.nightscout.core.utils.receivers.DataWorkerStorage
@@ -17,7 +17,6 @@ import info.nightscout.database.impl.AppRepository
import info.nightscout.interfaces.aps.Loop
import info.nightscout.interfaces.profile.Profile
import info.nightscout.interfaces.profile.ProfileFunction
-import info.nightscout.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
import info.nightscout.rx.bus.RxBus
import info.nightscout.shared.interfaces.ResourceHelper
import javax.inject.Inject
@@ -34,7 +33,7 @@ class PrepareTemporaryTargetDataWorker(
@Inject lateinit var repository: AppRepository
@Inject lateinit var loop: Loop
@Inject lateinit var rxBus: RxBus
- var ctx: Context
+ private var ctx: Context
init {
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
ctx = rh.getThemedCtx(context)
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTreatmentsDataWorker.kt b/workflow/src/main/java/info/nightscout/workflow/PrepareTreatmentsDataWorker.kt
similarity index 98%
rename from app/src/main/java/info/nightscout/androidaps/workflow/PrepareTreatmentsDataWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/PrepareTreatmentsDataWorker.kt
index 6458cf9e1a..ddd0e367c7 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/PrepareTreatmentsDataWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/PrepareTreatmentsDataWorker.kt
@@ -1,10 +1,11 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
import androidx.work.WorkerParameters
import androidx.work.workDataOf
import dagger.android.HasAndroidInjector
+import info.nightscout.core.events.EventIobCalculationProgress
import info.nightscout.core.graph.OverviewData
import info.nightscout.core.graph.data.BolusDataPoint
import info.nightscout.core.graph.data.CarbsDataPoint
@@ -25,7 +26,6 @@ import info.nightscout.interfaces.profile.DefaultValueHelper
import info.nightscout.interfaces.profile.Profile
import info.nightscout.interfaces.profile.ProfileFunction
import info.nightscout.interfaces.utils.Round
-import info.nightscout.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
import info.nightscout.rx.bus.RxBus
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.utils.T
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/UpdateGraphWorker.kt b/workflow/src/main/java/info/nightscout/workflow/UpdateGraphWorker.kt
similarity index 67%
rename from app/src/main/java/info/nightscout/androidaps/workflow/UpdateGraphWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/UpdateGraphWorker.kt
index 5d23876f9c..89675364f4 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/UpdateGraphWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/UpdateGraphWorker.kt
@@ -1,14 +1,14 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
import androidx.work.WorkerParameters
import dagger.android.HasAndroidInjector
+import info.nightscout.core.events.EventIobCalculationProgress
import info.nightscout.core.workflow.CalculationWorkflow
-import info.nightscout.plugins.general.overview.OverviewPlugin
-import info.nightscout.plugins.general.overview.events.EventUpdateOverviewGraph
-import info.nightscout.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
+import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.rx.bus.RxBus
+import info.nightscout.rx.events.EventUpdateOverviewGraph
import javax.inject.Inject
class UpdateGraphWorker(
@@ -17,7 +17,7 @@ class UpdateGraphWorker(
) : Worker(context, params) {
@Inject lateinit var rxBus: RxBus
- @Inject lateinit var overviewPlugin: OverviewPlugin
+ @Inject lateinit var activePlugin: ActivePlugin
init {
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
@@ -25,7 +25,7 @@ class UpdateGraphWorker(
override fun doWork(): Result {
if (inputData.getString(CalculationWorkflow.JOB) == CalculationWorkflow.MAIN_CALCULATION)
- overviewPlugin.overviewBus.send(EventUpdateOverviewGraph("UpdateGraphWorker"))
+ activePlugin.activeOverview.overviewBus.send(EventUpdateOverviewGraph("UpdateGraphWorker"))
else
rxBus.send(EventUpdateOverviewGraph("UpdateGraphWorker"))
rxBus.send(EventIobCalculationProgress(CalculationWorkflow.ProgressData.DRAW, 100, null))
diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/UpdateIobCobSensWorker.kt b/workflow/src/main/java/info/nightscout/workflow/UpdateIobCobSensWorker.kt
similarity index 50%
rename from app/src/main/java/info/nightscout/androidaps/workflow/UpdateIobCobSensWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/UpdateIobCobSensWorker.kt
index 4beaf02e4b..435635c485 100644
--- a/app/src/main/java/info/nightscout/androidaps/workflow/UpdateIobCobSensWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/UpdateIobCobSensWorker.kt
@@ -1,13 +1,13 @@
-package info.nightscout.androidaps.workflow
+package info.nightscout.workflow
import android.content.Context
import androidx.work.Worker
import androidx.work.WorkerParameters
import dagger.android.HasAndroidInjector
-import info.nightscout.plugins.general.overview.OverviewPlugin
-import info.nightscout.plugins.general.overview.events.EventUpdateOverviewIobCob
-import info.nightscout.plugins.general.overview.events.EventUpdateOverviewSensitivity
+import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.rx.bus.RxBus
+import info.nightscout.rx.events.EventUpdateOverviewIobCob
+import info.nightscout.rx.events.EventUpdateOverviewSensitivity
import javax.inject.Inject
class UpdateIobCobSensWorker(
@@ -16,15 +16,15 @@ class UpdateIobCobSensWorker(
) : Worker(context, params) {
@Inject lateinit var rxBus: RxBus
- @Inject lateinit var overviewPlugin: OverviewPlugin
+ @Inject lateinit var activePlugin: ActivePlugin
init {
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
}
override fun doWork(): Result {
- overviewPlugin.overviewBus.send(EventUpdateOverviewIobCob("UpdateIobCobSensWorker"))
- overviewPlugin.overviewBus.send(EventUpdateOverviewSensitivity("UpdateIobCobSensWorker"))
+ activePlugin.activeOverview.overviewBus.send(EventUpdateOverviewIobCob("UpdateIobCobSensWorker"))
+ activePlugin.activeOverview.overviewBus.send(EventUpdateOverviewSensitivity("UpdateIobCobSensWorker"))
return Result.success()
}
}
\ No newline at end of file
diff --git a/app/src/main/java/info/nightscout/androidaps/di/WorkflowModule.kt b/workflow/src/main/java/info/nightscout/workflow/di/WorkflowModule.kt
similarity index 61%
rename from app/src/main/java/info/nightscout/androidaps/di/WorkflowModule.kt
rename to workflow/src/main/java/info/nightscout/workflow/di/WorkflowModule.kt
index c74036f05a..bb43e345bc 100644
--- a/app/src/main/java/info/nightscout/androidaps/di/WorkflowModule.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/di/WorkflowModule.kt
@@ -1,20 +1,20 @@
-package info.nightscout.androidaps.di
+package info.nightscout.workflow.di
import dagger.Module
import dagger.android.ContributesAndroidInjector
-import info.nightscout.androidaps.workflow.InvokeLoopWorker
-import info.nightscout.androidaps.workflow.LoadBgDataWorker
-import info.nightscout.androidaps.workflow.PrepareBasalDataWorker
-import info.nightscout.androidaps.workflow.PrepareBgDataWorker
-import info.nightscout.androidaps.workflow.PrepareBucketedDataWorker
-import info.nightscout.androidaps.workflow.PrepareIobAutosensGraphDataWorker
-import info.nightscout.androidaps.workflow.PreparePredictionsWorker
-import info.nightscout.androidaps.workflow.PrepareTemporaryTargetDataWorker
-import info.nightscout.androidaps.workflow.PrepareTreatmentsDataWorker
-import info.nightscout.androidaps.workflow.UpdateGraphWorker
-import info.nightscout.androidaps.workflow.UpdateIobCobSensWorker
-import info.nightscout.plugins.iob.iobCobCalculator.IobCobOref1Worker
-import info.nightscout.plugins.iob.iobCobCalculator.IobCobOrefWorker
+import info.nightscout.workflow.InvokeLoopWorker
+import info.nightscout.workflow.LoadBgDataWorker
+import info.nightscout.workflow.PrepareBasalDataWorker
+import info.nightscout.workflow.PrepareBgDataWorker
+import info.nightscout.workflow.PrepareBucketedDataWorker
+import info.nightscout.workflow.PrepareIobAutosensGraphDataWorker
+import info.nightscout.workflow.PreparePredictionsWorker
+import info.nightscout.workflow.PrepareTemporaryTargetDataWorker
+import info.nightscout.workflow.PrepareTreatmentsDataWorker
+import info.nightscout.workflow.UpdateGraphWorker
+import info.nightscout.workflow.UpdateIobCobSensWorker
+import info.nightscout.workflow.iob.IobCobOref1Worker
+import info.nightscout.workflow.iob.IobCobOrefWorker
@Module
@Suppress("unused")
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/CarbsInPastExtension.kt b/workflow/src/main/java/info/nightscout/workflow/iob/CarbsInPastExtension.kt
similarity index 100%
rename from plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/CarbsInPastExtension.kt
rename to workflow/src/main/java/info/nightscout/workflow/iob/CarbsInPastExtension.kt
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt b/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOref1Worker.kt
similarity index 88%
rename from plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt
rename to workflow/src/main/java/info/nightscout/workflow/iob/IobCobOref1Worker.kt
index 2fd68b9d69..01f3a40523 100644
--- a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOref1Worker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.plugins.iob.iobCobCalculator
+package info.nightscout.workflow.iob
import android.content.Context
import android.os.SystemClock
@@ -6,9 +6,9 @@ import androidx.work.Worker
import androidx.work.WorkerParameters
import androidx.work.workDataOf
import dagger.android.HasAndroidInjector
+import info.nightscout.core.events.EventIobCalculationProgress
import info.nightscout.core.extensions.target
import info.nightscout.core.iob.iobCobCalculator.data.AutosensDataObject
-import info.nightscout.core.events.EventNewNotification
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.core.utils.receivers.DataWorkerStorage
import info.nightscout.core.workflow.CalculationWorkflow
@@ -19,13 +19,11 @@ import info.nightscout.interfaces.Constants
import info.nightscout.interfaces.aps.AutosensData
import info.nightscout.interfaces.aps.SMBDefaults
import info.nightscout.interfaces.iob.IobCobCalculator
-import info.nightscout.interfaces.notifications.Notification
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.interfaces.profile.ProfileFunction
import info.nightscout.interfaces.profiling.Profiler
import info.nightscout.interfaces.utils.DecimalFormatter
-import info.nightscout.plugins.R
-import info.nightscout.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
+import info.nightscout.plugins.iob.iobCobCalculator.fromCarbs
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.Event
import info.nightscout.rx.events.EventAutosensCalculationFinished
@@ -35,6 +33,7 @@ import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP
import info.nightscout.shared.utils.DateUtil
import info.nightscout.shared.utils.T
+import info.nightscout.workflow.R
import java.util.Calendar
import java.util.GregorianCalendar
import javax.inject.Inject
@@ -155,19 +154,21 @@ class IobCobOref1Worker(
val initialIndex = autosensDataTable.indexOfKey(hourAgoData.time)
aapsLogger.debug(LTag.AUTOSENS, { ">>>>> bucketed_data.size()=" + bucketedData.size + " i=" + i + " hourAgoData=" + hourAgoData.toString() })
var past = 1
- try {
+// try {
while (past < 12) {
val ad = autosensDataTable.valueAt(initialIndex + past)
aapsLogger.debug(LTag.AUTOSENS, { ">>>>> past=" + past + " ad=" + ad?.toString() })
- if (ad == null) {
- aapsLogger.debug(LTag.AUTOSENS, {autosensDataTable.toString()})
- aapsLogger.debug(LTag.AUTOSENS, {bucketedData.toString()})
- //aapsLogger.debug(LTag.AUTOSENS, iobCobCalculatorPlugin.getBgReadingsDataTable().toString())
- val notification = Notification(Notification.SEND_LOGFILES, rh.gs(R.string.send_logfiles), Notification.LOW)
- rxBus.send(EventNewNotification(notification))
- sp.putBoolean("log_AUTOSENS", true)
- break
- }
+ /*
+ if (ad == null) {
+ aapsLogger.debug(LTag.AUTOSENS, {autosensDataTable.toString()})
+ aapsLogger.debug(LTag.AUTOSENS, {bucketedData.toString()})
+ //aapsLogger.debug(LTag.AUTOSENS, iobCobCalculatorPlugin.getBgReadingsDataTable().toString())
+ val notification = Notification(Notification.SEND_LOGFILES, rh.gs(R.string.send_logfiles), Notification.LOW)
+ rxBus.send(EventNewNotification(notification))
+ sp.putBoolean("log_AUTOSENS", true)
+ break
+ }
+ */
// let it here crash on NPE to get more data as i cannot reproduce this bug
val deviationSlope = (ad.avgDeviation - avgDeviation) / (ad.time - bgTime) * 1000 * 60 * 5
if (ad.avgDeviation > maxDeviation) {
@@ -180,17 +181,17 @@ class IobCobOref1Worker(
}
past++
}
- } catch (e: Exception) {
- aapsLogger.error("Unhandled exception", e)
- fabricPrivacy.logException(e)
- aapsLogger.debug(autosensDataTable.toString())
- aapsLogger.debug(bucketedData.toString())
- //aapsLogger.debug(iobCobCalculatorPlugin.getBgReadingsDataTable().toString())
- val notification = Notification(Notification.SEND_LOGFILES, rh.gs(R.string.send_logfiles), Notification.LOW)
- rxBus.send(EventNewNotification(notification))
- sp.putBoolean("log_AUTOSENS", true)
- break
- }
+ // } catch (e: Exception) {
+ // aapsLogger.error("Unhandled exception", e)
+ // fabricPrivacy.logException(e)
+ // aapsLogger.debug(autosensDataTable.toString())
+ // aapsLogger.debug(bucketedData.toString())
+ // //aapsLogger.debug(iobCobCalculatorPlugin.getBgReadingsDataTable().toString())
+ // val notification = Notification(Notification.SEND_LOGFILES, rh.gs(R.string.send_logfiles), Notification.LOW)
+ // rxBus.send(EventNewNotification(notification))
+ // sp.putBoolean("log_AUTOSENS", true)
+ // break
+ // }
} else {
aapsLogger.debug(LTag.AUTOSENS, ">>>>> bucketed_data.size()=" + bucketedData.size + " i=" + i + " hourAgoData=" + "null")
}
diff --git a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt b/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOrefWorker.kt
similarity index 88%
rename from plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt
rename to workflow/src/main/java/info/nightscout/workflow/iob/IobCobOrefWorker.kt
index 4fdaae7400..6db96c371f 100644
--- a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt
+++ b/workflow/src/main/java/info/nightscout/workflow/iob/IobCobOrefWorker.kt
@@ -1,4 +1,4 @@
-package info.nightscout.plugins.iob.iobCobCalculator
+package info.nightscout.workflow.iob
import android.content.Context
import android.os.SystemClock
@@ -6,8 +6,8 @@ import androidx.work.Worker
import androidx.work.WorkerParameters
import androidx.work.workDataOf
import dagger.android.HasAndroidInjector
+import info.nightscout.core.events.EventIobCalculationProgress
import info.nightscout.core.iob.iobCobCalculator.data.AutosensDataObject
-import info.nightscout.core.events.EventNewNotification
import info.nightscout.core.utils.fabric.FabricPrivacy
import info.nightscout.core.utils.receivers.DataWorkerStorage
import info.nightscout.core.workflow.CalculationWorkflow
@@ -17,13 +17,11 @@ import info.nightscout.interfaces.Constants
import info.nightscout.interfaces.aps.AutosensData
import info.nightscout.interfaces.aps.SMBDefaults
import info.nightscout.interfaces.iob.IobCobCalculator
-import info.nightscout.interfaces.notifications.Notification
import info.nightscout.interfaces.plugin.ActivePlugin
import info.nightscout.interfaces.profile.ProfileFunction
import info.nightscout.interfaces.profiling.Profiler
import info.nightscout.interfaces.utils.DecimalFormatter
-import info.nightscout.plugins.R
-import info.nightscout.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress
+import info.nightscout.plugins.iob.iobCobCalculator.fromCarbs
import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.Event
import info.nightscout.rx.events.EventAutosensCalculationFinished
@@ -33,6 +31,7 @@ import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP
import info.nightscout.shared.utils.DateUtil
import info.nightscout.shared.utils.T
+import info.nightscout.workflow.R
import javax.inject.Inject
import kotlin.math.abs
import kotlin.math.max
@@ -150,19 +149,19 @@ class IobCobOrefWorker @Inject internal constructor(
val initialIndex = autosensDataTable.indexOfKey(hourAgoData.time)
aapsLogger.debug(LTag.AUTOSENS, ">>>>> bucketed_data.size()=" + bucketedData.size + " i=" + i + " hourAgoData=" + hourAgoData.toString())
var past = 1
- try {
+ // try {
while (past < 12) {
val ad = autosensDataTable.valueAt(initialIndex + past)
aapsLogger.debug(LTag.AUTOSENS, ">>>>> past=" + past + " ad=" + ad?.toString())
- if (ad == null) {
- aapsLogger.debug(LTag.AUTOSENS, autosensDataTable.toString())
- aapsLogger.debug(LTag.AUTOSENS, bucketedData.toString())
- //aapsLogger.debug(LTag.AUTOSENS, data.iobCobCalculatorPlugin.getBgReadingsDataTable().toString())
- val notification = Notification(Notification.SEND_LOGFILES, rh.gs(R.string.send_logfiles), Notification.LOW)
- rxBus.send(EventNewNotification(notification))
- sp.putBoolean("log_AUTOSENS", true)
- break
- }
+ // if (ad == null) {
+ // aapsLogger.debug(LTag.AUTOSENS, autosensDataTable.toString())
+ // aapsLogger.debug(LTag.AUTOSENS, bucketedData.toString())
+ // //aapsLogger.debug(LTag.AUTOSENS, data.iobCobCalculatorPlugin.getBgReadingsDataTable().toString())
+ // val notification = Notification(Notification.SEND_LOGFILES, rh.gs(R.string.send_logfiles), Notification.LOW)
+ // rxBus.send(EventNewNotification(notification))
+ // sp.putBoolean("log_AUTOSENS", true)
+ // break
+ // }
// let it here crash on NPE to get more data as i cannot reproduce this bug
val deviationSlope = (ad.avgDeviation - avgDeviation) / (ad.time - bgTime) * 1000 * 60 * 5
if (ad.avgDeviation > maxDeviation) {
@@ -175,17 +174,17 @@ class IobCobOrefWorker @Inject internal constructor(
}
past++
}
- } catch (e: Exception) {
- aapsLogger.error("Unhandled exception", e)
- fabricPrivacy.logException(e)
- aapsLogger.debug(autosensDataTable.toString())
- aapsLogger.debug(bucketedData.toString())
- //aapsLogger.debug(data.iobCobCalculatorPlugin.getBgReadingsDataTable().toString())
- val notification = Notification(Notification.SEND_LOGFILES, rh.gs(R.string.send_logfiles), Notification.LOW)
- rxBus.send(EventNewNotification(notification))
- sp.putBoolean("log_AUTOSENS", true)
- break
- }
+ // } catch (e: Exception) {
+ // aapsLogger.error("Unhandled exception", e)
+ // fabricPrivacy.logException(e)
+ // aapsLogger.debug(autosensDataTable.toString())
+ // aapsLogger.debug(bucketedData.toString())
+ // //aapsLogger.debug(data.iobCobCalculatorPlugin.getBgReadingsDataTable().toString())
+ // val notification = Notification(Notification.SEND_LOGFILES, rh.gs(R.string.send_logfiles), Notification.LOW)
+ // rxBus.send(EventNewNotification(notification))
+ // sp.putBoolean("log_AUTOSENS", true)
+ // break
+ // }
} else {
aapsLogger.debug(LTag.AUTOSENS, ">>>>> bucketed_data.size()=" + bucketedData.size + " i=" + i + " hourAgoData=" + "null")
}