diff --git a/README.md b/README.md
index 0e2a2082a1..32aef48cd9 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,4 @@
-# AndroidAPS - Medtronic
-
-This is the main Integration/Development branch for Medtronic driver in AAPS.
-
-Every integration will be done from this [repository](https://github.com/andyrozman/AndroidAPS) where now main branch is medtronic_andy. After all development is done, it will be merged into Milos Kozak's dev, but this will be done after all internal Milestones have been done (all 7 of them). If you want more details look at next section.
-
-# [Roundtrip2RileyLinkAAPS](https://github.com/andyrozman/Roundtrip2RileyLinkAAPS)
-
-This is repository and App, where most of the code and communciation with RileyLink and Medtronic pump will happen. After functionalities are developed, they will be slowly copied into this AAPS repository.
-
-There you can find the Project (Medtronic), with nice board with all the tasks (lined to issue's in that repository), needed to finish the driver. There you can find even small Wiki pages about status of this driver.
-
-
-# AndroidAPS - Default README content
+# AndroidAPS
* Check the wiki: http://wiki.androidaps.org
* Everyone who’s been looping with AndroidAPS needs to fill out the form after 3 days of looping https://docs.google.com/forms/d/14KcMjlINPMJHVt28MDRupa4sz4DDIooI4SrW0P3HSN8/viewform?c=0&w=1
@@ -24,4 +11,4 @@ There you can find the Project (Medtronic), with nice board with all the tasks (
dev: [![codecov](https://codecov.io/gh/MilosKozak/AndroidAPS/branch/dev/graph/badge.svg)](https://codecov.io/gh/MilosKozak/AndroidAPS)
-[![Donate via PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y4LHGJJESAVB8)
+[![Donate via PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y4LHGJJESAVB8)
\ No newline at end of file
diff --git a/app/src/main/assets/logback.xml b/app/src/main/assets/logback.xml
index 21ff368791..ae1594f639 100644
--- a/app/src/main/assets/logback.xml
+++ b/app/src/main/assets/logback.xml
@@ -7,7 +7,7 @@
- ${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}_%d{HH-mm}_.%i.zip
+ ${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}_%d{HH-mm-ss, aux}_.%i.zip
5MB
- 240
+ 120
- %d{HH:mm:ss.SSS} [%thread] %.-1level/%logger: [%class{0}.%M\(\):%line]:
- %msg%n
-
+ %d{HH:mm:ss.SSS} [%thread] %.-1level/%logger: [%class{0}.%M\(\):%line]: %msg%n
diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java
index 2442977e6c..c126bd60b6 100644
--- a/app/src/main/java/info/nightscout/androidaps/MainApp.java
+++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java
@@ -267,9 +267,6 @@ public class MainApp extends Application {
private void setBTReceiver() {
- // SP.putDouble(RileyLinkConst.Prefs.LastGoodDeviceFrequency, null);
- // SP.remove(MedtronicConst.Statistics.LastPumpHistoryEntry); // FIXME remove
-
// RileyLink framework needs to know, when BT was reconnected, so that we can reconnect to RL device,
// also detected if timezone/time/date changed and send notification to any active pump driver.
btReceiver = new BroadcastReceiver() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerUtils.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerUtils.kt
index d7a60fee88..daebb5deb6 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerUtils.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerUtils.kt
@@ -46,7 +46,7 @@ private fun checkVersion() = if (isConnected()) {
Thread {
try {
val version: String? = findVersion(URL("https://raw.githubusercontent.com/MilosKozak/AndroidAPS/master/app/build.gradle").readText())
- compareWithCurrentVersion(version, BuildConfig.VERSION)
+ compareWithCurrentVersion(version, BuildConfig.VERSION_NAME)
} catch (e: IOException) {
log.debug("Github master version check error: $e")
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.java
index 9fbbf0fccd..2d7f13f221 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/WearPlugin.java
@@ -112,7 +112,7 @@ public class WearPlugin extends PluginBase {
//Log.d(TAG, "WR: WearPlugin:requestNotificationCancel");
Intent intent = new Intent(ctx, WatchUpdaterService.class)
- .setAction(WatchUpdaterService.ACTION_CANCEL_NOTIFICATION);
+ .setAction(WatchUpdaterService.ACTION_CANCEL_NOTIFICATION);
intent.putExtra("actionstring", actionstring);
ctx.startService(intent);
}
@@ -225,4 +225,4 @@ public class WearPlugin extends PluginBase {
public static void unRegisterWatchUpdaterService() {
watchUS = null;
}
-}
\ No newline at end of file
+}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java
index 836bf5466d..f879774c48 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/defs/PumpType.java
@@ -112,12 +112,12 @@ public enum PumpType {
new DoseSettings(0.05d, 30, 24*60, 0d, 35d), PumpCapability.BasalRate_Duration30minAllowed, //
0.025d, 0.025d, DoseStepSize.MedtronicVeoBasal, PumpCapability.MedtronicCapabilities), //
- Medtronic_554_754_Veo("Medtronic 554/754 (Veo)", Medtronic_523_723_Revel), // TODO
+ Medtronic_554_754_Veo("Medtronic 554/754 (Veo)", Medtronic_523_723_Revel), //
Medtronic_640G("Medtronic 640G", 0.025d, null, //
- new DoseSettings(0.05d, 30, 8*60, 0.05d), //
+ new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
PumpTempBasalType.Absolute, //
- new DoseSettings(0.05d, 30, 24*60, 0d, 35d), PumpCapability.BasalRate_Duration30minAllowed, //
+ new DoseSettings(0.05d, 30, 24 * 60, 0d, 35d), PumpCapability.BasalRate_Duration30minAllowed, //
0.025d, 0.025d, DoseStepSize.MedtronicVeoBasal, PumpCapability.VirtualPumpCapabilities), //
// Tandem
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.java
index 7e71e17767..c72fe49d21 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/MedtronicPumpPlugin.java
@@ -290,13 +290,6 @@ public class MedtronicPumpPlugin extends PumpPluginAbstract implements PumpInter
}
- // @Override
- // public boolean isSuspended() {
- // // TO DO remove
- // LOG.debug("MedtronicPumpPlugin::isSuspended");
- // return isServiceSet() && medtronicHistoryData.is();
- // }
-
@Override
public boolean isBusy() {
if (isLoggingEnabled() && displayConnectionMessages)
@@ -1244,6 +1237,7 @@ public class MedtronicPumpPlugin extends PumpPluginAbstract implements PumpInter
case PumpTime:
case Configuration:
+ case BatteryStatus:
case PumpHistory: {
workWithStatusRefresh(StatusRefreshAction.Add, refreshType,
getTimeInFutureFromMinutes(refreshType.getRefreshTime() + additionalTimeInMinutes));
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/source/SourceDexcomPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/source/SourceDexcomPlugin.kt
index 2131d5e321..6119c07c37 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/source/SourceDexcomPlugin.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/source/SourceDexcomPlugin.kt
@@ -1,6 +1,5 @@
package info.nightscout.androidaps.plugins.source
-import android.Manifest
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
@@ -33,9 +32,9 @@ object SourceDexcomPlugin : PluginBase(PluginDescription()
private val log = LoggerFactory.getLogger(L.BGSOURCE)
private val PACKAGE_NAMES = arrayOf("com.dexcom.cgm.region1.mgdl", "com.dexcom.cgm.region1.mmol",
- "com.dexcom.cgm.region2.mgdl", "com.dexcom.cgm.region2.mmol",
- "com.dexcom.g6.region1.mmol", "com.dexcom.g6.region2.mgdl",
- "com.dexcom.g6.region3.mgdl", "com.dexcom.g6.region3.mmol")
+ "com.dexcom.cgm.region2.mgdl", "com.dexcom.cgm.region2.mmol",
+ "com.dexcom.g6.region1.mmol", "com.dexcom.g6.region2.mgdl",
+ "com.dexcom.g6.region3.mgdl", "com.dexcom.g6.region3.mmol")
const val PERMISSION = "com.dexcom.cgm.EXTERNAL_PERMISSION"
@@ -83,7 +82,7 @@ object SourceDexcomPlugin : PluginBase(PluginDescription()
val meters = intent.getBundleExtra("meters")
for (i in 0 until meters.size()) {
val meter = meters.getBundle(i.toString())
- val timestamp = meter.getLong("timestamp") * 1000
+ val timestamp = meter!!.getLong("timestamp") * 1000
if (MainApp.getDbHelper().getCareportalEventFromTimestamp(timestamp) != null) continue
val jsonObject = JSONObject()
jsonObject.put("enteredBy", "AndroidAPS-Dexcom")
@@ -95,7 +94,7 @@ object SourceDexcomPlugin : PluginBase(PluginDescription()
NSUpload.uploadCareportalEntryToNS(jsonObject)
}
if (SP.getBoolean(R.string.key_dexcom_lognssensorchange, false) && intent.hasExtra("sensorInsertionTime")) {
- val sensorInsertionTime = intent.extras.getLong("sensorInsertionTime") * 1000
+ val sensorInsertionTime = intent.extras!!.getLong("sensorInsertionTime") * 1000
if (MainApp.getDbHelper().getCareportalEventFromTimestamp(sensorInsertionTime) == null) {
val jsonObject = JSONObject()
jsonObject.put("enteredBy", "AndroidAPS-Dexcom")
@@ -104,7 +103,7 @@ object SourceDexcomPlugin : PluginBase(PluginDescription()
NSUpload.uploadCareportalEntryToNS(jsonObject)
}
}
- } catch (e : Exception) {
+ } catch (e: Exception) {
log.error("Error while processing intent from Dexcom App", e)
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentService.java b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentService.java
index 169373d375..57a5f25df2 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentService.java
@@ -296,152 +296,6 @@ public class TreatmentService extends OrmLiteBaseService {
}
-
- // return true if new record is created
- @Deprecated
- public UpdateReturn createOrUpdateOld(Treatment treatment, boolean fromNightScout) {
- try {
- Treatment old;
- treatment.date = DatabaseHelper.roundDateToSec(treatment.date);
- boolean changed = false;
-
- if (treatment.source == Source.PUMP) {
- // check for changed from pump change in NS
- Treatment existingTreatment = getPumpRecordById(treatment.pumpId);
- if (existingTreatment != null) {
- boolean equalRePumpHistory = existingTreatment.equalsRePumpHistory(treatment);
- boolean sameSource = existingTreatment.source == treatment.source;
-
- if (!equalRePumpHistory) {
- // another treatment exists. Update it with the treatment coming from the pump
- if (L.isEnabled(L.DATATREATMENTS))
- log.debug("Pump record already found in database: " + existingTreatment.toString() + " wanting to add " + treatment.toString());
- long oldDate = existingTreatment.date;
-
- // preserve carbs & SMB
- changed = preserveCarbsAndSMB(treatment, existingTreatment);
-
- getDao().delete(existingTreatment); // need to delete/create because date may change too
- existingTreatment.copyBasics(treatment);
- getDao().create(existingTreatment);
- DatabaseHelper.updateEarliestDataChange(oldDate);
- DatabaseHelper.updateEarliestDataChange(existingTreatment.date);
- scheduleTreatmentChange(treatment);
- return new UpdateReturn(sameSource || changed, false); //updating a pump treatment with another one from the pump is not counted as clash
- }
-
- return new UpdateReturn(equalRePumpHistory, false);
- }
- existingTreatment = getDao().queryForId(treatment.date);
- if (existingTreatment != null) {
- // another treatment exists with different pumpID. Update it with the treatment coming from the pump
- boolean equalRePumpHistory = existingTreatment.equalsRePumpHistory(treatment);
- boolean sameSource = existingTreatment.source == treatment.source;
- long oldDate = existingTreatment.date;
- if (L.isEnabled(L.DATATREATMENTS))
- log.debug("Pump record already found in database: " + existingTreatment.toString() + " wanting to add " + treatment.toString());
-
- // preserve carbs & SMB
- changed = preserveCarbsAndSMB(treatment, existingTreatment);
-
- getDao().delete(existingTreatment); // need to delete/create because date may change too
- existingTreatment.copyFrom(treatment);
- getDao().create(existingTreatment);
- DatabaseHelper.updateEarliestDataChange(oldDate);
- DatabaseHelper.updateEarliestDataChange(existingTreatment.date);
- scheduleTreatmentChange(treatment);
- return new UpdateReturn(equalRePumpHistory || sameSource || changed, false);
- }
- getDao().create(treatment);
- if (L.isEnabled(L.DATATREATMENTS))
- log.debug("New record from: " + Source.getString(treatment.source) + " " + treatment.toString());
- DatabaseHelper.updateEarliestDataChange(treatment.date);
- scheduleTreatmentChange(treatment);
- return new UpdateReturn(true, true);
- }
- if (treatment.source == Source.NIGHTSCOUT) {
- old = getDao().queryForId(treatment.date);
- if (old != null) {
- if (!old.isEqualWithoutPumpId(treatment)) {
- boolean historyChange = old.isDataChanging(treatment);
- long oldDate = old.date;
- getDao().delete(old); // need to delete/create because date may change too
- treatmentCopy(old, treatment, fromNightScout);
- getDao().create(old);
- if (L.isEnabled(L.DATATREATMENTS))
- log.debug("Updating record by date from: " + Source.getString(treatment.source) + " " + old.toString());
- if (historyChange) {
- DatabaseHelper.updateEarliestDataChange(oldDate);
- DatabaseHelper.updateEarliestDataChange(old.date);
- }
- scheduleTreatmentChange(treatment);
- return new UpdateReturn(true, true);
- }
- if (L.isEnabled(L.DATATREATMENTS))
- log.debug("Equal record by date from: " + Source.getString(treatment.source) + " " + old.toString());
- return new UpdateReturn(true, false);
- }
- // find by NS _id
- if (treatment._id != null) {
- old = findByNSId(treatment._id);
- if (old != null) {
- if (!old.isEqualWithoutPumpId(treatment)) {
- boolean historyChange = old.isDataChanging(treatment);
- long oldDate = old.date;
- getDao().delete(old); // need to delete/create because date may change too
- treatmentCopy(old, treatment, fromNightScout);
- getDao().create(old);
- if (L.isEnabled(L.DATATREATMENTS))
- log.debug("Updating record by _id from: " + Source.getString(treatment.source) + " " + old.toString());
- if (historyChange) {
- DatabaseHelper.updateEarliestDataChange(oldDate);
- DatabaseHelper.updateEarliestDataChange(old.date);
- }
- scheduleTreatmentChange(treatment);
- return new UpdateReturn(true, true);
- }
- if (L.isEnabled(L.DATATREATMENTS))
- log.debug("Equal record by _id from: " + Source.getString(treatment.source) + " " + old.toString());
- return new UpdateReturn(true, false);
- }
- }
- getDao().create(treatment);
- if (L.isEnabled(L.DATATREATMENTS))
- log.debug("New record from: " + Source.getString(treatment.source) + " " + treatment.toString());
- DatabaseHelper.updateEarliestDataChange(treatment.date);
- scheduleTreatmentChange(treatment);
- return new UpdateReturn(true, true);
- }
- if (treatment.source == Source.USER) {
- getDao().create(treatment);
- if (L.isEnabled(L.DATATREATMENTS))
- log.debug("New record from: " + Source.getString(treatment.source) + " " + treatment.toString());
- DatabaseHelper.updateEarliestDataChange(treatment.date);
- scheduleTreatmentChange(treatment);
- return new UpdateReturn(true, true);
- }
- } catch (SQLException e) {
- log.error("Unhandled exception", e);
- }
- return new UpdateReturn(false, false);
- }
-
- @Deprecated
- private boolean preserveCarbsAndSMB(Treatment treatment, Treatment existingTreatment) {
- if (existingTreatment.isValid) {
- if (existingTreatment.carbs > 0 && treatment.carbs == 0) {
- treatment.carbs = existingTreatment.carbs;
- }
-
- treatment.isSMB = (existingTreatment.isSMB || treatment.isSMB);
-
- return true;
- }
-
- return false;
- }
-
-
private boolean optionalTreatmentCopy(Treatment oldTreatment, Treatment newTreatment, boolean fromNightScout) {
log.debug("optionalTreatmentCopy [old={}, new={}]", oldTreatment.toString(), newTreatment.toString());
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPlugin.java
index 3363883fc4..c4f5b47f54 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPlugin.java
@@ -1,12 +1,5 @@
package info.nightscout.androidaps.plugins.treatments;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
@@ -14,6 +7,13 @@ import androidx.annotation.Nullable;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.squareup.otto.Subscribe;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
@@ -60,12 +60,10 @@ import info.nightscout.androidaps.utils.T;
* Created by mike on 05.08.2016.
*/
public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface {
-
private Logger log = LoggerFactory.getLogger(L.DATATREATMENTS);
private static TreatmentsPlugin treatmentsPlugin;
-
public static TreatmentsPlugin getPlugin() {
if (treatmentsPlugin == null)
treatmentsPlugin = new TreatmentsPlugin();
@@ -83,15 +81,18 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
private final Intervals tempTargets = new OverlappingIntervals<>();
private final ProfileIntervals profiles = new ProfileIntervals<>();
-
public TreatmentsPlugin() {
- super(new PluginDescription().mainType(PluginType.TREATMENT).fragmentClass(TreatmentsFragment.class.getName())
- .pluginName(R.string.treatments).shortName(R.string.treatments_shortname).alwaysEnabled(true)
- .description(R.string.description_treatments));
+ super(new PluginDescription()
+ .mainType(PluginType.TREATMENT)
+ .fragmentClass(TreatmentsFragment.class.getName())
+ .pluginName(R.string.treatments)
+ .shortName(R.string.treatments_shortname)
+ .alwaysEnabled(true)
+ .description(R.string.description_treatments)
+ );
this.service = new TreatmentService();
}
-
@Override
protected void onStart() {
MainApp.bus().register(this);
@@ -103,39 +104,35 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
super.onStart();
}
-
@Override
protected void onStop() {
MainApp.bus().register(this);
}
-
public TreatmentService getService() {
return this.service;
}
-
private void initializeTreatmentData() {
if (L.isEnabled(L.DATATREATMENTS))
log.debug("initializeTreatmentData");
double dia = Constants.defaultDIA;
if (ConfigBuilderPlugin.getPlugin() != null && ProfileFunctions.getInstance().getProfile() != null)
dia = ProfileFunctions.getInstance().getProfile().getDia();
- long fromMills = (long)(System.currentTimeMillis() - 60 * 60 * 1000L * (24 + dia));
+ long fromMills = (long) (System.currentTimeMillis() - 60 * 60 * 1000L * (24 + dia));
synchronized (treatments) {
treatments.clear();
treatments.addAll(getService().getTreatmentDataFromTime(fromMills, false));
}
}
-
private void initializeTempBasalData() {
if (L.isEnabled(L.DATATREATMENTS))
log.debug("initializeTempBasalData");
double dia = Constants.defaultDIA;
if (ConfigBuilderPlugin.getPlugin() != null && ProfileFunctions.getInstance().getProfile() != null)
dia = ProfileFunctions.getInstance().getProfile().getDia();
- long fromMills = (long)(System.currentTimeMillis() - 60 * 60 * 1000L * (24 + dia));
+ long fromMills = (long) (System.currentTimeMillis() - 60 * 60 * 1000L * (24 + dia));
synchronized (tempBasals) {
tempBasals.reset().add(MainApp.getDbHelper().getTemporaryBasalsDataFromTime(fromMills, false));
@@ -143,14 +140,13 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
-
private void initializeExtendedBolusData() {
if (L.isEnabled(L.DATATREATMENTS))
log.debug("initializeExtendedBolusData");
double dia = Constants.defaultDIA;
if (ConfigBuilderPlugin.getPlugin() != null && ProfileFunctions.getInstance().getProfile() != null)
dia = ProfileFunctions.getInstance().getProfile().getDia();
- long fromMills = (long)(System.currentTimeMillis() - 60 * 60 * 1000L * (24 + dia));
+ long fromMills = (long) (System.currentTimeMillis() - 60 * 60 * 1000L * (24 + dia));
synchronized (extendedBoluses) {
extendedBoluses.reset().add(MainApp.getDbHelper().getExtendedBolusDataFromTime(fromMills, false));
@@ -158,7 +154,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
-
private void initializeTempTargetData() {
if (L.isEnabled(L.DATATREATMENTS))
log.debug("initializeTempTargetData");
@@ -168,7 +163,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
private void initializeProfileSwitchData() {
if (L.isEnabled(L.DATATREATMENTS))
log.debug("initializeProfileSwitchData");
@@ -177,13 +171,11 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Override
public IobTotal getLastCalculationTreatments() {
return lastTreatmentCalculation;
}
-
@Override
public IobTotal getCalculationToTimeTreatments(long time) {
IobTotal total = new IobTotal(time);
@@ -205,10 +197,8 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
synchronized (treatments) {
for (Integer pos = 0; pos < treatments.size(); pos++) {
Treatment t = treatments.get(pos);
- if (!t.isValid)
- continue;
- if (t.date > time)
- continue;
+ if (!t.isValid) continue;
+ if (t.date > time) continue;
Iob tIOB = t.iobCalc(time, dia);
total.iob += tIOB.iobContrib;
total.activity += tIOB.activityContrib;
@@ -218,9 +208,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
// instead of dividing the DIA that only worked on the bilinear curves,
// multiply the time the treatment is seen active.
long timeSinceTreatment = time - t.date;
- long snoozeTime = t.date
- + (long)(timeSinceTreatment * SP
- .getDouble(R.string.key_openapsama_bolussnooze_dia_divisor, 2.0));
+ long snoozeTime = t.date + (long) (timeSinceTreatment * SP.getDouble(R.string.key_openapsama_bolussnooze_dia_divisor, 2.0));
Iob bIOB = t.iobCalc(snoozeTime, dia);
total.bolussnooze += bIOB.iobContrib;
}
@@ -231,8 +219,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
synchronized (extendedBoluses) {
for (Integer pos = 0; pos < extendedBoluses.size(); pos++) {
ExtendedBolus e = extendedBoluses.get(pos);
- if (e.date > time)
- continue;
+ if (e.date > time) continue;
IobTotal calc = e.iobCalc(time);
total.plus(calc);
}
@@ -240,27 +227,23 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
return total;
}
-
@Override
public void updateTotalIOBTreatments() {
lastTreatmentCalculation = getCalculationToTimeTreatments(System.currentTimeMillis());
}
-
@Override
public MealData getMealData() {
MealData result = new MealData();
Profile profile = ProfileFunctions.getInstance().getProfile();
- if (profile == null)
- return result;
+ if (profile == null) return result;
long now = System.currentTimeMillis();
long dia_ago = now - (Double.valueOf(profile.getDia() * T.hours(1).msecs())).longValue();
double maxAbsorptionHours = Constants.DEFAULT_MAX_ABSORPTION_TIME;
- if (SensitivityAAPSPlugin.getPlugin().isEnabled(PluginType.SENSITIVITY)
- || SensitivityWeightedAveragePlugin.getPlugin().isEnabled(PluginType.SENSITIVITY)) {
+ if (SensitivityAAPSPlugin.getPlugin().isEnabled(PluginType.SENSITIVITY) || SensitivityWeightedAveragePlugin.getPlugin().isEnabled(PluginType.SENSITIVITY)) {
maxAbsorptionHours = SP.getDouble(R.string.key_absorption_maxtime, Constants.DEFAULT_MAX_ABSORPTION_TIME);
} else {
maxAbsorptionHours = SP.getDouble(R.string.key_absorption_cutoff, Constants.DEFAULT_MAX_ABSORPTION_TIME);
@@ -300,7 +283,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
return result;
}
-
@Override
public List getTreatmentsFromHistory() {
synchronized (treatments) {
@@ -340,7 +322,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Override
public long getLastBolusTime() {
long now = System.currentTimeMillis();
@@ -358,13 +339,11 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
return last;
}
-
@Override
public boolean isInHistoryRealTempBasalInProgress() {
return getRealTempBasalFromHistory(System.currentTimeMillis()) != null;
}
-
@Override
public TemporaryBasal getRealTempBasalFromHistory(long time) {
synchronized (tempBasals) {
@@ -372,19 +351,16 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Override
public boolean isTempBasalInProgress() {
return getTempBasalFromHistory(System.currentTimeMillis()) != null;
}
-
@Override
public boolean isInHistoryExtendedBoluslInProgress() {
- return getExtendedBolusFromHistory(System.currentTimeMillis()) != null; // TODO: crosscheck here
+ return getExtendedBolusFromHistory(System.currentTimeMillis()) != null; //TODO: crosscheck here
}
-
@Subscribe
public void onStatusEvent(final EventReloadTreatmentData ev) {
if (L.isEnabled(L.DATATREATMENTS))
@@ -395,7 +371,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
MainApp.bus().post(ev.next);
}
-
@Subscribe
@SuppressWarnings("unused")
public void onStatusEvent(final EventReloadTempBasalData ev) {
@@ -405,19 +380,16 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
updateTotalIOBTempBasals();
}
-
@Override
public IobTotal getLastCalculationTempBasals() {
return lastTempBasalsCalculation;
}
-
@Override
public IobTotal getCalculationToTimeTempBasals(long time, Profile profile) {
return getCalculationToTimeTempBasals(time, profile, false, 0);
}
-
public IobTotal getCalculationToTimeTempBasals(long time, Profile profile, boolean truncate, long truncateTime) {
IobTotal total = new IobTotal(time);
@@ -428,8 +400,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
synchronized (tempBasals) {
for (Integer pos = 0; pos < tempBasals.size(); pos++) {
TemporaryBasal t = tempBasals.get(pos);
- if (t.date > time)
- continue;
+ if (t.date > time) continue;
IobTotal calc;
if (truncate && t.end() > truncateTime) {
TemporaryBasal dummyTemp = new TemporaryBasal();
@@ -439,7 +410,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
} else {
calc = t.iobCalc(time, profile);
}
- // log.debug("BasalIOB " + new Date(time) + " >>> " + calc.basaliob);
+ //log.debug("BasalIOB " + new Date(time) + " >>> " + calc.basaliob);
total.plus(calc);
}
}
@@ -448,8 +419,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
synchronized (extendedBoluses) {
for (Integer pos = 0; pos < extendedBoluses.size(); pos++) {
ExtendedBolus e = extendedBoluses.get(pos);
- if (e.date > time)
- continue;
+ if (e.date > time) continue;
IobTotal calc;
if (truncate && e.end() > truncateTime) {
ExtendedBolus dummyExt = new ExtendedBolus();
@@ -472,7 +442,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
return total;
}
-
@Override
public void updateTotalIOBTempBasals() {
Profile profile = ProfileFunctions.getInstance().getProfile();
@@ -480,7 +449,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
lastTempBasalsCalculation = getCalculationToTimeTempBasals(DateUtil.now(), profile);
}
-
@Nullable
@Override
public TemporaryBasal getTempBasalFromHistory(long time) {
@@ -493,7 +461,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
return null;
}
-
@Override
public ExtendedBolus getExtendedBolusFromHistory(long time) {
synchronized (extendedBoluses) {
@@ -501,10 +468,9 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Override
public boolean addToHistoryExtendedBolus(ExtendedBolus extendedBolus) {
- // log.debug("Adding new ExtentedBolus record" + extendedBolus.log());
+ //log.debug("Adding new ExtentedBolus record" + extendedBolus.log());
boolean newRecordCreated = MainApp.getDbHelper().createOrUpdate(extendedBolus);
if (newRecordCreated) {
if (extendedBolus.durationInMinutes == 0) {
@@ -520,7 +486,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
return newRecordCreated;
}
-
@Override
public Intervals getExtendedBolusesFromHistory() {
synchronized (extendedBoluses) {
@@ -528,7 +493,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Override
public Intervals getTemporaryBasalsFromHistory() {
synchronized (tempBasals) {
@@ -536,10 +500,9 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Override
public boolean addToHistoryTempBasal(TemporaryBasal tempBasal) {
- // log.debug("Adding new TemporaryBasal record" + tempBasal.toString());
+ //log.debug("Adding new TemporaryBasal record" + tempBasal.toString());
boolean newRecordCreated = MainApp.getDbHelper().createOrUpdate(tempBasal);
if (newRecordCreated) {
if (tempBasal.durationInMinutes == 0)
@@ -552,7 +515,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
return newRecordCreated;
}
-
// return true if new record is created
@Override
public boolean addToHistoryTreatment(DetailedBolusInfo detailedBolusInfo, boolean allowUpdate) {
@@ -570,20 +532,16 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
treatment.boluscalc = detailedBolusInfo.boluscalc != null ? detailedBolusInfo.boluscalc.toString() : null;
TreatmentService.UpdateReturn creatOrUpdateResult = getService().createOrUpdate(treatment, false);
boolean newRecordCreated = creatOrUpdateResult.newRecord;
- // log.debug("Adding new Treatment record" + treatment.toString());
+ //log.debug("Adding new Treatment record" + treatment.toString());
if (detailedBolusInfo.carbTime != 0) {
Treatment carbsTreatment = new Treatment();
carbsTreatment.source = detailedBolusInfo.source;
carbsTreatment.pumpId = detailedBolusInfo.pumpId; // but this should never happen
- carbsTreatment.date = detailedBolusInfo.date + detailedBolusInfo.carbTime * 60 * 1000L + 1000L; // add 1 sec
- // to make
- // them
- // different
- // records
+ carbsTreatment.date = detailedBolusInfo.date + detailedBolusInfo.carbTime * 60 * 1000L + 1000L; // add 1 sec to make them different records
carbsTreatment.carbs = detailedBolusInfo.carbs;
carbsTreatment.source = detailedBolusInfo.source;
getService().createOrUpdate(carbsTreatment, false);
- // log.debug("Adding new Treatment record" + carbsTreatment);
+ //log.debug("Adding new Treatment record" + carbsTreatment);
}
if (newRecordCreated && detailedBolusInfo.isValid)
NSUpload.uploadTreatmentRecord(detailedBolusInfo);
@@ -591,8 +549,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
if (!allowUpdate && !creatOrUpdateResult.success) {
log.error("Treatment could not be added to DB", new Exception());
- String status = String.format(MainApp.gs(R.string.error_adding_treatment_message), treatment.insulin,
- (int)treatment.carbs, DateUtil.dateAndTimeString(treatment.date));
+ String status = String.format(MainApp.gs(R.string.error_adding_treatment_message), treatment.insulin, (int) treatment.carbs, DateUtil.dateAndTimeString(treatment.date));
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
i.putExtra("soundid", R.raw.error);
@@ -610,7 +567,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
return newRecordCreated;
}
-
@Override
public long oldestDataAvailable() {
long oldestTime = System.currentTimeMillis();
@@ -630,7 +586,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
return oldestTime;
}
-
// TempTargets
@Subscribe
@SuppressWarnings("unused")
@@ -638,7 +593,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
initializeTempTargetData();
}
-
@Nullable
@Override
public TempTarget getTempTargetFromHistory() {
@@ -647,7 +601,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Nullable
@Override
public TempTarget getTempTargetFromHistory(long time) {
@@ -656,7 +609,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Override
public Intervals getTempTargetsFromHistory() {
synchronized (tempTargets) {
@@ -664,15 +616,13 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Override
public void addToHistoryTempTarget(TempTarget tempTarget) {
- // log.debug("Adding new TemporaryBasal record" + profileSwitch.log());
+ //log.debug("Adding new TemporaryBasal record" + profileSwitch.log());
MainApp.getDbHelper().createOrUpdate(tempTarget);
NSUpload.uploadTempTarget(tempTarget);
}
-
// Profile Switch
@Subscribe
@SuppressWarnings("unused")
@@ -680,15 +630,13 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
initializeProfileSwitchData();
}
-
@Override
public ProfileSwitch getProfileSwitchFromHistory(long time) {
synchronized (profiles) {
- return (ProfileSwitch)profiles.getValueToTime(time);
+ return (ProfileSwitch) profiles.getValueToTime(time);
}
}
-
@Override
public ProfileIntervals getProfileSwitchesFromHistory() {
synchronized (profiles) {
@@ -696,13 +644,13 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
-
@Override
public void addToHistoryProfileSwitch(ProfileSwitch profileSwitch) {
- // log.debug("Adding new TemporaryBasal record" + profileSwitch.log());
+ //log.debug("Adding new TemporaryBasal record" + profileSwitch.log());
MainApp.bus().post(new EventDismissNotification(Notification.PROFILE_SWITCH_MISSING));
MainApp.getDbHelper().createOrUpdate(profileSwitch);
NSUpload.uploadProfileSwitch(profileSwitch);
}
+
}
diff --git a/app/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.java b/app/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.java
index 92520d1139..54f06bfaf0 100644
--- a/app/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.java
+++ b/app/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.java
@@ -74,8 +74,7 @@ public class FabricPrivacy {
}
public static boolean fabricEnabled() {
- //return SP.getBoolean("enable_fabric", true);
- return true;
+ return SP.getBoolean("enable_fabric", true);
}
// Analytics logCustom
diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml
index ffee78aa93..0c3b51a97c 100644
--- a/app/src/main/res/values-bg/strings.xml
+++ b/app/src/main/res/values-bg/strings.xml
@@ -1,4 +1,5 @@
-
+
+
Настройки на сигурността
Максимален инсулин при болус [единици]
@@ -342,11 +343,11 @@
За да стартирате базал от %1$.2fЕ/ч за %2$d мин отговорете с код %3$s
За да превключите профила към %1$s %2$d%% отговорете с код %3$s
За да започнете удължен болус %1$.2fЕ за %2$d мин отговорете с код %3$s
- За да стартирате базал от %1$d%%Е/ч за %2$d мин отговорете с код %3$s
+ За да стартирате базал от %1$d%Е/ч за %2$d мин отговорете с код %3$s
За да спрете APS за %1$d минути отговорете с код %2$s
Временен базал от %1$.2fЕ/ч за %2$d мин стартиран успешно
Удължен болус %1$.2fU за %2$d мин стартиран успешно
- Временен базал от %1$d%%Е/ч за %2$d мин стартиран успешно
+ Временен базал от %1$d%Е/ч за %2$d мин стартиран успешно
Неуспешно стартиране на временен базал
Неуспешно стартиране на удължен болус
За да спрете времен базал отговорете с код %1$s
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index da0a53ba6e..9872c77080 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -1,4 +1,5 @@
-
+
+
Ασφάλεια Θεραπειών
Μέγιστο Επιτρεπτό bolus[U]
@@ -340,7 +341,7 @@
Δεν επιτρέπεται απομακρυσμένη εντολή
Απομακρυσμένο bolus μη διαθέσιμο. Δοκιμάστε ξανά αργότερα.
Για έναρξη βασικού %1$.2fU/h για %2$d λεπτά στείλτε κωδικό %3$s
- Για αλλαγή προφίλ σε %1$s %2$d%% στείλτε κωδικό %3$s
+ Για αλλαγή προφίλ σε %1$s %2$d% στείλτε κωδικό %3$s
Για έναρξη εκτεταμένου bolus %1$.2fU για %2$d λεπτά στείλτε κωδικό %3$s
Για έναρξη βασικού %1$d%% για %2$d λεπτά στείλτε κωδικό %3$s
Για αναστολή κυκλκώματος για %1$d λεπτών στείλτε με κωδικό %2$s
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 820d5109f3..8dd502b75c 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -1,4 +1,5 @@
-
+
+
Sécurités des traitements
Maximum Bolus autorisé [U]
@@ -343,7 +344,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Pour démarrer Basal %1$.2fU/h pendant %2$d min, renvoyer le code %3$s
Pour changer le profil vers %1$s %2$d%%, renvoyer le code %3$s
Pour démarrer le Bolus étendu %1$.2fU pendant %2$d min, renvoyer le code %3$s
- Pour démarrer le Basal %1$d%% pendant %2$d min, renvoyer le code %3$s
+ Pour démarrer le Basal %1$d% pendant %2$d min, renvoyer le code %3$s
Envoyer le code %2$s pour suspendre la Boucle pour %1$d minutes
Démarrage réussi pour %1$.2fU/h de basal temporaire pour %2$d min
Le Bolus étendu %1$.2fU pendant %2$d min a commencé avec succès
diff --git a/app/src/main/res/values-ga/strings.xml b/app/src/main/res/values-ga/strings.xml
index fce0cc17b0..70489fbc5e 100644
--- a/app/src/main/res/values-ga/strings.xml
+++ b/app/src/main/res/values-ga/strings.xml
@@ -1,323 +1,3 @@
-
- OAPS
- MM640g
- mmol/l
- mg/dl
- Tá
- Níl
- Anois
- Gaeilge
- Bia
- Dana
- DanaRS
- OAPS
- Ard
- Íseal
- # Lá
- xDrip
- aláraim
- Ceallraí
- Bluetooth
- Cnaipe 1
- Cnaipe 2
- Cnaipe 3
- Cuir ar ceal
- Cuir ar ceal
- Nasctha
- Ag nascadh
- DANA
- DanaR
- lá
- Dáta
- Gléas
- Dínasctha
- Dínasctha
- In eagar
- Bearla (English)
- earráid
- Scoir
- BAILE
- Íseal
- Balbh
- NSClient
- NSClient
- NSClient
- OK
- OK
- OK
- OpenAPS
- OpenAPS AMA
- OpenAPS MA
- Eile
- Eile
- Athnuachan
- Atosaigh
- SAGE
- Sábháil
- Tosaigh
- Stad
- URL:
- Suas
- Toradh
- Gréigis
- Ginearálta
- glúcóis
- Glúcóis
- Glúcóis
- g
- Fiasp
- Saill
- Cleachtadh
- Folamh
- Fad:
- Fad
- Fad
- Fad [nóim.]
- DanaRv2
- Dáta
- Próifíl
- Próifíl
- Próifíl
- Próifíl
- PBAGE
- Caidéil
- Caidéil
- CAIDÉIL
- Ráta
- Cóimheas
- Cóimheas:
- Cúis
- Taiscumar
- Atosú
- Reáchtáil anois
- Ag reáchtáil
- Braiteoir
- Braiteoir
- Braiteoir aois
- Rathúlacht
- Aonaid
- Aonaid:
- A
- Fionraí lúb do 10 u
- Fionraí lúb do 1 u
- Fionraí lúb do 2 u
- Fionraí lúb do 3 u
- Fionraí
- Ceist
- Teanga
- Inslin
- Ins:
- INS
- Inslin
- Inslin
- Inslin:
- Inslin aois
- IAGE
- Gléas ainm
- Páiste
- Áireamhán
- CAGE
- Bluetooth stádas
- APS
- APS
- AndroidAPS thosaigh
- %dnóim ó shin
- %d nóim ó shin
- %.1fu ó shin
- %.2f A/u
- %1$d%% (%2$d nóim fágtha)
- Gníomhartha
- GNÍ
- Cuir
- Duine fásta
- Calabrú
- Calabrú
- carbaihiodráit
- Carbaihiodráití
- Lúb dúnta
- Cear
- Cear
- Seachadta
- Seachadadh %.2fA
- Seachadadh anois
- Dhícheangal Caidéil do 10 u
- Dhícheangal Caidéil do 1 u
- Dhícheangal Caidéil do 2 u
- Dhícheangal Caidéil do 3 u
- Dhícheangal Caidéil do 30 nóim
- Dícheangal
- Ollainnis
- Free-Peak Oref
- " http://www.androidaps.org http://www.androidaps.de (de) facebook: http://facebook.androidaps.org http://facebook.androidaps.de (de)"
- Iodáilis
- Cóiréis
- Lúb
- Lúb
- LÚB
- Taiscumar folamh
- Glúcóis stádas
- Gearmáinis
- Glimp
- Stair
- Lúb cumasaithe
- ns_create_announcements_from_errors
- NSCI
- NS API secret
- NS API secret
- Lúb oscailte
- Faoin gcéad
- Faoin gcéad
- Rapid-Acting Oref
- athlán
- Athlán
- Athlódáil
- Athlódáil próifíl
- Rómáinis
- Rúisis
- Sensitivity Oref0
- Spainnis
- Sualainnis
- Déagóirí
- Cóireálacha
- Cóireálacha
- Infheicthe
- Bailí:
- Fhíorú
- Ar fionraí (%d n)
- Ar fionraí ag úsáideoir
- Tosaigh ag lúb oscailte
- Stádas:
- Stáit
- Stopadh
- Sraithuimhir
- Athnuaigh
- Athnuaigh caidéil stáit
- Riamh
- Tosaithe
- Gnáth
- Meán: %3.1f A
- Uasmhéid: %3.1f A
- Íosmhéid: %3.1f A
- Ar fionraí ag earráid
- Tosaithe ...
- Léigh próifíl bunaidh
- Léigh stair caidéil
- Cumasaithe
- Socrú BRS (%1$d%% / %2$d nóim)
- Tosaithe
- Cealú BRS
- Is ceallraí Caidéil íseal
- Is leibhéal cartús íseal
- Ag bólas (%.1f A)
- Carbí
- Carbí
- Carbí
- Carbí
- Carbí:
- Carbí:
- CARBÍ & BÓLAS
- Ag nascadh le %d s
- CPP
- Tuairim
- DanaR Bluetooth gléas
- Seice
- DanaR Cóiréis
- DanaR staiti
- Lúb atógáil
- Is lúb cumasaithe
- Is lúb cumasaithe
- Is lúb díchumasaithe
- Is lúb díchumasaithe
- Lúb ar fionraí
- Lúb ar fionraí
- Lúb díchumasaithe
- LÚB DÍCHUMASAITHE LE SRIANTA
- Ceallraí Íseal
- Nightscout URL
- Nightscout
- Novorapid, Novolog, Humalog
- Nóta
- Nótaí
- Fast Acting Insulin Prolonged
- DexcomG5 App (patched)
- Díchumasaigh lúb
- Cumasaigh lúb
- Geata:
- Glúcóis cineál
- Athrú Cartús Inslin
- Próifíl neamhbhailí !!!
- Próifíl neamhbhailí: %s
- Bólas deiridh
- Reáchtáil deiridh
- Achtaíodh deiridh
- Nasc deiridh
- GF deiridh:
- Méar
- Fast Acting Insulin
- Earráidí
- Inslin lá
- Aonaid lá
- Deilte
- Deilte:
- Socruithe Deilte
- AndroidAPS
- Bólas
- Bólas stopadh
- Ag stopadh bólas
- Ag dul a sheachadadh %.2fA
- Socrú próifíl bunaidh
- Ag féachaint d\'athruithe stair
- Níl nasc le haghaidh %d nóim
- Is nuashonrú gá clog Caidéil
- Cláir Caidéil bólas
- Foláirimh
- Gníomhaíocht
- Gníom.:
- Gníomhaíocht
- Gníomhaíocht fad
- Gníomhaíocht sprioc
- Rabhadh
- Stair le Caidéil
- GLÉ
- Feidhmiú
- Firmware
- MDI
- Faoi
- Iomlán
- Iomlán
- Próifíl gníomhach
- Aláraim
- APS mód
- APS roghnaithe
- Bunaidh
- Bunaidh
- Bunaidh
- Bunaidh:
- BUN
- BUN
- xds
- Bólas:
- Bólas
- Bólas
- Bólas E
- Ag dul a sheachadadh %.2fA
- Bólas DS
- Bólas DE
- Bólas S
- SMS
- Cúltaca
- Bunaidh ráta
- Bunaidh Céim
- Bunaidh cineál
- Bunaidh luach [%]
- Bunaidh luach [A/u]
- Bunaidh ráta bonn
- Próifíl bonn
- Seachadta %.2fA Bólas go rathúil
- Seachadta %.2fA Bólas go rathúil
- Bólas Céim
- Bólasi
- Cealú BRS
- Cealú BRS teip
-
\ No newline at end of file
+
+
diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml
index f07634291b..f95cd7627f 100644
--- a/app/src/main/res/values-lt/strings.xml
+++ b/app/src/main/res/values-lt/strings.xml
@@ -1,4 +1,5 @@
-
+
+
Terapijos saugumas
Maksimalus leistinas bolusas [U]
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 1edaa5d701..a70ff9fc9b 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -60,10 +60,6 @@
#de7550
#25912e
- #47c8ff
- #FFDD7792
- #ff0400
-
#FF8C00
#ff0400
#ff5e55
@@ -83,9 +79,5 @@
#303030
#FFFFFF
- #FFFFFF
- #000000
- #BBBBBB
-
#424242
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 1420794b54..94fa3e8ca1 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -48,6 +48,4 @@
-
-
diff --git a/app/src/test/res/logger/AndroidAPS.2018-01-01_01-01-00.1.zip b/app/src/test/res/logger/AndroidAPS.2018-01-01_01-01-00.1.zip
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/app/src/test/res/logger/AndroidAPS.2018-01-02_01-01-00.1.zip b/app/src/test/res/logger/AndroidAPS.2018-01-02_01-01-00.1.zip
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/app/src/test/res/logger/AndroidAPS.2018-01-03_01-01-00.1.zip b/app/src/test/res/logger/AndroidAPS.2018-01-03_01-01-00.1.zip
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/app/src/test/res/logger/AndroidAPS.log b/app/src/test/res/logger/AndroidAPS.log
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/build.gradle b/build.gradle
index 398f280881..5d8db15fe6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,7 +10,7 @@ buildscript {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.4.1'
+ classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.29.0'
diff --git a/docs/MedtronicRoadmap.md b/docs/MedtronicRoadmap.md
deleted file mode 100644
index 19a38cfb5d..0000000000
--- a/docs/MedtronicRoadmap.md
+++ /dev/null
@@ -1,76 +0,0 @@
-#Medtronic AAPS Roadmap
-------------------------
-
-## Phase 1: Create AAPS integration point
-| Functionality | Done % |
-| ----------------------------------------- |:------:|
-| Plugin | 100 |
-| Base configuration (no RileyLink Discovery) | 100 |
-| Basic pump configuration | 100 |
-| Display Fragment | 90 |
-| Pump Configuration | 70 |
-
-
-
-
-## Phase 2: Implement commands within Roadtrip2 application
-1. Base Bolus/Status commands
-
-| Functionality | Done % |
-| ----------------------------------------- |:------:|
-| Set Bolus | 0 |
-| Cancel Bolus | 0 |
-| Get Status | 0 |
-
-2. TBR
-
-| Functionality | Done % |
-| --- |:------:|
-| Set TBR (Absolute) | 0 |
-| Cancel TBR | 0 |
-
-
-3. Basal Profile
-
-| Functionality | Done % |
-| ----------------------------------------- |:------:|
-| Get Profile | 0 |
-| Set Profile | 0 |
-
-4. History
-
-| Functionality | Done % |
-| ----------------------------------------- |:------:|
-| Get History | 0 |
-| Decde History | 0 |
-
-5. Extended Bolus
-
-| Functionality | Done % |
-| ----------------------------------------- |:------:|
-| Set Extended Bolus | 0 |
-| Cancel Extended Bolus | 0 |
-
-
-6. Other commands
-
-| Functionality | Done % |
-| ----------------------------------------- |:------:|
-| Load TDD | 0 |
-
-
-
-##Phase 3: Refactor RT2 code to split RileyLink and Medtronic parts
-| Functionality | Done % |
-| ----------------------------------------- |:------:|
-| Refactor: Split RL and Medtronic code | 0 |
-| Add RL code to AAPS | 0 |
-| Start adding commands to AAPS | 0 |
-| CMD: Base Bolus/Status commands | 0 |
-| CMD: TBR | 0 |
-| CMD: Basal Profile | 0 |
-| CMD: History | 0 |
-| CMD: Extended Bolus | 0 |
-
-
-
diff --git a/docs/MedtronicToDo.txt b/docs/MedtronicToDo.txt
deleted file mode 100644
index 5f2e0b1a7c..0000000000
--- a/docs/MedtronicToDo.txt
+++ /dev/null
@@ -1,194 +0,0 @@
-RileyLinkAAPS
-=============
-
-
-Medtronic
-+ set basal profile (try to get to work - see new Loop code)
-- read history
-
-
-Bugs:
-
-
-History: - parse pump history
-
-
-Device search/scan refactor
-
-
-CGMS [not in plan for now]:
- - read history
-
-
-
-AAPS-Medtronic
-==============
-
-- ? history: TDD query
- history retrive doesn't show whats happening
- datetime parsimg problem
- Invalid entry:
- Entry: EndResultTotals = [0x07 0x00 0x00 0x05 0xFA 0xBF 0x12] PumpHistoryRecord [type=EndResultTotals [7 , 0x07], DT: x , length=5,2,0(7), head=00 00 05 FA , datetime=BF 12 , rawData=07 00 00 05 FA BF 12 ]
-
-
-
-- history: - integrate
- - basal change code
- - settings change code
-
-- foolproofing: - bolus
- - TBR
- * connection (!!)
-
-- bolus: - progress
- - cancel handling
-
-- What needs to be fixed: + button when clicked Refresh
- x basal profile by 1/2 hour (not supported by AAPS)
-
-* disconnect
-
-- MedtronicUIResponseType integration
-
-- add fabric code for following errors
-
-- tuneup not working correctly
-
-
-- BT Scan:
- + display mac on calling Preference
- + fix location problem
- - fix start/stop of scan:
- - remove toast button:
- - Remove Refresh
- - Add Scan Button
- - Scan button is Stop button when search is running
- - after change old error visible
-
-* Refresh button toggling
-
-
-Pages (RL Info):
-- Base: - display firmware version
- - display current data (it doesn't work ATM)
-- RL history
-- Device page: - Add Commands:
- - get model
- - tune (with report)
- - get time
- - get remaining insulin
- - Add Statistics:
- - Bolus,
- - TBR
- - Bolus SMB
-
-- Pump Tab: - fix 3 buttons
-
-==========================================================================================================
-
-DONE - AAPS-Medtronic
-=====================
-
-+ status time
-+ status all scheduling
-+ status config
-+ status power
-
-+ Statistics in App:
- + Bolus,
- + TBR
- + Bolus SMB
-
-+ status error display: + time
- + basal profile enabled
- + basal profile incorrect
- + tbr type set
- + max bolus
- + max basal
- + wrong pump selected
-
-+ Basal refactoring: - basal is read when history says there was a change
-+ merge: bugs (3)
-+ Code to determine number of users:
-
-
-DONE - RileyLinkAAPS
-=====================
-
-RileyLink
-+ BT Disconnect and reconnect (change in RileyLinkBLE ??)
-+ RL version
-
-
-Medtronic
-x extended bolus
-
-
-Firmware Support:
- + version 2 support: + V1 works
- + V2 works
-
-Bugs:
- + Bolus 554
- + TBR (554) ?
- + Remaining Insulin [554]
- + Get Basal profile returns just part of profile
- + Set TBR problem (after Bolus fixes)
-
-
-
-
-
-
-
-========================================================================================================
-
- None(0, "None", 1, 0, 0), // Bolus(0x01, "Bolus", 4, 5, 4), // 4,5,0 -> 4,5,4 Bolus(0x01, "Bolus", 2, 5, 4),
-
- // Thear
- Bolus(0x01, "Bolus", 4, DateFormat.LongDate, 0), // 523+[H=8]
-
- TempBasalRate(0x33, "TempBasal", 2, 5, 1), //
- TempBasalDuration(0x16, "TempBasalDuration"), //
-
- // Status changes
- Prime(0x03, "Prime", 5, 5, 0), //
- PumpSuspend(0x1e, "PumpSuspend"), //
- PumpResume(0x1f, "PumpResume"), //
- Rewind(0x21, "Rewind"), //
-
- // time change
- ChangeTime(0x17, "ChangeTime"), //
- NewTimeSet(0x18, "NewTimeSet"), //
-
-
- // settings
- ClearSettings(0x22, "ClearSettings"), // 8?
- SaveSettings(0x5d), //
-
- SelectBasalProfile(0x14, "SelectBasalProfile"), //
- ChangeMaxBolus(0x24), // 8?
- ChangeMaxBasal(0x2c), //
- ChangeTempBasalType((byte)0x62), // ChangeTempBasalTypePumpEvent
-
- // basal profile
- //ChangeBasalProfile_OldProfile(0x08, 2, 5, 145), // // V1: 2,5,42 V2:2,5,145; V4: V5
- ChangeBasalProfile_NewProfile(0x09, 2, 5, 145), //
-
-
- // Daily Totals
- DailyTotals512(0x6c, "Daily Totals 512", 0, 0, 36), //
- DailyTotals522(0x6d, "Daily Totals 522", 1, 2, 41), // // hack1(0x6d, "hack1", 46, 5, 0),
- DailyTotals523(0x6e, "Daily Totals 523", 1, 2, 49), // 1102014-03-17T00:00:00
-
-
-
-
- ChangeVariableBolus(0x5e), //
-
- EndResultTotals(0x07, "ResultTotals", 5, 2, 0), // V1: 5/5/41 V2: 5,2,3 V3, 5,2,0 V5: 7/10(523)
-
- BasalProfileStart(0x7b, 2, 5, 3), // // 722
-
-
-
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 5096a7e356..219a2e077c 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,4 +1,4 @@
-#Wed May 15 21:44:10 IST 2019
+#Mon Apr 02 11:30:12 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
diff --git a/wear/src/main/AndroidManifest.xml b/wear/src/main/AndroidManifest.xml
index d371bb5be8..874a9c8763 100644
--- a/wear/src/main/AndroidManifest.xml
+++ b/wear/src/main/AndroidManifest.xml
@@ -6,7 +6,7 @@
-
+
-
\ No newline at end of file
+
diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WearUtil.java b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WearUtil.java
index 8345bae92f..ca63749888 100644
--- a/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WearUtil.java
+++ b/wear/src/main/java/info/nightscout/androidaps/interaction/utils/WearUtil.java
@@ -1,5 +1,6 @@
package info.nightscout.androidaps.interaction.utils;
+import java.time.LocalDateTime;
import java.util.Date;
/**
@@ -8,9 +9,11 @@ import java.util.Date;
public class WearUtil {
+
public static String dateTimeText(long timeInMs) {
Date d = new Date(timeInMs);
return "" + d.getDay() + "." + d.getMonth() + "." + d.getYear() + " " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
}
+
}