Updated files that had only formating changes and removed lcoal files.

This commit is contained in:
Andy Rozman 2019-07-13 12:26:42 +01:00
parent 39c3f5ddfe
commit 0b1ef81d40
28 changed files with 78 additions and 895 deletions

View file

@ -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 whos 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)

View file

@ -7,7 +7,7 @@
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover. Make sure the path matches the one in the file element or else
the rollover logs are placed in the working directory. -->
<fileNamePattern>${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}_%d{HH-mm}_.%i.zip
<fileNamePattern>${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}_%d{HH-mm-ss, aux}_.%i.zip
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
@ -15,12 +15,10 @@
<maxFileSize>5MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!-- keep 30 days' worth of history -->
<maxHistory>240</maxHistory>
<maxHistory>120</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %.-1level/%logger: [%class{0}.%M\(\):%line]:
%msg%n
</pattern>
<pattern>%d{HH:mm:ss.SSS} [%thread] %.-1level/%logger: [%class{0}.%M\(\):%line]: %msg%n</pattern>
</encoder>
</appender>

View file

@ -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() {

View file

@ -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")
}

View file

@ -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;
}
}
}

View file

@ -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

View file

@ -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));

View file

@ -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)
}
}

View file

@ -296,152 +296,6 @@ public class TreatmentService extends OrmLiteBaseService<DatabaseHelper> {
}
// 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());

View file

@ -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<TempTarget> tempTargets = new OverlappingIntervals<>();
private final ProfileIntervals<ProfileSwitch> 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<Treatment> 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<ExtendedBolus> getExtendedBolusesFromHistory() {
synchronized (extendedBoluses) {
@ -528,7 +493,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
@Override
public Intervals<TemporaryBasal> 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<TempTarget> 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<ProfileSwitch> 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);
}
}

View file

@ -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

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="treatmentssafety_title">Настройки на сигурността</string>
<string name="treatmentssafety_maxbolus_title">Максимален инсулин при болус [единици]</string>
@ -342,11 +343,11 @@
<string name="smscommunicator_basalreplywithcode">За да стартирате базал от %1$.2fЕ/ч за %2$d мин отговорете с код %3$s</string>
<string name="smscommunicator_profilereplywithcode">За да превключите профила към %1$s %2$d%% отговорете с код %3$s</string>
<string name="smscommunicator_extendedreplywithcode">За да започнете удължен болус %1$.2fЕ за %2$d мин отговорете с код %3$s</string>
<string name="smscommunicator_basalpctreplywithcode">За да стартирате базал от %1$d%%Е/ч за %2$d мин отговорете с код %3$s</string>
<string name="smscommunicator_basalpctreplywithcode">За да стартирате базал от %1$d%Е/ч за %2$d мин отговорете с код %3$s</string>
<string name="smscommunicator_suspendreplywithcode">За да спрете APS за %1$d минути отговорете с код %2$s</string>
<string name="smscommunicator_tempbasalset">Временен базал от %1$.2fЕ/ч за %2$d мин стартиран успешно</string>
<string name="smscommunicator_extendedset">Удължен болус %1$.2fU за %2$d мин стартиран успешно</string>
<string name="smscommunicator_tempbasalset_percent">Временен базал от %1$d%%Е/ч за %2$d мин стартиран успешно</string>
<string name="smscommunicator_tempbasalset_percent">Временен базал от %1$d%Е/ч за %2$d мин стартиран успешно</string>
<string name="smscommunicator_tempbasalfailed">Неуспешно стартиране на временен базал</string>
<string name="smscommunicator_extendedfailed">Неуспешно стартиране на удължен болус</string>
<string name="smscommunicator_basalstopreplywithcode">За да спрете времен базал отговорете с код %1$s</string>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="treatmentssafety_title">Ασφάλεια Θεραπειών</string>
<string name="treatmentssafety_maxbolus_title">Μέγιστο Επιτρεπτό bolus[U]</string>
@ -340,7 +341,7 @@
<string name="smscommunicator_remotecommandnotallowed">Δεν επιτρέπεται απομακρυσμένη εντολή</string>
<string name="smscommunicator_remotebolusnotallowed">Απομακρυσμένο bolus μη διαθέσιμο. Δοκιμάστε ξανά αργότερα.</string>
<string name="smscommunicator_basalreplywithcode">Για έναρξη βασικού %1$.2fU/h για %2$d λεπτά στείλτε κωδικό %3$s</string>
<string name="smscommunicator_profilereplywithcode">Για αλλαγή προφίλ σε %1$s %2$d%% στείλτε κωδικό %3$s</string>
<string name="smscommunicator_profilereplywithcode">Για αλλαγή προφίλ σε %1$s %2$d% στείλτε κωδικό %3$s</string>
<string name="smscommunicator_extendedreplywithcode">Για έναρξη εκτεταμένου bolus %1$.2fU για %2$d λεπτά στείλτε κωδικό %3$s</string>
<string name="smscommunicator_basalpctreplywithcode">Για έναρξη βασικού %1$d%% για %2$d λεπτά στείλτε κωδικό %3$s</string>
<string name="smscommunicator_suspendreplywithcode">Για αναστολή κυκλκώματος για %1$d λεπτών στείλτε με κωδικό %2$s</string>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="treatmentssafety_title">Sécurités des traitements</string>
<string name="treatmentssafety_maxbolus_title">Maximum Bolus autorisé [U]</string>
@ -343,7 +344,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="smscommunicator_basalreplywithcode">Pour démarrer Basal %1$.2fU/h pendant %2$d min, renvoyer le code %3$s</string>
<string name="smscommunicator_profilereplywithcode">Pour changer le profil vers %1$s %2$d%%, renvoyer le code %3$s</string>
<string name="smscommunicator_extendedreplywithcode">Pour démarrer le Bolus étendu %1$.2fU pendant %2$d min, renvoyer le code %3$s</string>
<string name="smscommunicator_basalpctreplywithcode">Pour démarrer le Basal %1$d%% pendant %2$d min, renvoyer le code %3$s</string>
<string name="smscommunicator_basalpctreplywithcode">Pour démarrer le Basal %1$d% pendant %2$d min, renvoyer le code %3$s</string>
<string name="smscommunicator_suspendreplywithcode">Envoyer le code %2$s pour suspendre la Boucle pour %1$d minutes</string>
<string name="smscommunicator_tempbasalset">Démarrage réussi pour %1$.2fU/h de basal temporaire pour %2$d min</string>
<string name="smscommunicator_extendedset">Le Bolus étendu %1$.2fU pendant %2$d min a commencé avec succès</string>

View file

@ -1,323 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="openaps_short">OAPS</string>
<string name="MM640g">MM640g</string>
<string name="mmol">mmol/l</string>
<string name="mgdl">mg/dl</string>
<string name="yes"></string>
<string name="no">Níl</string>
<string name="combo_pump_connected_now">Anois</string>
<string name="ga_lang">Gaeilge</string>
<string name="food">Bia</string>
<string name="danarspump_shortname">Dana</string>
<string name="danarspump">DanaRS</string>
<string name="oaps_shortname">OAPS</string>
<string name="nsalarm_high">Ard</string>
<string name="nsalarm_low">Íseal</string>
<string name="danar_stats_amount_days"># Lá</string>
<string name="xdrip">xDrip</string>
<string name="danar_alarm">aláraim</string>
<string name="pump_battery_label">Ceallraí</string>
<string name="bluetooth">Bluetooth</string>
<string name="button1">Cnaipe 1</string>
<string name="button2">Cnaipe 2</string>
<string name="button3">Cnaipe 3</string>
<string name="cancel">Cuir ar ceal</string>
<string name="mdtp_cancel">Cuir ar ceal</string>
<string name="connected">Nasctha</string>
<string name="connecting">Ag nascadh</string>
<string name="danarpump_shortname">DANA</string>
<string name="danarpump">DanaR</string>
<string name="days"></string>
<string name="date">Dáta</string>
<string name="device">Gléas</string>
<string name="disconnected">Dínasctha</string>
<string name="combo_pump_state_disconnected">Dínasctha</string>
<string name="overview_quickwizard_item_edit_button">In eagar</string>
<string name="en_lang">Bearla (English)</string>
<string name="danar_error">earráid</string>
<string name="nav_exit">Scoir</string>
<string name="overview_shortname">BAILE</string>
<string name="combo_reservoir_low">Íseal</string>
<string name="mute">Balbh</string>
<string name="nsclient">NSClient</string>
<string name="nsclientinternal">NSClient</string>
<string name="nsclientinternal_title">NSClient</string>
<string name="virtualpump_resultok">OK</string>
<string name="ok">OK</string>
<string name="mdtp_ok">OK</string>
<string name="openaps">OpenAPS</string>
<string name="openapsama">OpenAPS AMA</string>
<string name="openapsma">OpenAPS MA</string>
<string name="careportal_newnstreatment_other">Eile</string>
<string name="othersettings_title">Eile</string>
<string name="combo_refresh">Athnuachan</string>
<string name="restart">Atosaigh</string>
<string name="careportal_sensorage_label_short">SAGE</string>
<string name="save">Sábháil</string>
<string name="objectives_button_start">Tosaigh</string>
<string name="overview_bolusprogress_stop">Stad</string>
<string name="nsclientinternal_url">URL:</string>
<string name="up">Suas</string>
<string name="result">Toradh</string>
<string name="el_lang">Gréigis</string>
<string name="configbuilder_general">Ginearálta</string>
<string name="danar_glucose">glúcóis</string>
<string name="glucose">Glúcóis</string>
<string name="danar_history_glucose">Glúcóis</string>
<string name="shortgramm">g</string>
<string name="ultrafastactinginsulincomment">Fiasp</string>
<string name="shortfat">Saill</string>
<string name="careportal_exercise">Cleachtadh</string>
<string name="combo_reservoir_empty">Folamh</string>
<string name="tempbasals_realduration_label_string">Fad:</string>
<string name="duration">Fad</string>
<string name="careportal_newnstreatment_duration_label">Fad</string>
<string name="careportal_newnstreatment_duration_min_label">Fad [nóim.]</string>
<string name="danarv2pump">DanaRv2</string>
<string name="danar_stats_date">Dáta</string>
<string name="openapsma_profile_label">Próifíl</string>
<string name="configbuilder_profile">Próifíl</string>
<string name="careportal_newnstreatment_profile_label">Próifíl</string>
<string name="profile">Próifíl</string>
<string name="careportal_pbage_label_short">PBAGE</string>
<string name="configbuilder_pump">Caidéil</string>
<string name="pump">Caidéil</string>
<string name="careportal_pump_label">CAIDÉIL</string>
<string name="rate">Ráta</string>
<string name="danar_stats_ratio">Cóimheas</string>
<string name="tempbasals_netratio_label_string">Cóimheas:</string>
<string name="reason">Cúis</string>
<string name="pump_reservoir_label">Taiscumar</string>
<string name="resume">Atosú</string>
<string name="openapsma_run">Reáchtáil anois</string>
<string name="combo_pump_state_running">Ag reáchtáil</string>
<string name="careportal_newnstreatment_sensor">Braiteoir</string>
<string name="glucosetype_sensor">Braiteoir</string>
<string name="careportal_sensorage_label">Braiteoir aois</string>
<string name="success">Rathúlacht</string>
<string name="nsprofileview_units_label">Aonaid</string>
<string name="units">Aonaid:</string>
<string name="treatments_wizard_unit_label">A</string>
<string name="suspendloopfor10h">Fionraí lúb do 10 u</string>
<string name="suspendloopfor1h">Fionraí lúb do 1 u</string>
<string name="suspendloopfor2h">Fionraí lúb do 2 u</string>
<string name="suspendloopfor3h">Fionraí lúb do 3 u</string>
<string name="danar_history_syspend">Fionraí</string>
<string name="careportal_question">Ceist</string>
<string name="language">Teanga</string>
<string name="treatments_newtreatment_insulinamount_label">Inslin</string>
<string name="tempbasals_netinsulin_label_string">Ins:</string>
<string name="insulin_shortname">INS</string>
<string name="careportal_newnstreatment_insulin_label">Inslin</string>
<string name="configbuilder_insulin">Inslin</string>
<string name="treatments_insulin_label_string">Inslin:</string>
<string name="careportal_insulinage_label">Inslin aois</string>
<string name="careportal_insulinage_label_short">IAGE</string>
<string name="nsclientinternal_devicename_title">Gléas ainm</string>
<string name="child">Páiste</string>
<string name="overview_calculator_label">Áireamhán</string>
<string name="careportal_canulaage_label_short">CAGE</string>
<string name="danar_bluetooth_status">Bluetooth stádas</string>
<string name="configbuilder_aps">APS</string>
<string name="loop_aps_label">APS</string>
<string name="androidaps_start">AndroidAPS thosaigh</string>
<string name="sms_minago">%dnóim ó shin</string>
<string name="minago">%d nóim ó shin</string>
<string name="hoursago">%.1fu ó shin</string>
<string name="pump_basebasalrate">%.2f A/u</string>
<string name="combo_tbr_remaining">%1$d%% (%2$d nóim fágtha)</string>
<string name="actions">Gníomhartha</string>
<string name="actions_shortname">GNÍ</string>
<string name="overview_editquickwizardlistactivity_add">Cuir</string>
<string name="adult">Duine fásta</string>
<string name="overview_calibration">Calabrú</string>
<string name="overview_calibration_bg_label">Calabrú</string>
<string name="danar_carbohydrate">carbaihiodráit</string>
<string name="danar_history_carbohydrates">Carbaihiodráití</string>
<string name="closedloop">Lúb dúnta</string>
<string name="treatments_wizard_correction_label">Cear</string>
<string name="correctionbous">Cear</string>
<string name="overview_bolusprogress_delivered">Seachadta</string>
<string name="bolusdelivering">Seachadadh %.2fA</string>
<string name="deliver_now">Seachadadh anois</string>
<string name="disconnectpumpfor10h">Dhícheangal Caidéil do 10 u</string>
<string name="disconnectpumpfor1h">Dhícheangal Caidéil do 1 u</string>
<string name="disconnectpumpfor2h">Dhícheangal Caidéil do 2 u</string>
<string name="disconnectpumpfor3h">Dhícheangal Caidéil do 3 u</string>
<string name="disconnectpumpfor30m">Dhícheangal Caidéil do 30 nóim</string>
<string name="disconnecting">Dícheangal</string>
<string name="nl_lang">Ollainnis</string>
<string name="free_peak_oref">Free-Peak Oref</string>
<string name="about_link_urls">" http://www.androidaps.org http://www.androidaps.de (de) facebook: http://facebook.androidaps.org http://facebook.androidaps.de (de)"</string>
<string name="it_lang">Iodáilis</string>
<string name="ko_lang">Cóiréis</string>
<string name="loop">Lúb</string>
<string name="configbuilder_loop">Lúb</string>
<string name="loop_shortname">LÚB</string>
<string name="emptyreservoir">Taiscumar folamh</string>
<string name="openapsma_glucosestatus_label">Glúcóis stádas</string>
<string name="de_lang">Gearmáinis</string>
<string name="Glimp">Glimp</string>
<string name="combo_history">Stair</string>
<string name="loopenabled">Lúb cumasaithe</string>
<string name="key_ns_create_announcements_from_errors">ns_create_announcements_from_errors</string>
<string name="nsclientinternal_shortname">NSCI</string>
<string name="nsclientinternal_secret_dialogtitle">NS API secret</string>
<string name="nsclientinternal_secret_title">NS API secret</string>
<string name="openloop">Lúb oscailte</string>
<string name="careportal_newnstreatment_percent_label">Faoin gcéad</string>
<string name="percent">Faoin gcéad</string>
<string name="rapid_acting_oref">Rapid-Acting Oref</string>
<string name="danar_refill">athlán</string>
<string name="danar_history_refill">Athlán</string>
<string name="danar_historyreload">Athlódáil</string>
<string name="reloadprofile">Athlódáil próifíl</string>
<string name="ro_lang">Rómáinis</string>
<string name="ru_lang">Rúisis</string>
<string name="sensitivityoref0">Sensitivity Oref0</string>
<string name="es_lang">Spainnis</string>
<string name="sv_lang">Sualainnis</string>
<string name="teenage">Déagóirí</string>
<string name="treatments">Cóireálacha</string>
<string name="configbuilder_treatments">Cóireálacha</string>
<string name="visible">Infheicthe</string>
<string name="overview_editquickwizard_valid">Bailí:</string>
<string name="objectives_button_verify">Fhíorú</string>
<string name="loopsuspendedfor">Ar fionraí (%d n)</string>
<string name="combo_pump_state_suspended_by_user">Ar fionraí ag úsáideoir</string>
<string name="objectives_1_objective">Tosaigh ag lúb oscailte</string>
<string name="status">Stádas:</string>
<string name="combo_pump_state_label">Stáit</string>
<string name="overview_bolusprogress_stoped">Stopadh</string>
<string name="serialnumber">Sraithuimhir</string>
<string name="combo_pump_action_refreshing">Athnuaigh</string>
<string name="combo_activity_checking_pump_state">Athnuaigh caidéil stáit</string>
<string name="combo_pump_never_connected">Riamh</string>
<string name="combo_pump_state_initializing">Tosaithe</string>
<string name="combo_reservoir_normal">Gnáth</string>
<string name="combo_tdd_average">Meán: %3.1f A</string>
<string name="combo_tdd_maximum">Uasmhéid: %3.1f A</string>
<string name="combo_tdd_minimum">Íosmhéid: %3.1f A</string>
<string name="combo_pump_state_suspended_due_to_error">Ar fionraí ag earráid</string>
<string name="initializing">Tosaithe ...</string>
<string name="combo_actvity_reading_basal_profile">Léigh próifíl bunaidh</string>
<string name="combo_activity_reading_pump_history">Léigh stair caidéil</string>
<string name="enabled">Cumasaithe</string>
<string name="combo_pump_action_setting_tbr">Socrú BRS (%1$d%% / %2$d nóim)</string>
<string name="combo_pump_action_initializing">Tosaithe</string>
<string name="combo_pump_action_cancelling_tbr">Cealú BRS</string>
<string name="combo_pump_battery_low_warrning">Is ceallraí Caidéil íseal</string>
<string name="combo_pump_cartridge_low_warrning">Is leibhéal cartús íseal</string>
<string name="combo_pump_action_bolusing">Ag bólas (%.1f A)</string>
<string name="carbs">Carbí</string>
<string name="careportal_newnstreatment_carbs_label">Carbí</string>
<string name="treatments_newtreatment_carbsamount_label">Carbí</string>
<string name="treatments_wizard_carbs_label">Carbí</string>
<string name="overview_editquickwizard_carbs">Carbí:</string>
<string name="treatments_carbs_label_string">Carbí:</string>
<string name="careportal_carbsandbolus_label">CARBÍ &amp; BÓLAS</string>
<string name="danar_history_connectingfor">Ag nascadh le %d s</string>
<string name="circadian_percentage_profile_shortname">CPP</string>
<string name="comment">Tuairim</string>
<string name="danar_bt_name_title">DanaR Bluetooth gléas</string>
<string name="cs_lang">Seice</string>
<string name="danarkoreanpump">DanaR Cóiréis</string>
<string name="danar_stats">DanaR staiti</string>
<string name="smscommunicator_loopresumed">Lúb atógáil</string>
<string name="smscommunicator_loophasbeenenabled">Is lúb cumasaithe</string>
<string name="smscommunicator_loopisenabled">Is lúb cumasaithe</string>
<string name="smscommunicator_loopisdisabled">Is lúb díchumasaithe</string>
<string name="smscommunicator_loophasbeendisabled">Is lúb díchumasaithe</string>
<string name="loopsuspended">Lúb ar fionraí</string>
<string name="smscommunicator_loopsuspended">Lúb ar fionraí</string>
<string name="disabledloop">Lúb díchumasaithe</string>
<string name="loopdisabled">LÚB DÍCHUMASAITHE LE SRIANTA</string>
<string name="lowbattery">Ceallraí Íseal</string>
<string name="nsclientinternal_url_title">Nightscout URL</string>
<string name="nightscout">Nightscout</string>
<string name="fastactinginsulincomment">Novorapid, Novolog, Humalog</string>
<string name="careportal_note">Nóta</string>
<string name="careportal_newnstreatment_notes_label">Nótaí</string>
<string name="fastactinginsulinprolonged">Fast Acting Insulin Prolonged</string>
<string name="DexcomG5">DexcomG5 App (patched)</string>
<string name="disableloop">Díchumasaigh lúb</string>
<string name="enableloop">Cumasaigh lúb</string>
<string name="objectives_gate_label_string">Geata:</string>
<string name="careportal_newnstreatment_glucosetype">Glúcóis cineál</string>
<string name="careportal_insulincartridgechange">Athrú Cartús Inslin</string>
<string name="invalidprofile">Próifíl neamhbhailí !!!</string>
<string name="zerovalueinprofile">Próifíl neamhbhailí: %s</string>
<string name="pump_lastbolus_label">Bólas deiridh</string>
<string name="openapsma_lastrun_label">Reáchtáil deiridh</string>
<string name="openapsma_lastenact_label">Achtaíodh deiridh</string>
<string name="pump_lastconnection_label">Nasc deiridh</string>
<string name="sms_lastbg">GF deiridh:</string>
<string name="glucosetype_finger">Méar</string>
<string name="fastactinginsulin">Fast Acting Insulin</string>
<string name="danar_history_errors">Earráidí</string>
<string name="danar_history_dailyinsulin">Inslin lá</string>
<string name="danar_dailyunits">Aonaid lá</string>
<string name="delta">Deilte</string>
<string name="sms_delta">Deilte:</string>
<string name="prefs_delta_title">Socruithe Deilte</string>
<string name="app_name">AndroidAPS</string>
<string name="bolus">Bólas</string>
<string name="bolusstopped">Bólas stopadh</string>
<string name="bolusstopping">Ag stopadh bólas</string>
<string name="bolusrequested">Ag dul a sheachadadh %.2fA</string>
<string name="combo_activity_setting_basal_profile">Socrú próifíl bunaidh</string>
<string name="combo_activity_checking_for_history_changes">Ag féachaint d\'athruithe stair</string>
<string name="combo_no_pump_connection">Níl nasc le haghaidh %d nóim</string>
<string name="combo_notification_check_time_date">Is nuashonrú gá clog Caidéil</string>
<string name="combo_programming_bolus">Cláir Caidéil bólas</string>
<string name="combo_pump_alerts">Foláirimh</string>
<string name="combo_pump_activity_label">Gníomhaíocht</string>
<string name="treatments_activity_string">Gníom.:</string>
<string name="activity">Gníomhaíocht</string>
<string name="activity_duration">Gníomhaíocht fad</string>
<string name="activity_target">Gníomhaíocht sprioc</string>
<string name="combo_warning">Rabhadh</string>
<string name="danar_history">Stair le Caidéil</string>
<string name="dev">GLÉ</string>
<string name="executing">Feidhmiú</string>
<string name="virtualpump_firmware_label">Firmware</string>
<string name="mdi">MDI</string>
<string name="nav_about">Faoi</string>
<string name="careportal_newnstreatment_absolute_label">Iomlán</string>
<string name="absolute">Iomlán</string>
<string name="nsprofileview_activeprofile_label">Próifíl gníomhach</string>
<string name="danar_history_alarm">Aláraim</string>
<string name="apsmode_title">APS mód</string>
<string name="apsselected">APS roghnaithe</string>
<string name="nsprofileview_basal_label">Bunaidh</string>
<string name="basal">Bunaidh</string>
<string name="danar_stats_basalrate">Bunaidh</string>
<string name="sms_basal">Bunaidh:</string>
<string name="basalshortlabel">BUN</string>
<string name="basal_short">BUN</string>
<string name="xdripstatus_shortname">xds</string>
<string name="sms_bolus">Bólas:</string>
<string name="danar_stats_bolus">Bólas</string>
<string name="overview_bolus_label">Bólas</string>
<string name="danar_ebolus">Bólas E</string>
<string name="overview_bolusprogress_goingtodeliver">Ag dul a sheachadadh %.2fA</string>
<string name="danar_dsbolus">Bólas DS</string>
<string name="danar_debolus">Bólas DE</string>
<string name="danar_sbolus">Bólas S</string>
<string name="smscommunicator_shortname">SMS</string>
<string name="nav_backup">Cúltaca</string>
<string name="basal_rate">Bunaidh ráta</string>
<string name="basal_step">Bunaidh Céim</string>
<string name="overview_newtempbasal_basaltype_label">Bunaidh cineál</string>
<string name="overview_newtempbasal_basalpercent">Bunaidh luach [%]</string>
<string name="overview_newtempbasal_basalabsolute">Bunaidh luach [A/u]</string>
<string name="pump_basebasalrate_label">Bunaidh ráta bonn</string>
<string name="base_profile_label">Próifíl bonn</string>
<string name="bolusdelivered">Seachadta %.2fA Bólas go rathúil</string>
<string name="smscommunicator_bolusdelivered">Seachadta %.2fA Bólas go rathúil</string>
<string name="bolus_step">Bólas Céim</string>
<string name="danar_history_bolus">Bólasi</string>
<string name="canceltemp">Cealú BRS</string>
<string name="smscommunicator_tempbasalcancelfailed">Cealú BRS teip</string>
</resources>
<!--Generated by crowdin.com-->
<resources></resources>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--Generated by crowdin.com-->
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="treatmentssafety_title">Terapijos saugumas</string>
<string name="treatmentssafety_maxbolus_title">Maksimalus leistinas bolusas [U]</string>

View file

@ -60,10 +60,6 @@
<color name="colorScheduled">#de7550</color>
<color name="colorActive">#25912e</color>
<color name="loopenabled">#47c8ff</color>
<color name="loopdisabled">#FFDD7792</color>
<color name="looppumpsuspended">#ff0400</color>
<color name="notificationAnnouncement">#FF8C00</color>
<color name="notificationUrgent">#ff0400</color>
<color name="notificationNormal">#ff5e55</color>
@ -83,9 +79,5 @@
<color name="ribbonTextWarning">#303030</color>
<color name="ribbonTextCritical">#FFFFFF</color>
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="gray">#BBBBBB</color>
<color name="ic_launcher_background">#424242</color>
</resources>

View file

@ -48,6 +48,4 @@
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<!-- Preferences -->
</resources>

View file

View file

@ -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'

View file

@ -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 |

View file

@ -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

View file

@ -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

View file

@ -6,7 +6,7 @@
<uses-permission android:name="com.google.android.permission.PROVIDE_BACKGROUND" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.VIBRATE"/>
<application
@ -281,4 +281,4 @@
android:label="TempTarget">
</activity>
</application>
</manifest>
</manifest>

View file

@ -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();
}
}