Merge pull request #2 from MilosKozak/dev

Dev
This commit is contained in:
Tim Street 2019-01-13 21:37:29 +00:00 committed by GitHub
commit db6d5527b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 20710 additions and 17609 deletions

View file

@ -1,10 +1,10 @@
Reporting bugs
--------------
- Note the precise time the problem occurred and describe the circumstances and steps that caused
- **Note the precise time the problem occurred** and describe the circumstances and steps that caused
the problem
- Note the Build version (found in the About dialog in the app, when pressing the three dots in the
upper-right corner).
- Obtain the app's log files, which can be found on the phone in
_/storage/emulated/0/Android/data/info.nightscout.androidaps/_
See https://github.com/MilosKozak/AndroidAPS/wiki/Accessing-logfiles
- Open an issue at https://github.com/MilosKozak/AndroidAPS/issues/new
- Open an issue at https://github.com/MilosKozak/AndroidAPS/issues/new

View file

@ -1,6 +1,6 @@
# AndroidAPS
* Check the wiki: https://github.com/MilosKozak/AndroidAPS/wiki
* 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
[![Gitter](https://badges.gitter.im/MilosKozak/AndroidAPS.svg)](https://gitter.im/MilosKozak/AndroidAPS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

View file

@ -63,7 +63,7 @@ android {
targetSdkVersion 25
multiDexEnabled true
versionCode 1500
version "2.0h-dev"
version "2.0"
buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'

View file

@ -12,6 +12,7 @@
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_MMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.SEND_MMS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
@ -34,6 +35,9 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View file

@ -9,33 +9,32 @@ var tempBasalFunctions = {};
tempBasalFunctions.getMaxSafeBasal = function getMaxSafeBasal(profile) {
var max_daily_safety_multiplier = (isNaN(profile.max_daily_safety_multiplier) || profile.max_daily_safety_multiplier == null) ? 3 : profile.max_daily_safety_multiplier;
var current_basal_safety_multiplier = (isNaN(profile.current_basal_safety_multiplier) || profile.current_basal_safety_multiplier == null) ? 4 : profile.current_basal_safety_multiplier;
return Math.min(profile.max_basal, max_daily_safety_multiplier * profile.max_daily_basal, current_basal_safety_multiplier * profile.current_basal);
var max_daily_safety_multiplier = (isNaN(profile.max_daily_safety_multiplier) || profile.max_daily_safety_multiplier == null) ? 3 : profile.max_daily_safety_multiplier;
var current_basal_safety_multiplier = (isNaN(profile.current_basal_safety_multiplier) || profile.current_basal_safety_multiplier == null) ? 4 : profile.current_basal_safety_multiplier;
return Math.min(profile.max_basal, max_daily_safety_multiplier * profile.max_daily_basal, current_basal_safety_multiplier * profile.current_basal);
};
tempBasalFunctions.setTempBasal = function setTempBasal(rate, duration, profile, rT, currenttemp) {
//var maxSafeBasal = Math.min(profile.max_basal, 3 * profile.max_daily_basal, 4 * profile.current_basal);
var maxSafeBasal = tempBasalFunctions.getMaxSafeBasal(profile);
var round_basal = require('./round-basal');
if (rate < 0) {
rate = 0;
} // if >30m @ 0 required, zero temp will be extended to 30m instead
else if (rate > maxSafeBasal) {
rate = maxSafeBasal;
var round_basal = require('./round-basal');
if (rate < 0) {
rate = 0;
} else if (rate > maxSafeBasal) {
rate = maxSafeBasal;
}
var suggestedRate = round_basal(rate, profile);
if (typeof(currenttemp) !== 'undefined' && typeof(currenttemp.duration) !== 'undefined' && typeof(currenttemp.rate) !== 'undefined' && currenttemp.duration > (duration-10) && currenttemp.duration <= 120 && suggestedRate <= currenttemp.rate * 1.2 && suggestedRate >= currenttemp.rate * 0.8) {
if (typeof(currenttemp) !== 'undefined' && typeof(currenttemp.duration) !== 'undefined' && typeof(currenttemp.rate) !== 'undefined' && currenttemp.duration > (duration-10) && currenttemp.duration <= 120 && suggestedRate <= currenttemp.rate * 1.2 && suggestedRate >= currenttemp.rate * 0.8 && duration > 0 ) {
rT.reason += " "+currenttemp.duration+"m left and " + currenttemp.rate + " ~ req " + suggestedRate + "U/hr: no temp required";
return rT;
}
if (suggestedRate === profile.current_basal) {
if (profile.skip_neutral_temps) {
if (profile.skip_neutral_temps === true) {
if (typeof(currenttemp) !== 'undefined' && typeof(currenttemp.duration) !== 'undefined' && currenttemp.duration > 0) {
reason(rT, 'Suggested rate is same as profile rate, a temp basal is active, canceling current temp');
rT.duration = 0;
@ -58,4 +57,4 @@ var round_basal = require('./round-basal');
}
};
module.exports = tempBasalFunctions;
module.exports = tempBasalFunctions;

View file

@ -182,7 +182,7 @@ public class MainActivity extends AppCompatActivity {
@Subscribe
public void onStatusEvent(final EventRefreshGui ev) {
String lang = SP.getString("language", "en");
String lang = SP.getString(R.string.key_language, "en");
LocaleHelper.setLocale(getApplicationContext(), lang);
runOnUiThread(() -> {
if (ev.recreate) {
@ -326,6 +326,7 @@ public class MainActivity extends AppCompatActivity {
case AndroidPermission.CASE_LOCATION:
case AndroidPermission.CASE_SMS:
case AndroidPermission.CASE_BATTERY:
case AndroidPermission.CASE_PHONESTATE:
break;
}
}

View file

@ -42,6 +42,10 @@ public class ConstraintChecker implements ConstraintsInterface {
return isSMBModeEnabled(new Constraint<>(true));
}
public Constraint<Boolean> isUAMEnabled() {
return isUAMEnabled(new Constraint<>(true));
}
public Constraint<Boolean> isAdvancedFilteringEnabled() {
return isAdvancedFilteringEnabled(new Constraint<>(true));
}
@ -130,6 +134,18 @@ public class ConstraintChecker implements ConstraintsInterface {
return value;
}
@Override
public Constraint<Boolean> isUAMEnabled(Constraint<Boolean> value) {
ArrayList<PluginBase> constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constraint = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
constraint.isUAMEnabled(value);
}
return value;
}
@Override
public Constraint<Boolean> isAdvancedFilteringEnabled(Constraint<Boolean> value) {
ArrayList<PluginBase> constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);

View file

@ -23,6 +23,7 @@ import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.DecimalFormatter;
import info.nightscout.utils.FabricPrivacy;
import info.nightscout.utils.MidnightTime;
public class Profile {
private static Logger log = LoggerFactory.getLogger(Profile.class);
@ -381,7 +382,7 @@ public class Profile {
}
public double getIsf() {
return getIsfTimeFromMidnight(secondsFromMidnight(System.currentTimeMillis()));
return getIsfTimeFromMidnight(secondsFromMidnight());
}
public double getIsf(long time) {
@ -397,11 +398,11 @@ public class Profile {
public String getIsfList() {
if (isf_v == null)
isf_v = convertToSparseArray(isf);
return getValuesList(isf_v, null, new DecimalFormat("0.0"), getUnits() + "/U");
return getValuesList(isf_v, null, new DecimalFormat("0.0"), getUnits() + MainApp.gs(R.string.profile_per_unit));
}
public double getIc() {
return getIcTimeFromMidnight(secondsFromMidnight(System.currentTimeMillis()));
return getIcTimeFromMidnight(secondsFromMidnight());
}
public double getIc(long time) {
@ -417,11 +418,11 @@ public class Profile {
public String getIcList() {
if (ic_v == null)
ic_v = convertToSparseArray(ic);
return getValuesList(ic_v, null, new DecimalFormat("0.0"), "g/U");
return getValuesList(ic_v, null, new DecimalFormat("0.0"), MainApp.gs(R.string.profile_carbs_per_unit));
}
public double getBasal() {
return getBasalTimeFromMidnight(secondsFromMidnight(System.currentTimeMillis()));
return getBasalTimeFromMidnight(secondsFromMidnight());
}
public double getBasal(long time) {
@ -438,7 +439,7 @@ public class Profile {
public String getBasalList() {
if (basal_v == null)
basal_v = convertToSparseArray(basal);
return getValuesList(basal_v, null, new DecimalFormat("0.00"), "U/h");
return getValuesList(basal_v, null, new DecimalFormat("0.00"), MainApp.gs(R.string.profile_ins_units_per_hout));
}
public class BasalValue {
@ -465,7 +466,7 @@ public class Profile {
}
public double getTarget() {
return getTarget(secondsFromMidnight(System.currentTimeMillis()));
return getTarget(secondsFromMidnight());
}
protected double getTarget(int timeAsSeconds) {
@ -473,7 +474,7 @@ public class Profile {
}
public double getTargetLow() {
return getTargetLowTimeFromMidnight(secondsFromMidnight(System.currentTimeMillis()));
return getTargetLowTimeFromMidnight(secondsFromMidnight());
}
public double getTargetLow(long time) {
@ -487,7 +488,7 @@ public class Profile {
}
public double getTargetHigh() {
return getTargetHighTimeFromMidnight(secondsFromMidnight(System.currentTimeMillis()));
return getTargetHighTimeFromMidnight(secondsFromMidnight());
}
public double getTargetHigh(long time) {
@ -518,24 +519,13 @@ public class Profile {
}
public static int secondsFromMidnight() {
Calendar c = Calendar.getInstance();
long now = c.getTimeInMillis();
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
long passed = now - c.getTimeInMillis();
long passed = DateUtil.now() - MidnightTime.calc();
return (int) (passed / 1000);
}
public static int secondsFromMidnight(long date) {
Calendar c = Calendar.getInstance();
c.setTimeInMillis(date);
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
long passed = date - c.getTimeInMillis();
long midnight = MidnightTime.calc(date);
long passed = date - midnight;
return (int) (passed / 1000);
}

View file

@ -220,14 +220,8 @@ public class BgReading implements DataPointWithLabelInterface {
@Override
public int getColor() {
String units = ProfileFunctions.getInstance().getProfileUnits();
Double lowLine = SP.getDouble("low_mark", 0d);
Double highLine = SP.getDouble("high_mark", 0d);
if (lowLine < 1) {
lowLine = Profile.fromMgdlToUnits(OverviewPlugin.bgTargetLow, units);
}
if (highLine < 1) {
highLine = Profile.fromMgdlToUnits(OverviewPlugin.bgTargetHigh, units);
}
Double lowLine = OverviewPlugin.getPlugin().determineLowLine(units);
Double highLine = OverviewPlugin.getPlugin().determineHighLine(units);
int color = MainApp.gc(R.color.inrange);
if (isPrediction())
return getPredectionColor();

View file

@ -156,6 +156,12 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
}
}
@Override
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
log.info("Do nothing for downgrading...");
log.debug("oldVersion: {}, newVersion: {}", oldVersion, newVersion);
}
public int getOldVersion() {
return oldVersion;
}
@ -397,7 +403,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
QueryBuilder<BgReading, Long> queryBuilder = daoBgReadings.queryBuilder();
queryBuilder.orderBy("date", false);
queryBuilder.limit(1L);
queryBuilder.where().gt("value", 38).and().eq("isValid", true);
queryBuilder.where().ge("value", 39).and().eq("isValid", true);
PreparedQuery<BgReading> preparedQuery = queryBuilder.prepare();
bgList = daoBgReadings.query(preparedQuery);
@ -435,7 +441,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
QueryBuilder<BgReading, Long> queryBuilder = daoBgreadings.queryBuilder();
queryBuilder.orderBy("date", ascending);
Where where = queryBuilder.where();
where.ge("date", mills).and().gt("value", 38).and().eq("isValid", true);
where.ge("date", mills).and().ge("value", 39).and().eq("isValid", true);
PreparedQuery<BgReading> preparedQuery = queryBuilder.prepare();
bgReadings = daoBgreadings.query(preparedQuery);
return bgReadings;
@ -452,7 +458,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
QueryBuilder<BgReading, Long> queryBuilder = daoBgreadings.queryBuilder();
queryBuilder.orderBy("date", ascending);
Where where = queryBuilder.where();
where.between("date", start, end).and().gt("value", 38).and().eq("isValid", true);
where.between("date", start, end).and().ge("value", 39).and().eq("isValid", true);
PreparedQuery<BgReading> preparedQuery = queryBuilder.prepare();
bgReadings = daoBgreadings.query(preparedQuery);
return bgReadings;

View file

@ -101,6 +101,11 @@ public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
return profile;
}
/**
* Note: the name returned here is used as the PS name when uploading to NS. When such a PS is retrieved
* again from NS, the added parts must be removed again, see
* {@link info.nightscout.utils.PercentageSplitter#pureName}
*/
public String getCustomizedName() {
String name = profileName;
if(LocalProfilePlugin.LOCAL_PROFILE.equals(name)){

View file

@ -27,6 +27,10 @@ public interface ConstraintsInterface {
return value;
}
default Constraint<Boolean> isUAMEnabled(Constraint<Boolean> value) {
return value;
}
default Constraint<Boolean> isAdvancedFilteringEnabled(Constraint<Boolean> value) {
return value;
}

View file

@ -99,13 +99,13 @@ public class L {
private static void initialize() {
logElements = new ArrayList<>();
logElements.add(new LogElement(APS, true));
logElements.add(new LogElement(AUTOSENS, true));
logElements.add(new LogElement(AUTOSENS, false));
logElements.add(new LogElement(BGSOURCE, true));
logElements.add(new LogElement(CONFIGBUILDER, true));
logElements.add(new LogElement(CONFIGBUILDER, false));
logElements.add(new LogElement(CONSTRAINTS, true));
logElements.add(new LogElement(CORE, true));
logElements.add(new LogElement(DATABASE, true));
logElements.add(new LogElement(DATAFOOD, true));
logElements.add(new LogElement(DATAFOOD, false));
logElements.add(new LogElement(DATASERVICE, true));
logElements.add(new LogElement(DATATREATMENTS, true));
logElements.add(new LogElement(EVENTS, false, true));

View file

@ -270,7 +270,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
if (profile == null) {
editBg.setParams(bg, 0d, 500d, 0.1d, new DecimalFormat("0.0"), false, bgTextWatcher);
editTemptarget.setParams(bg, 0d, 500d, 0.1d, new DecimalFormat("0.0"), false);
} else if (profile.getUnits().equals(Constants.MMOL)) {
} else if (units.equals(Constants.MMOL)) {
editBg.setParams(bg, 0d, 30d, 0.1d, new DecimalFormat("0.0"), false, bgTextWatcher);
editTemptarget.setParams(bg, 0d, 30d, 0.1d, new DecimalFormat("0.0"), false);
} else {
@ -279,7 +279,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
}
sensorRadioButton.setOnCheckedChangeListener((buttonView, isChecked) -> {
Double bg1 = Profile.fromMgdlToUnits(GlucoseStatus.getGlucoseStatusData() != null ? GlucoseStatus.getGlucoseStatusData().glucose : 0d, profile.getUnits());
Double bg1 = Profile.fromMgdlToUnits(GlucoseStatus.getGlucoseStatusData() != null ? GlucoseStatus.getGlucoseStatusData().glucose : 0d, units);
if (savedInstanceState != null && savedInstanceState.getDouble("editBg") != bg1) {
editBg.setValue(savedInstanceState.getDouble("editBg"));
} else {
@ -459,7 +459,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
if ((data.size() > 0) &&
(data.get(0).date > millis - 7 * 60 * 1000L) &&
(data.get(0).date < millis + 7 * 60 * 1000L)) {
editBg.setValue(Profile.fromMgdlToUnits(data.get(0).value, profile != null ? profile.getUnits() : Constants.MGDL));
editBg.setValue(Profile.fromMgdlToUnits(data.get(0).value, units));
}
}
@ -736,8 +736,8 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
.reason(reason)
.source(Source.USER);
if (tempTarget.durationInMinutes != 0) {
tempTarget.low(Profile.toMgdl(targetBottom, profile.getUnits()))
.high(Profile.toMgdl(targetTop, profile.getUnits()));
tempTarget.low(Profile.toMgdl(targetBottom, units))
.high(Profile.toMgdl(targetTop, units));
} else {
tempTarget.low(0).high(0);
}

View file

@ -18,6 +18,7 @@ import info.nightscout.androidaps.plugins.OpenAPSMA.OpenAPSMAPlugin;
import info.nightscout.androidaps.plugins.OpenAPSSMB.OpenAPSSMBPlugin;
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
import info.nightscout.androidaps.plugins.Sensitivity.SensitivityOref1Plugin;
import info.nightscout.utils.DecimalFormatter;
import info.nightscout.utils.HardLimits;
import info.nightscout.utils.Round;
@ -94,6 +95,17 @@ public class SafetyPlugin extends PluginBase implements ConstraintsInterface {
return value;
}
@Override
public Constraint<Boolean> isUAMEnabled(Constraint<Boolean> value) {
boolean enabled = SP.getBoolean(R.string.key_use_uam, false);
if (!enabled)
value.set(false, MainApp.gs(R.string.uamdisabledinpreferences), this);
boolean oref1Enabled = SensitivityOref1Plugin.getPlugin().isEnabled(PluginType.SENSITIVITY);
if (!oref1Enabled)
value.set(false, MainApp.gs(R.string.uamdisabledoref1notselected), this);
return value;
}
@Override
public Constraint<Boolean> isAdvancedFilteringEnabled(Constraint<Boolean> value) {
BgSourceInterface bgSource = ConfigBuilderPlugin.getPlugin().getActiveBgSource();

View file

@ -21,6 +21,7 @@ import info.nightscout.androidaps.plugins.Overview.graphExtensions.Scale;
import info.nightscout.androidaps.plugins.Sensitivity.SensitivityAAPSPlugin;
import info.nightscout.androidaps.plugins.Sensitivity.SensitivityWeightedAveragePlugin;
import info.nightscout.androidaps.plugins.Treatments.Treatment;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.SP;
/**
@ -40,7 +41,7 @@ public class AutosensData implements DataPointWithLabelInterface {
double min5minCarbImpact = 0d;
double remaining = 0d;
public CarbsInPast(Treatment t) {
CarbsInPast(Treatment t) {
time = t.date;
carbs = t.carbs;
remaining = t.carbs;
@ -56,6 +57,18 @@ public class AutosensData implements DataPointWithLabelInterface {
min5minCarbImpact = SP.getDouble(R.string.key_openapsama_min_5m_carbimpact, SMBDefaults.min_5m_carbimpact);
}
}
CarbsInPast (CarbsInPast other) {
this.time = other.time;
this.carbs = other.carbs;
this.min5minCarbImpact = other.min5minCarbImpact;
this.remaining = other.remaining;
}
@Override
public String toString() {
return String.format("CarbsInPast: time: %s carbs: %.02f min5minCI: %.02f remaining: %.2f", new Date(time).toLocaleString(), carbs, min5minCarbImpact, remaining);
}
}
public long time = 0L;
@ -89,11 +102,18 @@ public class AutosensData implements DataPointWithLabelInterface {
@Override
public String toString() {
return "AutosensData: " + new Date(time).toLocaleString() + " " + pastSensitivity + " Delta=" + delta + " avgDelta=" + avgDelta + " Bgi=" + bgi + " Deviation=" + deviation + " avgDeviation=" + avgDeviation + " Absorbed=" + absorbed + " CarbsFromBolus=" + carbsFromBolus + " COB=" + cob + " autosensRatio=" + autosensResult.ratio + " slopeFromMaxDeviation=" + slopeFromMaxDeviation + " slopeFromMinDeviation=" + slopeFromMinDeviation;
return String.format("AutosensData: %s pastSensitivity=%s delta=%.02f avgDelta=%.02f bgi=%.02f deviation=%.02f avgDeviation=%.02f absorbed=%.02f carbsFromBolus=%.02f cob=%.02f autosensRatio=%.02f slopeFromMaxDeviation=%.02f slopeFromMinDeviation=%.02f activeCarbsList=%s",
new Date(time).toLocaleString(), pastSensitivity, delta, avgDelta, bgi, deviation, avgDeviation, absorbed, carbsFromBolus, cob, autosensResult.ratio, slopeFromMaxDeviation, slopeFromMinDeviation, activeCarbsList.toString());
}
public int minOld() {
return (int) ((System.currentTimeMillis() - time) / 1000 / 60);
public List<CarbsInPast> cloneCarbsList() {
List<CarbsInPast> newActiveCarbsList = new ArrayList<>();
for(CarbsInPast c: activeCarbsList) {
newActiveCarbsList.add(new CarbsInPast(c));
}
return newActiveCarbsList;
}
// remove carbs older than timeframe
@ -111,7 +131,7 @@ public class AutosensData implements DataPointWithLabelInterface {
if (c.remaining > 0)
cob -= c.remaining;
if (L.isEnabled(L.AUTOSENS))
log.debug("Removing carbs at " + new Date(toTime).toLocaleString() + " + after " + maxAbsorptionHours + "h :" + new Date(c.time).toLocaleString());
log.debug("Removing carbs at " + new Date(toTime).toLocaleString() + " after " + maxAbsorptionHours + "h > " + c.toString());
}
}
}

View file

@ -146,8 +146,8 @@ public class IobCobCalculatorPlugin extends PluginBase {
return false;
}
}
double averageDiff = totalDiff / (bgReadings.size() - 1) / 1000d;
boolean is5mindata = averageDiff < 10;
long averageDiff = totalDiff / bgReadings.size() / 1000;
boolean is5mindata = averageDiff < 1;
if (L.isEnabled(L.AUTOSENS))
log.debug("Interval detection: values: " + bgReadings.size() + " averageDiff: " + averageDiff + "[s] is5minData: " + is5mindata);
return is5mindata;
@ -231,13 +231,15 @@ public class IobCobCalculatorPlugin extends PluginBase {
bucketed_data = new ArrayList<>();
bucketed_data.add(bgReadings.get(0));
if (L.isEnabled(L.AUTOSENS))
log.debug("Adding. bgTime: " + DateUtil.toISOString(bgReadings.get(0).date) + " lastbgTime: " + "none-first-value" + " " + bgReadings.get(0).toString());
int j = 0;
for (int i = 1; i < bgReadings.size(); ++i) {
long bgTime = bgReadings.get(i).date;
long lastbgTime = bgReadings.get(i - 1).date;
//log.error("Processing " + i + ": " + new Date(bgTime).toString() + " " + bgReadings.get(i).value + " Previous: " + new Date(lastbgTime).toString() + " " + bgReadings.get(i - 1).value);
if (bgReadings.get(i).value < 39 || bgReadings.get(i - 1).value < 39) {
continue;
throw new IllegalStateException("<39");
}
long elapsed_minutes = (bgTime - lastbgTime) / (60 * 1000);
@ -294,6 +296,13 @@ public class IobCobCalculatorPlugin extends PluginBase {
long adjusted = (msecDiff - T.mins(5).msecs()) / 1000;
if (L.isEnabled(L.AUTOSENS))
log.debug("Adjusting bucketed data time. Current: " + DateUtil.toISOString(current.date) + " to: " + DateUtil.toISOString(previous.date + T.mins(5).msecs()) + " by " + adjusted + " sec");
if (Math.abs(adjusted) > 90) {
// too big adjustment, fallback to non 5 min data
if (L.isEnabled(L.AUTOSENS))
log.debug("Fallback to non 5 min data");
createBucketedDataRecalculated();
return;
}
current.date = previous.date + T.mins(5).msecs();
}

View file

@ -36,7 +36,10 @@ import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
import info.nightscout.androidaps.plugins.Treatments.Treatment;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.DecimalFormatter;
import info.nightscout.utils.FabricPrivacy;
import info.nightscout.utils.MidnightTime;
import info.nightscout.utils.Profiler;
import info.nightscout.utils.SP;
import static info.nightscout.utils.DateUtil.now;
@ -74,6 +77,7 @@ public class IobCobOref1Thread extends Thread {
@Override
public final void run() {
long start = DateUtil.now();
mWakeLock.acquire();
try {
if (L.isEnabled(L.AUTOSENS))
@ -148,7 +152,7 @@ public class IobCobOref1Thread extends Thread {
AutosensData autosensData = new AutosensData();
autosensData.time = bgTime;
if (previous != null)
autosensData.activeCarbsList = new ArrayList<>(previous.activeCarbsList);
autosensData.activeCarbsList = previous.cloneCarbsList();
else
autosensData.activeCarbsList = new ArrayList<>();
@ -242,6 +246,7 @@ public class IobCobOref1Thread extends Thread {
for (int ir = 0; ir < recentTreatments.size(); ir++) {
autosensData.carbsFromBolus += recentTreatments.get(ir).carbs;
autosensData.activeCarbsList.add(new AutosensData.CarbsInPast(recentTreatments.get(ir)));
autosensData.pastSensitivity += "[" + DecimalFormatter.to0Decimal(recentTreatments.get(ir).carbs) + "g]";
}
@ -339,19 +344,19 @@ public class IobCobOref1Thread extends Thread {
// Exclude meal-related deviations (carb absorption) from autosens
if (autosensData.type.equals("non-meal")) {
if (Math.abs(deviation) < Constants.DEVIATION_TO_BE_EQUAL) {
autosensData.pastSensitivity = "=";
autosensData.pastSensitivity += "=";
autosensData.validDeviation = true;
} else if (deviation > 0) {
autosensData.pastSensitivity = "+";
autosensData.pastSensitivity += "+";
autosensData.validDeviation = true;
} else {
autosensData.pastSensitivity = "-";
autosensData.pastSensitivity += "-";
autosensData.validDeviation = true;
}
} else if (autosensData.type.equals("uam")) {
autosensData.pastSensitivity = "u";
autosensData.pastSensitivity += "u";
} else {
autosensData.pastSensitivity = "x";
autosensData.pastSensitivity += "x";
}
//log.debug("TIME: " + new Date(bgTime).toString() + " BG: " + bg + " SENS: " + sens + " DELTA: " + delta + " AVGDELTA: " + avgDelta + " IOB: " + iob.iob + " ACTIVITY: " + iob.activity + " BGI: " + bgi + " DEVIATION: " + deviation);
@ -391,8 +396,11 @@ public class IobCobOref1Thread extends Thread {
} finally {
mWakeLock.release();
MainApp.bus().post(new EventIobCalculationProgress(""));
if (L.isEnabled(L.AUTOSENS))
if (L.isEnabled(L.AUTOSENS)) {
log.debug("AUTOSENSDATA thread ended: " + from);
log.debug("Midnights: " + MidnightTime.log());
}
Profiler.log(log, "IobCobOref1Thread", start);
}
}

View file

@ -36,7 +36,10 @@ import info.nightscout.androidaps.plugins.Sensitivity.SensitivityWeightedAverage
import info.nightscout.androidaps.plugins.Treatments.Treatment;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.DecimalFormatter;
import info.nightscout.utils.FabricPrivacy;
import info.nightscout.utils.MidnightTime;
import info.nightscout.utils.Profiler;
import info.nightscout.utils.SP;
import static info.nightscout.utils.DateUtil.now;
@ -73,6 +76,7 @@ public class IobCobThread extends Thread {
@Override
public final void run() {
long start = DateUtil.now();
mWakeLock.acquire();
try {
if (L.isEnabled(L.AUTOSENS))
@ -147,7 +151,7 @@ public class IobCobThread extends Thread {
AutosensData autosensData = new AutosensData();
autosensData.time = bgTime;
if (previous != null)
autosensData.activeCarbsList = new ArrayList<>(previous.activeCarbsList);
autosensData.activeCarbsList = previous.cloneCarbsList();
else
autosensData.activeCarbsList = new ArrayList<>();
@ -241,6 +245,7 @@ public class IobCobThread extends Thread {
for (int ir = 0; ir < recentTreatments.size(); ir++) {
autosensData.carbsFromBolus += recentTreatments.get(ir).carbs;
autosensData.activeCarbsList.add(new AutosensData.CarbsInPast(recentTreatments.get(ir)));
autosensData.pastSensitivity += "[" + DecimalFormatter.to0Decimal(recentTreatments.get(ir).carbs) + "g]";
}
@ -284,17 +289,17 @@ public class IobCobThread extends Thread {
// calculate autosens only without COB
if (autosensData.cob <= 0) {
if (Math.abs(deviation) < Constants.DEVIATION_TO_BE_EQUAL) {
autosensData.pastSensitivity = "=";
autosensData.pastSensitivity += "=";
autosensData.validDeviation = true;
} else if (deviation > 0) {
autosensData.pastSensitivity = "+";
autosensData.pastSensitivity += "+";
autosensData.validDeviation = true;
} else {
autosensData.pastSensitivity = "-";
autosensData.pastSensitivity += "-";
autosensData.validDeviation = true;
}
} else {
autosensData.pastSensitivity = "C";
autosensData.pastSensitivity += "C";
}
//log.debug("TIME: " + new Date(bgTime).toString() + " BG: " + bg + " SENS: " + sens + " DELTA: " + delta + " AVGDELTA: " + avgDelta + " IOB: " + iob.iob + " ACTIVITY: " + iob.activity + " BGI: " + bgi + " DEVIATION: " + deviation);
@ -318,8 +323,11 @@ public class IobCobThread extends Thread {
} finally {
mWakeLock.release();
MainApp.bus().post(new EventIobCalculationProgress(""));
if (L.isEnabled(L.AUTOSENS))
if (L.isEnabled(L.AUTOSENS)) {
log.debug("AUTOSENSDATA thread ended: " + from);
log.debug("Midnights: " + MidnightTime.log());
}
Profiler.log(log, "IobCobThread", start);
}
}

View file

@ -307,6 +307,11 @@ public class APSResult {
PumpInterface pump = ConfigBuilderPlugin.getPlugin().getActivePump();
Profile profile = ProfileFunctions.getInstance().getProfile();
if (profile == null) {
log.error("FALSE: No Profile");
return false;
}
if (usePercent) {
if (activeTemp == null && percent == 100) {
if (L.isEnabled(L.APS))

View file

@ -409,8 +409,10 @@ public class LoopPlugin extends PluginBase {
.setAutoCancel(true)
.setPriority(Notification.PRIORITY_HIGH)
.setCategory(Notification.CATEGORY_ALARM)
.setVisibility(Notification.VISIBILITY_PUBLIC)
.setLocalOnly(true);
.setVisibility(Notification.VISIBILITY_PUBLIC);
if (SP.getBoolean("wearcontrol", false)) {
builder.setLocalOnly(true);
}
// Creates an explicit intent for an Activity in your app
Intent resultIntent = new Intent(MainApp.instance().getApplicationContext(), MainActivity.class);

View file

@ -73,8 +73,8 @@ public class MaintenancePlugin extends PluginBase {
}
public void sendLogs() {
String recipient = SP.getString("key_maintenance_logs_email", "logs@androidaps.org");
int amount = SP.getInt("key_maintenance_logs_amount", 2);
String recipient = SP.getString(R.string.key_maintenance_logs_email, "logs@androidaps.org");
int amount = SP.getInt(R.string.key_maintenance_logs_amount, 2);
String logDirectory = LoggerUtils.getLogDirectory();
List<File> logs = this.getLogfiles(logDirectory, amount);
@ -103,7 +103,7 @@ public class MaintenancePlugin extends PluginBase {
Arrays.sort(files, (f1, f2) -> f1.getName().compareTo(f2.getName()));
List<File> delFiles = Arrays.asList(files);
int amount = SP.getInt("key_logshipper_amount", 2);
int amount = SP.getInt(R.string.key_logshipper_amount, 2);
int keepIndex = amount - 1;
if (keepIndex < delFiles.size()) {
@ -213,6 +213,10 @@ public class MaintenancePlugin extends PluginBase {
builder.append("ADD TIME OF EVENT HERE: " + System.lineSeparator());
builder.append("ADD ISSUE DESCRIPTION OR GITHUB ISSUE REFERENCE NUMBER: " + System.lineSeparator());
builder.append("-------------------------------------------------------" + System.lineSeparator());
builder.append("(Please remember this will send only very recent logs." + System.lineSeparator());
builder.append("If you want to provide logs for event older than a few hours," + System.lineSeparator());
builder.append("you have to do it manually)" + System.lineSeparator());
builder.append("-------------------------------------------------------" + System.lineSeparator());
builder.append(MainApp.gs(R.string.app_name) + " " + BuildConfig.VERSION + System.lineSeparator());
if (Config.NSCLIENT)
builder.append("NSCLIENT" + System.lineSeparator());

View file

@ -211,6 +211,7 @@ public class DetermineBasalAdapterSMBJS {
double autosensDataRatio,
boolean tempTargetSet,
boolean microBolusAllowed,
boolean uamAllowed,
boolean advancedFiltering
) throws JSONException {
@ -247,7 +248,7 @@ public class DetermineBasalAdapterSMBJS {
// mProfile.put("min_5m_carbimpact", SP.getDouble(R.string.key_openapsama_min_5m_carbimpact, SMBDefaults.min_5m_carbimpact));
//}
mProfile.put("remainingCarbsCap", SMBDefaults.remainingCarbsCap);
mProfile.put("enableUAM", SP.getBoolean(R.string.key_use_uam, false));
mProfile.put("enableUAM", uamAllowed);
mProfile.put("A52_risk_enable", SMBDefaults.A52_risk_enable);
mProfile.put("enableSMB_with_COB", SP.getBoolean(R.string.key_enableSMB_with_COB, false));
mProfile.put("enableSMB_with_temptarget", SP.getBoolean(R.string.key_enableSMB_with_temptarget, false));

View file

@ -198,6 +198,10 @@ public class OpenAPSSMBPlugin extends PluginBase implements APSInterface {
MainApp.getConstraintChecker().isAdvancedFilteringEnabled(advancedFiltering);
inputConstraints.copyReasons(advancedFiltering);
Constraint<Boolean> uam = new Constraint<>(true);
MainApp.getConstraintChecker().isUAMEnabled(uam);
inputConstraints.copyReasons(uam);
if (L.isEnabled(L.APS))
Profiler.log(log, "detectSensitivityandCarbAbsorption()", startPart);
if (L.isEnabled(L.APS))
@ -209,6 +213,7 @@ public class OpenAPSSMBPlugin extends PluginBase implements APSInterface {
lastAutosensResult.ratio, //autosensDataRatio
isTempTarget,
smbAllowed.value(),
uam.value(),
advancedFiltering.value()
);
} catch (JSONException e) {

View file

@ -107,9 +107,9 @@ public class BolusProgressDialog extends DialogFragment implements View.OnClickL
@Override
public void onPause() {
running = false;
super.onPause();
MainApp.unsubscribe(this);
running = false;
if (L.isEnabled(L.UI))
log.debug("onPause");
}
@ -173,10 +173,12 @@ public class BolusProgressDialog extends DialogFragment implements View.OnClickL
Activity activity = getActivity();
if (activity != null) {
activity.runOnUiThread(() -> {
if (L.isEnabled(L.UI))
log.debug("executing");
try {
dismiss();
if (running) {
if (L.isEnabled(L.UI))
log.debug("executing");
dismiss();
}
} catch (Exception e) {
log.error("Unhandled exception", e);
}

View file

@ -446,7 +446,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
super.onCreateContextMenu(menu, v, menuInfo);
if (v == apsModeView) {
final LoopPlugin loopPlugin = LoopPlugin.getPlugin();
final PumpDescription pumpDescription = ConfigBuilderPlugin.getPlugin().getActivePump().getPumpDescription();
final PumpDescription pumpDescription =
ConfigBuilderPlugin.getPlugin().getActivePump().getPumpDescription();
if (!ProfileFunctions.getInstance().isProfileValid("ContexMenuCreation"))
return;
menu.setHeaderTitle(MainApp.gs(R.string.loop));
@ -457,19 +458,23 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
menu.add(MainApp.gs(R.string.suspendloopfor2h));
menu.add(MainApp.gs(R.string.suspendloopfor3h));
menu.add(MainApp.gs(R.string.suspendloopfor10h));
if (pumpDescription.tempDurationStep15mAllowed)
menu.add(MainApp.gs(R.string.disconnectpumpfor15m));
if (pumpDescription.tempDurationStep30mAllowed)
menu.add(MainApp.gs(R.string.disconnectpumpfor30m));
menu.add(MainApp.gs(R.string.disconnectpumpfor1h));
menu.add(MainApp.gs(R.string.disconnectpumpfor2h));
menu.add(MainApp.gs(R.string.disconnectpumpfor3h));
} else {
menu.add(MainApp.gs(R.string.resume));
} else {
if (!loopPlugin.isDisconnected()) {
menu.add(MainApp.gs(R.string.resume));
}
}
}
if (!loopPlugin.isEnabled(PluginType.LOOP))
if (!loopPlugin.isEnabled(PluginType.LOOP)) {
menu.add(MainApp.gs(R.string.enableloop));
}
if (!loopPlugin.isDisconnected()) {
showSuspendtPump(menu, pumpDescription);
} else {
menu.add(MainApp.gs(R.string.reconnect));
}
} else if (v == activeProfileView) {
menu.setHeaderTitle(MainApp.gs(R.string.profile));
menu.add(MainApp.gs(R.string.danar_viewprofile));
@ -488,6 +493,17 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
}
}
private void showSuspendtPump(ContextMenu menu,
PumpDescription pumpDescription) {
if (pumpDescription.tempDurationStep15mAllowed)
menu.add(MainApp.gs(R.string.disconnectpumpfor15m));
if (pumpDescription.tempDurationStep30mAllowed)
menu.add(MainApp.gs(R.string.disconnectpumpfor30m));
menu.add(MainApp.gs(R.string.disconnectpumpfor1h));
menu.add(MainApp.gs(R.string.disconnectpumpfor2h));
menu.add(MainApp.gs(R.string.disconnectpumpfor3h));
}
@Override
public boolean onContextItemSelected(MenuItem item) {
final Profile profile = ProfileFunctions.getInstance().getProfile();
@ -516,7 +532,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
updateGUI("suspendmenu");
NSUpload.uploadOpenAPSOffline(0);
return true;
} else if (item.getTitle().equals(MainApp.gs(R.string.resume))) {
} else if (item.getTitle().equals(MainApp.gs(R.string.resume)) ||
item.getTitle().equals(MainApp.gs(R.string.reconnect))) {
loopPlugin.suspendTo(0L);
updateGUI("suspendmenu");
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelTempBasal(true, new Callback() {
@ -1095,7 +1112,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended));
apsModeView.setText(String.format(MainApp.gs(R.string.loopsuperbolusfor), loopPlugin.minutesToEndOfSuspend()));
apsModeView.setTextColor(Color.WHITE);
} else if (loopPlugin.isEnabled(PluginType.LOOP) && loopPlugin.isDisconnected()) {
} else if (loopPlugin.isDisconnected()) {
apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended));
apsModeView.setText(String.format(MainApp.gs(R.string.loopdisconnectedfor), loopPlugin.minutesToEndOfSuspend()));
apsModeView.setTextColor(Color.WHITE);
@ -1364,7 +1381,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
// Sensitivity
if (sensitivityView != null) {
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensDataSynchronized("Overview");
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensData("Overview");
if (autosensData != null)
sensitivityView.setText(String.format("%.0f%%", autosensData.autosensResult.ratio * 100));
else

View file

@ -68,6 +68,10 @@ public class Notification {
public static final int NSMALFUNCTION = 40;
public static final int NEWVERSIONDETECTED = 41;
public static final int SENDLOGFILES = 42;
public static final int DEVICENOTPAIRED = 43;
public static final int MEDTRONIC_PUMP_ALARM = 44;
public static final int RILEYLINK_CONNECTION = 45;
public static final int PERMISSION_PHONESTATE = 46;
public int id;

View file

@ -13,6 +13,14 @@ import android.os.Build;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
// Android Auto
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.app.RemoteInput;
import com.squareup.otto.Subscribe;
import info.nightscout.androidaps.Config;
@ -60,6 +68,18 @@ public class PersistentNotificationPlugin extends PluginBase {
public static final int ONGOING_NOTIFICATION_ID = 4711;
private final Context ctx;
/// For Android Auto
/// Intents are not declared in manifest and not consumed, this is intentionally because actually we can't do anything with
private static final String PACKAGE = "info.nightscout";
private static final String READ_ACTION =
"info.nightscout.androidaps.ACTION_MESSAGE_READ";
private static final String REPLY_ACTION =
"info.nightscout.androidaps.ACTION_MESSAGE_REPLY";
private static final String CONVERSATION_ID = "conversation_id";
private static final String EXTRA_VOICE_REPLY = "extra_voice_reply";
/// End Android Auto
public PersistentNotificationPlugin(Context ctx) {
super(new PluginDescription()
.mainType(PluginType.GENERAL)
@ -107,7 +127,8 @@ public class PersistentNotificationPlugin extends PluginBase {
return null;
}
String line1 = "";
String line1;
String line1_aa;
if (ConfigBuilderPlugin.getPlugin().getActiveProfileInterface() == null || !ProfileFunctions.getInstance().isProfileValid("Notificiation"))
return null;
@ -118,22 +139,25 @@ public class PersistentNotificationPlugin extends PluginBase {
GlucoseStatus glucoseStatus = GlucoseStatus.getGlucoseStatusData();
if (lastBG != null) {
line1 = lastBG.valueToUnitsToString(units);
line1 = line1_aa = lastBG.valueToUnitsToString(units);
if (glucoseStatus != null) {
line1 += " Δ" + deltastring(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)
+ " avgΔ" + deltastring(glucoseStatus.avgdelta, glucoseStatus.avgdelta * Constants.MGDL_TO_MMOLL, units);
line1_aa += " " + lastBG.directionToSymbol();
} else {
line1 += " " +
MainApp.gs(R.string.old_data) +
" ";
line1_aa += line1 + ".";
}
} else {
line1 = MainApp.gs(R.string.missed_bg_readings);
line1 = line1_aa = MainApp.gs(R.string.missed_bg_readings);
}
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis());
if (activeTemp != null) {
line1 += " " + activeTemp.toStringShort();
line1_aa += " " + activeTemp.toStringShort() + ".";
}
//IOB
@ -143,12 +167,55 @@ public class PersistentNotificationPlugin extends PluginBase {
IobTotal basalIob = TreatmentsPlugin.getPlugin().getLastCalculationTempBasals().round();
String line2 = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U " + MainApp.gs(R.string.cob)+": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString();;
String line2 = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U " + MainApp.gs(R.string.cob)+": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString();
String line2_aa = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U. " + MainApp.gs(R.string.cob)+": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString() + ".";
String line3 = DecimalFormatter.to2Decimal(ConfigBuilderPlugin.getPlugin().getActivePump().getBaseBasalRate()) + " U/h";
String line3_aa = DecimalFormatter.to2Decimal(ConfigBuilderPlugin.getPlugin().getActivePump().getBaseBasalRate()) + " U/h.";
line3 += " - " + ProfileFunctions.getInstance().getProfileName();
line3_aa += " - " + ProfileFunctions.getInstance().getProfileName() + ".";
/// For Android Auto
Intent msgReadIntent = new Intent()
.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES)
.setAction(READ_ACTION)
.putExtra(CONVERSATION_ID, ONGOING_NOTIFICATION_ID)
.setPackage(PACKAGE);
PendingIntent msgReadPendingIntent =
PendingIntent.getBroadcast(ctx,
ONGOING_NOTIFICATION_ID,
msgReadIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
Intent msgReplyIntent = new Intent()
.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES)
.setAction(REPLY_ACTION)
.putExtra(CONVERSATION_ID, ONGOING_NOTIFICATION_ID)
.setPackage(PACKAGE);
PendingIntent msgReplyPendingIntent = PendingIntent.getBroadcast(
ctx,
ONGOING_NOTIFICATION_ID,
msgReplyIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
// Build a RemoteInput for receiving voice input from devices
RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY).build();
// Create the UnreadConversation
NotificationCompat.CarExtender.UnreadConversation.Builder unreadConversationBuilder =
new NotificationCompat.CarExtender.UnreadConversation.Builder(line1_aa + "\n" + line2_aa)
.setLatestTimestamp(System.currentTimeMillis())
.setReadPendingIntent(msgReadPendingIntent)
.setReplyAction(msgReplyPendingIntent, remoteInput);
/// Add dot to produce a "more natural sounding result"
unreadConversationBuilder.addMessage(line3_aa);
/// End Android Auto
NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx, CHANNEL_ID);
@ -167,6 +234,11 @@ public class PersistentNotificationPlugin extends PluginBase {
builder.setContentTitle(line1);
builder.setContentText(line2);
builder.setSubText(line3);
/// Android Auto
builder.extend(new NotificationCompat.CarExtender()
.setUnreadConversation(unreadConversationBuilder.build()));
/// End Android Auto
Intent resultIntent = new Intent(ctx, MainActivity.class);

View file

@ -156,7 +156,7 @@ public class LocalProfileFragment extends SubscriberFragment {
public String getSumLabel() {
ProfileStore profile = LocalProfilePlugin.getPlugin().createProfileStore();
if (profile != null)
return "" + DecimalFormatter.to2Decimal(profile.getDefaultProfile().baseBasalSum()) + "U";
return "" + DecimalFormatter.to2Decimal(profile.getDefaultProfile().baseBasalSum()) + MainApp.gs(R.string.insulin_unit_shortname);
else
return MainApp.gs(R.string.localprofile);
}

View file

@ -52,6 +52,8 @@ public class NSProfileFragment extends SubscriberFragment {
TextView isf;
@BindView(R.id.profileview_basal)
TextView basal;
@BindView(R.id.profileview_basaltotal)
TextView basaltotal;
@BindView(R.id.profileview_target)
TextView target;
@BindView(R.id.basal_graph)
@ -116,6 +118,7 @@ public class NSProfileFragment extends SubscriberFragment {
ic.setText(profile.getIcList());
isf.setText(profile.getIsfList());
basal.setText(profile.getBasalList());
basaltotal.setText(String.format(MainApp.gs(R.string.profile_total), DecimalFormatter.to2Decimal(profile.baseBasalSum())));
target.setText(profile.getTargetList());
basalGraph.show(profile);
}
@ -141,6 +144,7 @@ public class NSProfileFragment extends SubscriberFragment {
ic.setText("");
isf.setText("");
basal.setText("");
basaltotal.setText("");
target.setText("");
activateButton.setVisibility(View.GONE);
}

View file

@ -653,11 +653,7 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
}
}
/**
* Updates a DetailedBolusInfo from a pump bolus and adds it as a Treatment to the DB.
* Handles edge cases when dates aren't unique which are extremely unlikely to occur,
* but if they do, the user should be warned since a bolus will be missing from calculations.
*/
/** Creates a treatment record based on the request in DetailBolusInfo and the delivered bolus. */
private boolean addBolusToTreatments(DetailedBolusInfo detailedBolusInfo, Bolus lastPumpBolus) {
DetailedBolusInfo dbi = detailedBolusInfo.copy();
dbi.date = calculateFakeBolusDate(lastPumpBolus);
@ -665,15 +661,7 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
dbi.source = Source.PUMP;
dbi.insulin = lastPumpBolus.amount;
try {
boolean treatmentCreated = TreatmentsPlugin.getPlugin().addToHistoryTreatment(dbi, false);
if (!treatmentCreated) {
log.error("Adding treatment record overrode an existing record: " + dbi);
if (dbi.isSMB) {
Notification notification = new Notification(Notification.COMBO_PUMP_ALARM, MainApp.gs(R.string.combo_error_updating_treatment_record), Notification.URGENT);
MainApp.bus().post(new EventNewNotification(notification));
}
return false;
}
TreatmentsPlugin.getPlugin().addToHistoryTreatment(dbi, true);
} catch (Exception e) {
log.error("Adding treatment record failed", e);
if (dbi.isSMB) {
@ -1149,6 +1137,7 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
return historyResult.success;
}
/** Return value indicates whether a new record was created. */
private boolean updateDbFromPumpHistory(@NonNull PumpHistory history) {
boolean updated = false;
for (Bolus pumpBolus : history.bolusHistory) {
@ -1158,8 +1147,7 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
dbi.source = Source.PUMP;
dbi.insulin = pumpBolus.amount;
dbi.eventType = CareportalEvent.CORRECTIONBOLUS;
if (TreatmentsPlugin.getPlugin().getService().getPumpRecordById(dbi.pumpId) == null) {
TreatmentsPlugin.getPlugin().addToHistoryTreatment(dbi, false);
if (TreatmentsPlugin.getPlugin().addToHistoryTreatment(dbi, true)) {
updated = true;
}
}

View file

@ -40,6 +40,7 @@ import info.nightscout.androidaps.plugins.PumpDanaR.comm.MsgPCCommStart;
import info.nightscout.androidaps.plugins.PumpDanaR.comm.MsgPCCommStop;
import info.nightscout.androidaps.plugins.PumpDanaR.comm.RecordTypes;
import info.nightscout.androidaps.plugins.Treatments.Treatment;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.SP;
import info.nightscout.utils.ToastUtils;
@ -236,4 +237,15 @@ public abstract class AbstractDanaRExecutionService extends Service {
result.comment = "OK";
return result;
}
protected void waitForWholeMinute() {
while (true) {
long time = DateUtil.now();
long timeToWholeMinute = (60000 - time % 60000);
if (timeToWholeMinute > 59800 || timeToWholeMinute < 3000)
break;
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.waitingfortimesynchronization, (int) (timeToWholeMinute / 1000))));
SystemClock.sleep(Math.min(timeToWholeMinute, 100));
}
}
}

View file

@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.Overview.events.EventDismissNotification;
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
@ -51,5 +52,9 @@ public class MsgInitConnStatusBolus_k extends MessageBase {
} else {
MainApp.bus().post(new EventDismissNotification(Notification.EXTENDED_BOLUS_DISABLED));
}
// This is last message of initial sequence
if (ConfigBuilderPlugin.getPlugin().getActivePump() != null)
ConfigBuilderPlugin.getPlugin().getActivePump().finishHandshaking();
}
}

View file

@ -24,6 +24,7 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.ConfigBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.androidaps.plugins.Overview.Dialogs.BolusProgressDialog;
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
@ -55,8 +56,8 @@ import info.nightscout.androidaps.plugins.PumpDanaRKorean.comm.MsgSettingBasal_k
import info.nightscout.androidaps.plugins.PumpDanaRKorean.comm.MsgStatusBasic_k;
import info.nightscout.androidaps.plugins.Treatments.Treatment;
import info.nightscout.androidaps.queue.commands.Command;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.utils.SP;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.T;
public class DanaRKoreanExecutionService extends AbstractDanaRExecutionService {
@ -189,7 +190,9 @@ public class DanaRKoreanExecutionService extends AbstractDanaRExecutionService {
if (L.isEnabled(L.PUMP))
log.debug("Pump time difference: " + timeDiff + " seconds");
if (Math.abs(timeDiff) > 10) {
mSerialIOThread.sendMessage(new MsgSetTime(new Date()));
waitForWholeMinute(); // Dana can set only whole minute
// add 10sec to be sure we are over minute (will be cutted off anyway)
mSerialIOThread.sendMessage(new MsgSetTime(new Date(DateUtil.now() + T.secs(10).msecs())));
mSerialIOThread.sendMessage(new MsgSettingPumpTime());
timeDiff = (danaRPump.pumpTime - System.currentTimeMillis()) / 1000L;
if (L.isEnabled(L.PUMP))

View file

@ -415,6 +415,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
if (!result.success) {
String error = "" + DanaRS_Packet_Bolus_Set_Step_Bolus_Start.errorCode;
switch (DanaRS_Packet_Bolus_Set_Step_Bolus_Start.errorCode) {
// 4 reported as max bolus violation. Check later
case 0x10:
error = MainApp.gs(R.string.maxbolusviolation);
break;

View file

@ -45,6 +45,12 @@ public class DanaRS_Packet_APS_History_Events extends DanaRS_Packet {
public DanaRS_Packet_APS_History_Events(long from) {
this();
GregorianCalendar cal = new GregorianCalendar();
if (from > DateUtil.now()) {
log.debug("Asked to load from the future");
from = 0;
}
if (from != 0)
cal.setTimeInMillis(from);
else

View file

@ -144,9 +144,9 @@ public class BLEComm {
if (L.isEnabled(L.PUMPBTCOMM))
log.debug("Trying to create a new connection from: " + from);
mBluetoothDeviceName = device.getName();
mBluetoothGatt = device.connectGatt(service.getApplicationContext(), false, mGattCallback);
setCharacteristicNotification(getUARTReadBTGattChar(), true);
mBluetoothDeviceName = device.getName();
return true;
}
@ -662,7 +662,13 @@ public class BLEComm {
private void SendPumpCheck() {
// 1st message sent to pump after connect
byte[] bytes = BleCommandUtil.getInstance().getEncryptedPacket(BleCommandUtil.DANAR_PACKET__OPCODE_ENCRYPTION__PUMP_CHECK, null, getConnectDeviceName());
String devicename = getConnectDeviceName();
if(devicename == null || devicename.equals("")){
Notification n = new Notification(Notification.DEVICENOTPAIRED, MainApp.gs(R.string.pairfirst), Notification.URGENT);
MainApp.bus().post(new EventNewNotification(n));
return;
}
byte[] bytes = BleCommandUtil.getInstance().getEncryptedPacket(BleCommandUtil.DANAR_PACKET__OPCODE_ENCRYPTION__PUMP_CHECK, null, devicename);
if (L.isEnabled(L.PUMPBTCOMM))
log.debug(">>>>> " + "ENCRYPTION__PUMP_CHECK (0x00)" + " " + DanaRS_Packet.toHexString(bytes));
writeCharacteristic_NO_RESPONSE(getUARTWriteBTGattChar(), bytes);

View file

@ -26,23 +26,30 @@ public class MsgHistoryEvents_v2 extends MessageBase {
public static long lastEventTimeLoaded = 0;
public MsgHistoryEvents_v2(long from) {
SetCommand(0xE003);
GregorianCalendar gfrom = new GregorianCalendar();
gfrom.setTimeInMillis(from);
AddParamDate(gfrom);
done = false;
if (L.isEnabled(L.PUMPCOMM))
log.debug("New message");
public MsgHistoryEvents_v2() {
this(0);
}
public MsgHistoryEvents_v2() {
public MsgHistoryEvents_v2(long from) {
SetCommand(0xE003);
AddParamByte((byte) 0);
AddParamByte((byte) 1);
AddParamByte((byte) 1);
AddParamByte((byte) 0);
AddParamByte((byte) 0);
if (from > DateUtil.now()) {
log.debug("Asked to load from the future");
from = 0;
}
if (from == 0) {
AddParamByte((byte) 0);
AddParamByte((byte) 1);
AddParamByte((byte) 1);
AddParamByte((byte) 0);
AddParamByte((byte) 0);
} else {
GregorianCalendar gfrom = new GregorianCalendar();
gfrom.setTimeInMillis(from);
AddParamDate(gfrom);
}
done = false;
if (L.isEnabled(L.PUMPCOMM))
log.debug("New message");

View file

@ -25,6 +25,7 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.ConfigBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.androidaps.plugins.Overview.Dialogs.BolusProgressDialog;
import info.nightscout.androidaps.plugins.Overview.Dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
@ -71,7 +72,6 @@ import info.nightscout.androidaps.plugins.Treatments.Treatment;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.queue.commands.Command;
import info.nightscout.utils.DateUtil;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.utils.SP;
import info.nightscout.utils.T;
@ -465,16 +465,10 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
if (!isConnected())
return new PumpEnactResult().success(false);
SystemClock.sleep(300);
MsgHistoryEvents_v2 msg;
if (lastHistoryFetched == 0) {
msg = new MsgHistoryEvents_v2();
if (L.isEnabled(L.PUMP))
log.debug("Loading complete event history");
} else {
msg = new MsgHistoryEvents_v2(lastHistoryFetched);
if (L.isEnabled(L.PUMP))
log.debug("Loading event history from: " + DateUtil.dateAndTimeFullString(lastHistoryFetched));
}
MsgHistoryEvents_v2 msg = new MsgHistoryEvents_v2(lastHistoryFetched);
if (L.isEnabled(L.PUMP))
log.debug("Loading event history from: " + DateUtil.dateAndTimeFullString(lastHistoryFetched));
mSerialIOThread.sendMessage(msg);
while (!msg.done && mRfcommSocket.isConnected()) {
SystemClock.sleep(100);
@ -503,17 +497,6 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
return true;
}
void waitForWholeMinute() {
while (true) {
long time = DateUtil.now();
long timeToWholeMinute = (60000 - time % 60000);
if (timeToWholeMinute > 59800 || timeToWholeMinute < 3000)
break;
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.waitingfortimesynchronization, (int) (timeToWholeMinute / 1000))));
SystemClock.sleep(Math.min(timeToWholeMinute, 100));
}
}
public PumpEnactResult setUserOptions() {
if (!isConnected())
return new PumpEnactResult().success(false);

View file

@ -519,12 +519,13 @@ public class SmsCommunicatorPlugin extends PluginBase {
} else if (suspendWaitingForConfirmation != null && !suspendWaitingForConfirmation.processed &&
suspendWaitingForConfirmation.confirmCode.equals(splited[0]) && System.currentTimeMillis() - suspendWaitingForConfirmation.date < Constants.SMS_CONFIRM_TIMEOUT) {
suspendWaitingForConfirmation.processed = true;
final int dur = suspendWaitingForConfirmation.duration;
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelTempBasal(true, new Callback() {
@Override
public void run() {
if (result.success) {
LoopPlugin.getPlugin().suspendTo(System.currentTimeMillis() + suspendWaitingForConfirmation.duration * 60L * 1000);
NSUpload.uploadOpenAPSOffline(suspendWaitingForConfirmation.duration * 60);
LoopPlugin.getPlugin().suspendTo(System.currentTimeMillis() + dur * 60L * 1000);
NSUpload.uploadOpenAPSOffline(dur * 60);
MainApp.bus().post(new EventRefreshOverview("SMS_LOOP_SUSPENDED"));
String reply = MainApp.gs(R.string.smscommunicator_loopsuspended) + " " +
MainApp.gs(result.success ? R.string.smscommunicator_tempbasalcanceled : R.string.smscommunicator_tempbasalcancelfailed);

View file

@ -11,7 +11,7 @@ import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.Overview.Dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.T;
import static info.nightscout.utils.DateUtil.now;
@ -29,17 +29,14 @@ public class CarbsGenerator {
}
public static void createCarb(int carbs, long time, String eventType, @Nullable String notes) {
long now = DateUtil.now();
int carbTime = (int) ((time - now) / 1000 / 60);
DetailedBolusInfo carbInfo = new DetailedBolusInfo();
carbInfo.date = now;
carbInfo.carbTime = carbTime;
carbInfo.date = time;
carbInfo.eventType = eventType;
carbInfo.carbs = carbs;
carbInfo.context = MainApp.instance();
carbInfo.source = Source.USER;
carbInfo.notes = notes;
if (ConfigBuilderPlugin.getPlugin().getActivePump().getPumpDescription().storesCarbInfo && carbInfo.date <= now()) {
if (ConfigBuilderPlugin.getPlugin().getActivePump().getPumpDescription().storesCarbInfo && carbInfo.date <= now() && carbInfo.date > now()- T.mins(2).msecs()) {
ConfigBuilderPlugin.getPlugin().getCommandQueue().bolus(carbInfo, new Callback() {
@Override
public void run() {
@ -54,6 +51,8 @@ public class CarbsGenerator {
}
});
} else {
// Don't send to pump if it is in the future or more than 5 minutes in the past
// as pumps might return those as as "now" when reading the history.
TreatmentsPlugin.getPlugin().addToHistoryTreatment(carbInfo, false);
}
}

View file

@ -506,26 +506,14 @@ public class TreatmentService extends OrmLiteBaseService<DatabaseHelper> {
return null;
}
public static class UpdateReturn {
boolean newRecord;
boolean success;
public UpdateReturn() {
success = false;
newRecord = false;
}
public class UpdateReturn {
public UpdateReturn(boolean success, boolean newRecord) {
this.success = success;
this.newRecord = newRecord;
}
public void or(UpdateReturn ur) {
success = success || ur.success;
newRecord = newRecord || ur.newRecord;
}
boolean newRecord;
boolean success;
}
}

View file

@ -43,7 +43,6 @@ import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.ConfigBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.IobCobCalculator.AutosensData;
import info.nightscout.androidaps.plugins.IobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.androidaps.plugins.Overview.Dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.plugins.Overview.events.EventDismissNotification;
import info.nightscout.androidaps.plugins.Overview.notifications.Notification;
@ -51,6 +50,7 @@ import info.nightscout.androidaps.plugins.Sensitivity.SensitivityAAPSPlugin;
import info.nightscout.androidaps.plugins.Sensitivity.SensitivityWeightedAveragePlugin;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.FabricPrivacy;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.utils.SP;
import info.nightscout.utils.T;
@ -184,7 +184,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
InsulinInterface insulinInterface = ConfigBuilderPlugin.getPlugin().getActiveInsulin();
if (insulinInterface == null)
return total;
return total;
double dia = profile.getDia();
@ -259,7 +259,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
if (t > absorptionTime_ago && t <= now) {
if (treatment.carbs >= 1) {
result.carbs += treatment.carbs;
if (t > result.lastCarbTime)
if(t > result.lastCarbTime)
result.lastCarbTime = t;
}
}
@ -312,7 +312,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
if (L.isEnabled(L.DATATREATMENTS))
log.debug("Last bolus time: " + new Date(last).toLocaleString());
log.debug("Last bolus time: " + new Date(last).toLocaleString());
return last;
}
@ -341,7 +341,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
@Subscribe
public void onStatusEvent(final EventReloadTreatmentData ev) {
if (L.isEnabled(L.DATATREATMENTS))
log.debug("EventReloadTreatmentData");
log.debug("EventReloadTreatmentData");
initializeTreatmentData();
initializeExtendedBolusData();
updateTotalIOBTreatments();
@ -352,7 +352,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
@SuppressWarnings("unused")
public void onStatusEvent(final EventReloadTempBasalData ev) {
if (L.isEnabled(L.DATATREATMENTS))
log.debug("EventReloadTempBasalData");
log.debug("EventReloadTempBasalData");
initializeTempBasalData();
updateTotalIOBTempBasals();
}
@ -372,14 +372,14 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
InsulinInterface insulinInterface = ConfigBuilderPlugin.getPlugin().getActiveInsulin();
if (insulinInterface == null)
return total;
return total;
synchronized (tempBasals) {
for (Integer pos = 0; pos < tempBasals.size(); pos++) {
TemporaryBasal t = tempBasals.get(pos);
if (t.date > time) continue;
IobTotal calc;
if (truncate && t.end() > truncateTime) {
if(truncate && t.end() > truncateTime){
TemporaryBasal dummyTemp = new TemporaryBasal();
dummyTemp.copyFrom(t);
dummyTemp.cutEndTo(truncateTime);
@ -398,7 +398,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
ExtendedBolus e = extendedBoluses.get(pos);
if (e.date > time) continue;
IobTotal calc;
if (truncate && e.end() > truncateTime) {
if(truncate && e.end() > truncateTime){
ExtendedBolus dummyExt = new ExtendedBolus();
dummyExt.copyFrom(e);
dummyExt.cutEndTo(truncateTime);
@ -495,12 +495,6 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
// return true if new record is created
@Override
public boolean addToHistoryTreatment(DetailedBolusInfo detailedBolusInfo, boolean allowUpdate) {
if (detailedBolusInfo.insulin == 0 && detailedBolusInfo.carbs == 0) {
log.error("Not valid record");
return false;
}
Treatment treatment = new Treatment();
treatment.date = detailedBolusInfo.date;
treatment.source = detailedBolusInfo.source;
@ -513,27 +507,19 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
treatment.source = detailedBolusInfo.source;
treatment.mealBolus = treatment.carbs > 0;
treatment.boluscalc = detailedBolusInfo.boluscalc != null ? detailedBolusInfo.boluscalc.toString() : null;
TreatmentService.UpdateReturn creatOrUpdateResult = new TreatmentService.UpdateReturn();
TreatmentService.UpdateReturn creatOrUpdateResultCarbs = new TreatmentService.UpdateReturn();
if (treatment.insulin > 0) {
creatOrUpdateResult = getService().createOrUpdate(treatment);
//log.debug("Adding new Treatment record" + treatment.toString());
}
if (detailedBolusInfo.carbTime != 0 && detailedBolusInfo.carbs > 0) {
TreatmentService.UpdateReturn creatOrUpdateResult = getService().createOrUpdate(treatment);
boolean newRecordCreated = creatOrUpdateResult.newRecord;
//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 + T.mins(detailedBolusInfo.carbTime).msecs() + T.secs(1).msecs(); // 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;
creatOrUpdateResultCarbs = getService().createOrUpdate(carbsTreatment);
getService().createOrUpdate(carbsTreatment);
//log.debug("Adding new Treatment record" + carbsTreatment);
}
creatOrUpdateResult.or(creatOrUpdateResultCarbs);
boolean newRecordCreated = creatOrUpdateResult.newRecord;
if (newRecordCreated && detailedBolusInfo.isValid)
NSUpload.uploadTreatmentRecord(detailedBolusInfo);

View file

@ -96,7 +96,7 @@ public class CommandQueue {
}
private synchronized void removeAll(Command.CommandType type) {
for (int i = 0; i < queue.size(); i++) {
for (int i = queue.size() - 1; i >= 0; i--) {
if (queue.get(i).commandType == type) {
queue.remove(i);
}

View file

@ -81,7 +81,7 @@ public class SWItem {
}
public static LinearLayout generateLayout(View view) {
LinearLayout layout = (LinearLayout) view.findViewById(view.getId());
LinearLayout layout = (LinearLayout) view;
layout.removeAllViews();
return layout;
}

View file

@ -21,6 +21,7 @@ public class AndroidPermission {
public static final int CASE_SMS = 0x2;
public static final int CASE_LOCATION = 0x3;
public static final int CASE_BATTERY = 0x4;
public static final int CASE_PHONESTATE = 0x5;
public static void askForPermission(Activity activity, String[] permission, Integer requestCode) {
boolean test = false;
@ -44,7 +45,7 @@ public class AndroidPermission {
}
public static synchronized void notifyForSMSPermissions(Activity activity) {
if (SP.getBoolean(R.string.smscommunicator_remotecommandsallowed, false)) {
if (SP.getBoolean(R.string.key_smscommunicator_remotecommandsallowed, false)) {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) {
if (!checkForPermission(activity, Manifest.permission.RECEIVE_SMS)) {
NotificationWithAction notification = new NotificationWithAction(Notification.PERMISSION_SMS, MainApp.gs(R.string.smscommunicator_missingsmspermission), Notification.URGENT);
@ -55,6 +56,16 @@ public class AndroidPermission {
} else
MainApp.bus().post(new EventDismissNotification(Notification.PERMISSION_SMS));
}
// Following is a bug in Android 8
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.O) {
if (!checkForPermission(activity, Manifest.permission.READ_PHONE_STATE)) {
NotificationWithAction notification = new NotificationWithAction(Notification.PERMISSION_PHONESTATE, MainApp.gs(R.string.smscommunicator_missingphonestatepermission), Notification.URGENT);
notification.action(MainApp.gs(R.string.request), () ->
AndroidPermission.askForPermission(activity, new String[]{Manifest.permission.READ_PHONE_STATE}, AndroidPermission.CASE_PHONESTATE));
MainApp.bus().post(new EventNewNotification(notification));
} else
MainApp.bus().post(new EventDismissNotification(Notification.PERMISSION_PHONESTATE));
}
}
}

View file

@ -110,12 +110,13 @@ public class FabricPrivacy {
CustomEvent pluginStats = new CustomEvent("PluginStats");
pluginStats.putCustomAttribute("version", BuildConfig.VERSION);
pluginStats.putCustomAttribute("HEAD", BuildConfig.HEAD);
pluginStats.putCustomAttribute("language", SP.getString(R.string.key_language,"default"));
for (PluginBase plugin : MainApp.getPluginsList()) {
if (!plugin.pluginDescription.alwaysEnabled) {
if (plugin.isEnabled(plugin.getType()))
pluginStats.putCustomAttribute(plugin.getClass().getSimpleName(), "enabled");
else
pluginStats.putCustomAttribute(plugin.getClass().getSimpleName(), "disabled");
if (plugin.isEnabled(plugin.getType()) && !plugin.pluginDescription.alwaysEnabled) {
// Fabric allows no more than 20 attributes attached to an event. By reporting disabled plugins as
// well, we would exceed that threshold, so only report what is enabled
// TODO >2.0: consider reworking this to upload an event per enabled plugin instead.
pluginStats.putCustomAttribute(plugin.getClass().getSimpleName(), "enabled");
}
}

View file

@ -22,7 +22,7 @@ public class JsonHelper {
public static Object safeGetObject(JSONObject json, String fieldName, Object defaultValue) {
Object result = defaultValue;
if (json.has(fieldName)) {
if (json != null && json.has(fieldName)) {
try {
result = json.get(fieldName);
} catch (JSONException ignored) {
@ -36,7 +36,7 @@ public class JsonHelper {
public static String safeGetString(JSONObject json, String fieldName) {
String result = null;
if (json.has(fieldName)) {
if (json != null && json.has(fieldName)) {
try {
result = json.getString(fieldName);
} catch (JSONException ignored) {
@ -49,7 +49,7 @@ public class JsonHelper {
public static String safeGetString(JSONObject json, String fieldName, String defaultValue) {
String result = defaultValue;
if (json.has(fieldName)) {
if (json != null && json.has(fieldName)) {
try {
result = json.getString(fieldName);
} catch (JSONException ignored) {
@ -62,7 +62,7 @@ public class JsonHelper {
public static double safeGetDouble(JSONObject json, String fieldName) {
double result = 0d;
if (json.has(fieldName)) {
if (json != null && json.has(fieldName)) {
try {
result = json.getDouble(fieldName);
} catch (JSONException ignored) {
@ -75,7 +75,7 @@ public class JsonHelper {
public static int safeGetInt(JSONObject json, String fieldName) {
int result = 0;
if (json.has(fieldName)) {
if (json != null && json.has(fieldName)) {
try {
result = json.getInt(fieldName);
} catch (JSONException ignored) {
@ -88,7 +88,7 @@ public class JsonHelper {
public static long safeGetLong(JSONObject json, String fieldName) {
long result = 0;
if (json.has(fieldName)) {
if (json != null && json.has(fieldName)) {
try {
result = json.getLong(fieldName);
} catch (JSONException e) {
@ -101,7 +101,7 @@ public class JsonHelper {
public static boolean safeGetBoolean(JSONObject json, String fieldName) {
boolean result = false;
if (json.has(fieldName)) {
if (json != null && json.has(fieldName)) {
try {
result = json.getBoolean(fieldName);
} catch (JSONException e) {

View file

@ -0,0 +1,43 @@
package info.nightscout.utils;
import android.util.LongSparseArray;
import java.util.Calendar;
public class MidnightTime {
private static LongSparseArray times = new LongSparseArray();
private static long hits = 0;
private static long misses = 0;
public static long calc() {
Calendar c = Calendar.getInstance();
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
return c.getTimeInMillis();
}
public static long calc(long time) {
Long m = (Long) times.get(time);
if (m != null) {
++hits;
return m;
}
Calendar c = Calendar.getInstance();
c.setTimeInMillis(time);
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
m = c.getTimeInMillis();
times.append(time, m);
++misses;
return m;
}
public static String log() {
return "Hits: " + hits + " misses: " + misses + " stored: " + times.size();
}
}

View file

@ -8,23 +8,15 @@ import java.util.regex.Pattern;
*/
public class PercentageSplitter {
// "Profile name (200%,2h)"
private static final Pattern percentagePattern = Pattern.compile("(.+)\\(\\d+%,\\d+h\\)");
// "Profile name (200%)"
private static final Pattern percentageShiftPattern = Pattern.compile("(.+)\\(\\d+%\\)");
// Matches "Profile name (200%,-2h)", "Profile name (50%)
private static final Pattern splitPattern = Pattern.compile("(.+)\\(\\d+%(,-?\\d+h)?\\)");
/** Removes the suffix for percentage and timeshift from a profile name. */
/** Removes the suffix for percentage and timeshift from a profile name. This is the inverse of what
* {@link info.nightscout.androidaps.db.ProfileSwitch#getCustomizedName()} does.
* Since the customized name is used for the PS upload to NS, this is needed get the original profile name
* when retrieving the PS from NS again. */
public static String pureName(String name) {
Matcher percentageMatch = percentagePattern.matcher(name);
if (percentageMatch.find()) {
return percentageMatch.group(1).trim();
}
Matcher percentageShiftMatch = percentageShiftPattern.matcher(name);
if (percentageShiftMatch.find()) {
return percentageShiftMatch.group(1).trim();
}
return name;
Matcher percentageMatch = splitPattern.matcher(name);
return percentageMatch.find() ? percentageMatch.group(1).trim() : name;
}
}

View file

@ -11,6 +11,7 @@ public class SafeParse {
public static Double stringToDouble(String input) {
Double result = 0d;
input = input.replace(",", ".");
input = input.replace("", "-");
if (input.equals(""))
return 0d;
try {
@ -24,6 +25,7 @@ public class SafeParse {
public static Integer stringToInt(String input) {
Integer result = 0;
input = input.replace(",", ".");
input = input.replace("", "-");
if (input.equals(""))
return 0;
try {
@ -37,6 +39,7 @@ public class SafeParse {
public static Long stringToLong(String input) {
Long result = 0L;
input = input.replace(",", ".");
input = input.replace("", "-");
if (input.equals(""))
return 0L;
try {

View file

@ -345,6 +345,42 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="end"
android:paddingRight="5dp"
android:text=""
android:textSize="14sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:layout_weight="0"
android:gravity="center_horizontal"
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/profileview_basaltotal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="17dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
<info.nightscout.androidaps.plugins.Treatments.fragments.ProfileGraph
android:id="@+id/basal_graph"
android:layout_width="match_parent"

View file

@ -1,3 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources></resources>
<resources>
<string name="alert_w31">Waarskuwing W31: Kasset laag</string>
<string name="alert_w32">Waarskuwing W32: Battery laag</string>
<string name="alert_w33">Waarskuwing W33: Ongeldige tyd/datum</string>
<string name="alert_w34">Waakskuwing W34: Einde van waarborg</string>
<string name="alert_w36">Waarskuwing W36: TBR gekanselleer</string>
<string name="alert_w38">Waarskuwing W38: Bolus gekanselleer</string>
<string name="alert_w39">Waarskuwing W39: Leentyd waarskuwing</string>
<string name="alert_m20">Onderhoud M20: Kasset nie ingevoeg</string>
<string name="alert_m21">Onderhoud M21: kasset leeg</string>
<string name="alert_m22">Onderhoud M22: Battery leeg</string>
<string name="alert_m23">Onderhoud M23: Outomaties af</string>
<string name="alert_m24">Onderhoud M24: verstopping</string>
<string name="alert_m25">Onderhoud M25: Leentyd oor - einde van bewerking</string>
<string name="alert_m26">Onderhoud M26: Kasset-verandering nie voltooi nie</string>
<string name="alert_m27">Onderhoud M27: Data aflaai het misluk</string>
<string name="alert_m28">Onderhoud M28: Wag-modus uit tyd uit</string>
<string name="alert_m29">Onderhoud M29: Battery-tipe nie voltooi nie</string>
<string name="alert_m30">Onderhoud M30: Kasset-tipe nie voltooi nie</string>
<string name="alert_e6">Fout E6: Meganiese fout</string>
<string name="alert_e7">Fout E7: Elektroniese fout</string>
<string name="alert_e10">Fout E10: Terugdraai fout</string>
<string name="alert_e13">Fout E13: Taal fout</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Предупреждение за W31: Празен резервоар</string>
<string name="alert_w32">Предупреждение W32: Изтощена батерия</string>
<string name="alert_w33">Предупреждение W33: Невалиден час/дата</string>
<string name="alert_w34">Предупреждение за W34: Край на гаранция</string>
<string name="alert_w36">Предупреждение за W36: Временен базал отменен</string>
<string name="alert_w38">Предупреждение за W38: Болус отказан</string>
<string name="alert_w39">Предупреждение за W39: Loantime предупреждение</string>
<string name="alert_m20">Поддръжка M20: Резервоарът не е поставен</string>
<string name="alert_m21">Поддръжка M21: Резервоарът е празен</string>
<string name="alert_m22">Поддръжка M22: Батерията е изтощена</string>
<string name="alert_m23">Поддръжка M23: Автоматично изключване</string>
<string name="alert_m24">Поддръжка М24: Запушване</string>
<string name="alert_m25">Поддръжка M25: Loantime приключи - край на операцията</string>
<string name="alert_m26">Поддръжка M26: Смяната на резервоар не е завършена</string>
<string name="alert_m27">Поддръжка M27: Неуспешно изтегляне данни</string>
<string name="alert_m28">Поддръжка Месие 28: Режим пауза - таймаут</string>
<string name="alert_m29">Поддръжка M29: Незададен тип батерия</string>
<string name="alert_m30">Поддръжка M30: Незададен тип резетвоар</string>
<string name="alert_e6">Грешка E6: Механична грешка</string>
<string name="alert_e7">Грешка E7: Гешка в електрониката</string>
<string name="alert_e10">Грешка E10: Грешка в превъртането</string>
<string name="alert_e13">Грешка E13: Езикова грешка</string>
<string name="alert_w31">Предупреждение за W31: Празен резервоар</string>
<string name="alert_w32">Предупреждение W32: Изтощена батерия</string>
<string name="alert_w33">Предупреждение W33: Невалиден час/дата</string>
<string name="alert_w34">Предупреждение за W34: Край на гаранция</string>
<string name="alert_w36">Предупреждение за W36: Временен базал отменен</string>
<string name="alert_w38">Предупреждение за W38: Болус отказан</string>
<string name="alert_w39">Предупреждение за W39: Loantime предупреждение</string>
<string name="alert_m20">Поддръжка M20: Резервоарът не е поставен</string>
<string name="alert_m21">Поддръжка M21: Резервоарът е празен</string>
<string name="alert_m22">Поддръжка M22: Батерията е изтощена</string>
<string name="alert_m23">Поддръжка M23: Автоматично изключване</string>
<string name="alert_m24">Поддръжка М24: Запушване</string>
<string name="alert_m25">Поддръжка M25: Loantime приключи - край на операцията</string>
<string name="alert_m26">Поддръжка M26: Смяната на резервоар не е завършена</string>
<string name="alert_m27">Поддръжка M27: Неуспешно изтегляне данни</string>
<string name="alert_m28">Поддръжка Месие 28: Режим пауза - таймаут</string>
<string name="alert_m29">Поддръжка M29: Незададен тип батерия</string>
<string name="alert_m30">Поддръжка M30: Незададен тип резетвоар</string>
<string name="alert_e6">Грешка E6: Механична грешка</string>
<string name="alert_e7">Грешка E7: Гешка в електрониката</string>
<string name="alert_e10">Грешка E10: Грешка в превъртането</string>
<string name="alert_e13">Грешка E13: Езикова грешка</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Varování W31: Zásobník</string>
<string name="alert_w32">Varování W32: Nízký stav baterie</string>
<string name="alert_w33">Varování W33: Neplatný čas/datum</string>
<string name="alert_w34">Varování W34: Konec záruky</string>
<string name="alert_w36">Varování W36: Dočasný bazál zrušen</string>
<string name="alert_w38">Varování W38: Bolus zrušen</string>
<string name="alert_w39">Varování W39: Varování doba výpůjčky</string>
<string name="alert_m20">Údržba M20: Není vložen zásobník</string>
<string name="alert_m21">Údržba M21: Prázdný zásobník</string>
<string name="alert_m22">Údržba M22: Vybitá baterie</string>
<string name="alert_m23">Údržba M23: Automatické vypnutí</string>
<string name="alert_m24">Údržba M24: Okluze</string>
<string name="alert_m25">Údržba M25: Doba vypůjčení vypršela - ukončení provozu</string>
<string name="alert_m26">Údržba M26: Výměna zásobníku nedokončena</string>
<string name="alert_m27">Údržba M27: Stahování se nezdařilo</string>
<string name="alert_m28">Údržba M28: Časový limit režimu pauza</string>
<string name="alert_m29">Údržba M29: Nenastavený typ baterie</string>
<string name="alert_m30">Údržba M30: Nenastavený typ zásobníku</string>
<string name="alert_e6">Chyba E6: Mechanická chyba</string>
<string name="alert_e7">Chyba E7: Elektronická chyba</string>
<string name="alert_e10">Chyba E10: Chyba převinutí</string>
<string name="alert_e13">Chyba E13: Chyba jazyka</string>
<string name="alert_w31">Varování W31: Zásobník</string>
<string name="alert_w32">Varování W32: Nízký stav baterie</string>
<string name="alert_w33">Varování W33: Neplatný čas/datum</string>
<string name="alert_w34">Varování W34: Konec záruky</string>
<string name="alert_w36">Varování W36: Dočasný bazál zrušen</string>
<string name="alert_w38">Varování W38: Bolus zrušen</string>
<string name="alert_w39">Varování W39: Varování doba výpůjčky</string>
<string name="alert_m20">Údržba M20: Není vložen zásobník</string>
<string name="alert_m21">Údržba M21: Prázdný zásobník</string>
<string name="alert_m22">Údržba M22: Vybitá baterie</string>
<string name="alert_m23">Údržba M23: Automatické vypnutí</string>
<string name="alert_m24">Údržba M24: Okluze</string>
<string name="alert_m25">Údržba M25: Doba vypůjčení vypršela - ukončení provozu</string>
<string name="alert_m26">Údržba M26: Výměna zásobníku nedokončena</string>
<string name="alert_m27">Údržba M27: Stahování se nezdařilo</string>
<string name="alert_m28">Údržba M28: Časový limit režimu pauza</string>
<string name="alert_m29">Údržba M29: Nenastavený typ baterie</string>
<string name="alert_m30">Údržba M30: Nenastavený typ zásobníku</string>
<string name="alert_e6">Chyba E6: Mechanická chyba</string>
<string name="alert_e7">Chyba E7: Elektronická chyba</string>
<string name="alert_e10">Chyba E10: Chyba převinutí</string>
<string name="alert_e13">Chyba E13: Chyba jazyka</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Warnung W31: Ampulle fast leer</string>
<string name="alert_w32">Warnung W32: Batterie fast leer</string>
<string name="alert_w33">Warnung W33: Zeit/Datum ungültig</string>
<string name="alert_w34">Warnung W34: Garantie abgelaufen</string>
<string name="alert_w36">Warnung W36: TBR abgebrochen</string>
<string name="alert_w38">Warnung W38: Bolus abgebrochen</string>
<string name="alert_w39">Warnung W39: Leihdauer-Warnung</string>
<string name="alert_m20">Wartung M20: Keine Ampulle eingesetzt</string>
<string name="alert_m21">Wartung M21: Ampulle leer</string>
<string name="alert_m22">Wartung M22: Batterie leer</string>
<string name="alert_m23">Wartung M23: Sicherheitsabschaltung</string>
<string name="alert_m24">Wartung M24: Verstopfung</string>
<string name="alert_m25">Wartung M25: Leihdauer abgelaufen</string>
<string name="alert_m26">Wartung M26: Ampullenwechsel nicht abgeschlossen</string>
<string name="alert_m27">Wartung M27: Datenübertragung fehlgeschlagen</string>
<string name="alert_m28">Wartung M28: Zeitüberschreitung bei Pause</string>
<string name="alert_m29">Wartung M29: Batterietyp nicht eingestellt</string>
<string name="alert_m30">Wartung M30: Ampullentyp nicht eingestellt</string>
<string name="alert_e6">Fehler E6: Mechanikfehler</string>
<string name="alert_e7">Fehler E7: Elektronikfehler</string>
<string name="alert_e10">Fehler E10: Fehler beim Zurückfahren</string>
<string name="alert_e13">Fehler E13: Fehler in der Sprachanzeige</string>
<string name="alert_w31">Warnung W31: Ampulle fast leer</string>
<string name="alert_w32">Warnung W32: Batterie fast leer</string>
<string name="alert_w33">Warnung W33: Zeit/Datum ungültig</string>
<string name="alert_w34">Warnung W34: Garantie abgelaufen</string>
<string name="alert_w36">Warnung W36: TBR abgebrochen</string>
<string name="alert_w38">Warnung W38: Bolus abgebrochen</string>
<string name="alert_w39">Warnung W39: Leihdauer-Warnung</string>
<string name="alert_m20">Wartung M20: Keine Ampulle eingesetzt</string>
<string name="alert_m21">Wartung M21: Ampulle leer</string>
<string name="alert_m22">Wartung M22: Batterie leer</string>
<string name="alert_m23">Wartung M23: Sicherheitsabschaltung</string>
<string name="alert_m24">Wartung M24: Verstopfung</string>
<string name="alert_m25">Wartung M25: Leihdauer abgelaufen</string>
<string name="alert_m26">Wartung M26: Ampullenwechsel nicht abgeschlossen</string>
<string name="alert_m27">Wartung M27: Datenübertragung fehlgeschlagen</string>
<string name="alert_m28">Wartung M28: Zeitüberschreitung bei Pause</string>
<string name="alert_m29">Wartung M29: Batterietyp nicht eingestellt</string>
<string name="alert_m30">Wartung M30: Ampullentyp nicht eingestellt</string>
<string name="alert_e6">Fehler E6: Mechanikfehler</string>
<string name="alert_e7">Fehler E7: Elektronikfehler</string>
<string name="alert_e10">Fehler E10: Fehler beim Zurückfahren</string>
<string name="alert_e13">Fehler E13: Fehler in der Sprachanzeige</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Ειδοποίηση W31: Χαμηλή αμπούλα</string>
<string name="alert_w32">Ειδοποίηση W32: Χαμηλή μπαταρία</string>
<string name="alert_w33">Ειδοποίηση W33: Μη έγκυρη ώρα/ημερομηνία</string>
<string name="alert_w34">Ειδοποίηση W34: Λήξη εγγύησης</string>
<string name="alert_w36">Ειδοποίηση W36: Ακύρωση TBR</string>
<string name="alert_w38">Ειδοποίηση W38: Ακύρωση bolus</string>
<string name="alert_w39">Ειδοποίηση W39: Ειδοποίηση διάρκειας</string>
<string name="alert_m20">Συντήρηση M20: Η αμπούλα δεν έχει τοποθετηθεί</string>
<string name="alert_m21">Συντήρηση M21: Αμπούλα άδεια</string>
<string name="alert_m22">Συντήρηση M22: Μπαταρία άδεια</string>
<string name="alert_m23">Συντήρηση Μ23: Αυτόματη απενεργοποίηση</string>
<string name="alert_m24">Συντήρηση M24: Έμφραξη</string>
<string name="alert_m25">Συντήρηση M25: Διάρκεια τέλος - τέλος της λειτουργίας</string>
<string name="alert_m26">Συντήρηση M26: Η αλλαγή αμπούλας δεν έχει ολοκληρωθεί</string>
<string name="alert_m27">Συντήρηση Μ27: Απέτυχε η λήψη δεδομένων</string>
<string name="alert_m28">Συντήρηση M28: Λειτουργία παύσης έληξε</string>
<string name="alert_m29">Συντήρηση M29: Ο τύπος μπαταρίας δεν ταιριάζει</string>
<string name="alert_m30">Συντήρηση M30: Ο τύπος αμπούλας δεν ταιριάζει</string>
<string name="alert_e6">Σφάλμα Ε6: Μηχανικό σφάλμα</string>
<string name="alert_e7">Σφάλμα Ε7: Ηλεκτρονικό σφάλμα</string>
<string name="alert_e10">Σφάλματος E10: Σφάλμα Rewind</string>
<string name="alert_e13">Σφάλματος E13: Λάθος γλώσσα</string>
<string name="alert_w31">Ειδοποίηση W31: Χαμηλή αμπούλα</string>
<string name="alert_w32">Ειδοποίηση W32: Χαμηλή μπαταρία</string>
<string name="alert_w33">Ειδοποίηση W33: Μη έγκυρη ώρα/ημερομηνία</string>
<string name="alert_w34">Ειδοποίηση W34: Λήξη εγγύησης</string>
<string name="alert_w36">Ειδοποίηση W36: Ακύρωση TBR</string>
<string name="alert_w38">Ειδοποίηση W38: Ακύρωση bolus</string>
<string name="alert_w39">Ειδοποίηση W39: Ειδοποίηση διάρκειας</string>
<string name="alert_m20">Συντήρηση M20: Η αμπούλα δεν έχει τοποθετηθεί</string>
<string name="alert_m21">Συντήρηση M21: Αμπούλα άδεια</string>
<string name="alert_m22">Συντήρηση M22: Μπαταρία άδεια</string>
<string name="alert_m23">Συντήρηση Μ23: Αυτόματη απενεργοποίηση</string>
<string name="alert_m24">Συντήρηση M24: Έμφραξη</string>
<string name="alert_m25">Συντήρηση M25: Διάρκεια τέλος - τέλος της λειτουργίας</string>
<string name="alert_m26">Συντήρηση M26: Η αλλαγή αμπούλας δεν έχει ολοκληρωθεί</string>
<string name="alert_m27">Συντήρηση Μ27: Απέτυχε η λήψη δεδομένων</string>
<string name="alert_m28">Συντήρηση M28: Λειτουργία παύσης έληξε</string>
<string name="alert_m29">Συντήρηση M29: Ο τύπος μπαταρίας δεν ταιριάζει</string>
<string name="alert_m30">Συντήρηση M30: Ο τύπος αμπούλας δεν ταιριάζει</string>
<string name="alert_e6">Σφάλμα Ε6: Μηχανικό σφάλμα</string>
<string name="alert_e7">Σφάλμα Ε7: Ηλεκτρονικό σφάλμα</string>
<string name="alert_e10">Σφάλματος E10: Σφάλμα Rewind</string>
<string name="alert_e13">Σφάλματος E13: Λάθος γλώσσα</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">ADVERTENCIA W31: Cartucho bajo</string>
<string name="alert_w32">ADVERTENCIA W32: Batería baja</string>
<string name="alert_w33">ADVERTENCIA W33: Fecha/Hora no válida</string>
<string name="alert_w34">ADVERTENCIA W34: Fin de la garantía</string>
<string name="alert_w36">ADVERTENCIA W36: TBR cancelada</string>
<string name="alert_w38">ADVERTENCIA W38: Bolo cancelado</string>
<string name="alert_w39">W39 Advertencia: Advertencia de tiempo préstamo</string>
<string name="alert_m20">Mantenimiento M20: Cartucho no insertado</string>
<string name="alert_m21">Mantenimiento M21: Cartucho vacío</string>
<string name="alert_m22">Mantenimiento M22: Batería vacía</string>
<string name="alert_m23">Mantenimiento M23: Apagado automático</string>
<string name="alert_m24">Mantenimiento M24: oclusión</string>
<string name="alert_m25">Mantenimiento M25: Tiempo préstamo finalizado - final de la operación</string>
<string name="alert_m26">Mantenimiento M26: Cambio de cartucho no completado</string>
<string name="alert_m27">Mantenimiento M27: Error de descarga de datos</string>
<string name="alert_m28">Mantenimiento M28: Tiempo de espera vencido</string>
<string name="alert_m29">Mantenimiento M29: Tipo de batería no establecido</string>
<string name="alert_m30">Mantenimiento M30: Tipo cartucho no establecido</string>
<string name="alert_e6">Error E6: Error mecánico</string>
<string name="alert_e7">Error E7: Error electrónico</string>
<string name="alert_e10">Error E10: Error de rebobinado</string>
<string name="alert_e13">Error E13: Error de lenguaje</string>
<string name="alert_w31">ADVERTENCIA W31: Cartucho bajo</string>
<string name="alert_w32">ADVERTENCIA W32: Batería baja</string>
<string name="alert_w33">ADVERTENCIA W33: Fecha/Hora no válida</string>
<string name="alert_w34">ADVERTENCIA W34: Fin de la garantía</string>
<string name="alert_w36">ADVERTENCIA W36: TBR cancelada</string>
<string name="alert_w38">ADVERTENCIA W38: Bolo cancelado</string>
<string name="alert_w39">W39 Advertencia: Advertencia de tiempo préstamo</string>
<string name="alert_m20">Mantenimiento M20: Cartucho no insertado</string>
<string name="alert_m21">Mantenimiento M21: Cartucho vacío</string>
<string name="alert_m22">Mantenimiento M22: Batería vacía</string>
<string name="alert_m23">Mantenimiento M23: Apagado automático</string>
<string name="alert_m24">Mantenimiento M24: oclusión</string>
<string name="alert_m25">Mantenimiento M25: Tiempo préstamo finalizado - final de la operación</string>
<string name="alert_m26">Mantenimiento M26: Cambio de cartucho no completado</string>
<string name="alert_m27">Mantenimiento M27: Error de descarga de datos</string>
<string name="alert_m28">Mantenimiento M28: Tiempo de espera vencido</string>
<string name="alert_m29">Mantenimiento M29: Tipo de batería no establecido</string>
<string name="alert_m30">Mantenimiento M30: Tipo cartucho no establecido</string>
<string name="alert_e6">Error E6: Error mecánico</string>
<string name="alert_e7">Error E7: Error electrónico</string>
<string name="alert_e10">Error E10: Error de rebobinado</string>
<string name="alert_e13">Error E13: Error de lenguaje</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Alerte W31 : Réservoir presque vide</string>
<string name="alert_w32">Alerte W32 : Batterie presque déchargée</string>
<string name="alert_w33">Avertissement W33 : Heure/date non valides</string>
<string name="alert_w34">Alerte W34 : Fin de garantie</string>
<string name="alert_w36">Alerte W36 : TBR annulé</string>
<string name="alert_w38">Alerte W38 : Bolus annulé</string>
<string name="alert_w39">Alerte W39 : Avertissement Loantime</string>
<string name="alert_m20">Maintenance M20 : Cartouche pas inséré</string>
<string name="alert_m21">Maintenance M21 : Cartouche vide</string>
<string name="alert_m22">Maintenance M22 : Batterie vide</string>
<string name="alert_m23">Maintenance M23 : Arrêt automatique</string>
<string name="alert_m24">Maintenance M24 : Occlusion</string>
<string name="alert_m25">Maintenance M25 : Loantime terminé - fin dopération</string>
<string name="alert_m26">Maintenance M26 : Changement de cartouche non terminé</string>
<string name="alert_m27">Maintenance M27 : Le téléchargement de données a échoué</string>
<string name="alert_m28">Maintenance M28 : Pause mode timeout</string>
<string name="alert_m29">Maintenance M29 : Type de batterie non défini</string>
<string name="alert_m30">Maintenance M30 : Réservoir type non défini</string>
<string name="alert_e6">Erreur E6 : Problème mécanique</string>
<string name="alert_e7">Erreur E7 : Problème d\'électronique</string>
<string name="alert_e10">Erreur E10 : Erreur de rembobinage</string>
<string name="alert_e13">Erreur E13 : Erreur de langage</string>
<string name="alert_w31">Alerte W31 : Réservoir presque vide</string>
<string name="alert_w32">Alerte W32 : Batterie presque déchargée</string>
<string name="alert_w33">Avertissement W33 : Heure/date non valides</string>
<string name="alert_w34">Alerte W34 : Fin de garantie</string>
<string name="alert_w36">Alerte W36 : TBR annulé</string>
<string name="alert_w38">Alerte W38 : Bolus annulé</string>
<string name="alert_w39">Alerte W39 : Avertissement Loantime</string>
<string name="alert_m20">Maintenance M20 : Cartouche pas inséré</string>
<string name="alert_m21">Maintenance M21 : Cartouche vide</string>
<string name="alert_m22">Maintenance M22 : Batterie vide</string>
<string name="alert_m23">Maintenance M23 : Arrêt automatique</string>
<string name="alert_m24">Maintenance M24 : Occlusion</string>
<string name="alert_m25">Maintenance M25 : Loantime terminé - fin dopération</string>
<string name="alert_m26">Maintenance M26 : Changement de cartouche non terminé</string>
<string name="alert_m27">Maintenance M27 : Le téléchargement de données a échoué</string>
<string name="alert_m28">Maintenance M28 : Pause mode timeout</string>
<string name="alert_m29">Maintenance M29 : Type de batterie non défini</string>
<string name="alert_m30">Maintenance M30 : Réservoir type non défini</string>
<string name="alert_e6">Erreur E6 : Problème mécanique</string>
<string name="alert_e7">Erreur E7 : Problème d\'électronique</string>
<string name="alert_e10">Erreur E10 : Erreur de rembobinage</string>
<string name="alert_e13">Erreur E13 : Erreur de langage</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="nav_refreshtreatments">רענן טיפול מ-Nightscout</string>
<string name="danar_useextended_title">השתמש בבולוס מורחב של 200%</string>
<string name="alert_dialog_storage_permission_text">בבקשה אתחל את הסמרטפון שלך או תרענן את אפלקצית AndroidAPS בהגדרות המערכת
<string name="nav_refreshtreatments">רענן טיפול מ-Nightscout</string>
<string name="danar_useextended_title">השתמש בבולוס מורחב של 200%</string>
<string name="alert_dialog_storage_permission_text">בבקשה אתחל את הסמרטפון שלך או תרענן את אפלקצית AndroidAPS בהגדרות המערכת
אחרת AndroidAPS לא יוכל לבצע רישום (חשוב לעקוב אחר ולוודא כי האלגוריתמים פועלים כראוי)!</string>
<string name="description_food">מציג את ההגדרות הקבועות מראש עבור מזון המוגדר ב-Nightscout</string>
<string name="description_loop">להפעיל או לכבות את הלולאה.</string>
<string name="description_ns_client">מסנכרן את הנתונים שלך עם Nightscout</string>
<string name="description_profile_nightscout">יבא פרופיל מ- Nightscout</string>
<string name="description_food">מציג את ההגדרות הקבועות מראש עבור מזון המוגדר ב-Nightscout</string>
<string name="description_loop">להפעיל או לכבות את הלולאה.</string>
<string name="description_ns_client">מסנכרן את הנתונים שלך עם Nightscout</string>
<string name="description_profile_nightscout">יבא פרופיל מ- Nightscout</string>
</resources>

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Avviso W31: Cartuccia in esaurimento</string>
<string name="alert_w32">Avviso W32: Batteria bassa</string>
<string name="alert_w33">W33 avviso: Data/ora non valido</string>
<string name="alert_w34">W34 avviso: Fine della garanzia</string>
<string name="alert_w36">Avviso W36: TBR annullato</string>
<string name="alert_w38">Avviso W38: Bolo annullato</string>
<string name="alert_w39">Avviso W39: Avviso Loantime</string>
<string name="alert_m20">Manutenzione M20: Cartuccia non inserita</string>
<string name="alert_m21">Manutenzione M21: Cartuccia vuota</string>
<string name="alert_m22">Manutenzione M22: Batteria scarica</string>
<string name="alert_m23">Manutenzione M23: Spegnimento automatico</string>
<string name="alert_m24">Manutenzione M24: occlusione</string>
<string name="alert_m25">Manutenzione M25: Loantime sopra - fine dell\'operazione</string>
<string name="alert_m26">Manutenzione M26: Sostituzione cartuccia non completata</string>
<string name="alert_m27">Manutenzione M27: Download dati fallito</string>
<string name="alert_m28">Manutenzione M28: Timeout modalità pausa</string>
<string name="alert_m29">Manutenzione M29: Tipo di batteria non impostata</string>
<string name="alert_m30">Manutenzione M30: Tipo di cartuccia non impostata</string>
<string name="alert_e6">Errore E6: Errore meccanico</string>
<string name="alert_e7">E7 errore: Errore elettronico</string>
<string name="alert_e10">Errore E10: Errore Rewind</string>
<string name="alert_e13">Errore E13: Errore lingua</string>
<string name="alert_w31">Avviso W31: Cartuccia in esaurimento</string>
<string name="alert_w32">Avviso W32: Batteria bassa</string>
<string name="alert_w33">W33 avviso: Data/ora non valido</string>
<string name="alert_w34">W34 avviso: Fine della garanzia</string>
<string name="alert_w36">Avviso W36: TBR annullato</string>
<string name="alert_w38">Avviso W38: Bolo annullato</string>
<string name="alert_w39">Avviso W39: Avviso Loantime</string>
<string name="alert_m20">Manutenzione M20: Cartuccia non inserita</string>
<string name="alert_m21">Manutenzione M21: Cartuccia vuota</string>
<string name="alert_m22">Manutenzione M22: Batteria scarica</string>
<string name="alert_m23">Manutenzione M23: Spegnimento automatico</string>
<string name="alert_m24">Manutenzione M24: occlusione</string>
<string name="alert_m25">Manutenzione M25: Loantime sopra - fine dell\'operazione</string>
<string name="alert_m26">Manutenzione M26: Sostituzione cartuccia non completata</string>
<string name="alert_m27">Manutenzione M27: Download dati fallito</string>
<string name="alert_m28">Manutenzione M28: Timeout modalità pausa</string>
<string name="alert_m29">Manutenzione M29: Tipo di batteria non impostata</string>
<string name="alert_m30">Manutenzione M30: Tipo di cartuccia non impostata</string>
<string name="alert_e6">Errore E6: Errore meccanico</string>
<string name="alert_e7">E7 errore: Errore elettronico</string>
<string name="alert_e10">Errore E10: Errore Rewind</string>
<string name="alert_e13">Errore E13: Errore lingua</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources></resources>

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources></resources>

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">경고 W31: 주사기양 낮음</string>
<string name="alert_w32">경고 W32: 배터리양 낮음</string>
<string name="alert_w33">경고 W33: 시간/날짜 유효하지 않음</string>
<string name="alert_w34">경고 W34: 보증만료</string>
<string name="alert_w36">경고 W36: 임시Basal 취소</string>
<string name="alert_w38">경고 W38: Bolus 취소</string>
<string name="alert_w39">경고 W39: Loantime 경고</string>
<string name="alert_m20">정비 M20: 주사기가 삽입되지 않았습니다.</string>
<string name="alert_m21">정비 M21: 주사기가 비었습니다.</string>
<string name="alert_m22">정비 M22: 배터리가 방전되었습니다.</string>
<string name="alert_m23">정비 M23: 자동 OFF</string>
<string name="alert_m24">정비 M24: 막힘</string>
<string name="alert_m25">정비 M25: Loantime 종료 - 작업 종료</string>
<string name="alert_m26">정비 M26: 주사기 교체가 완료되지 않았습니다.</string>
<string name="alert_m27">정비 M27: 데이터 다운로드가 실패하였습니다.</string>
<string name="alert_m28">정비 M28: 일시정지모드 시간만료</string>
<string name="alert_m29">정비 M29: 배터리 타입이 설정되지 않았습니다.</string>
<string name="alert_m30">정비 M30: 주사기 타입이 설정되지 않았습니다.</string>
<string name="alert_e6">에러 E6: 기계적 에러</string>
<string name="alert_e7">에러 E7: 전기적 에러</string>
<string name="alert_e10">에러 E10: Rewind 에러</string>
<string name="alert_e13">에러 E13: 언어 에러</string>
<string name="alert_w31">경고 W31: 주사기양 낮음</string>
<string name="alert_w32">경고 W32: 배터리양 낮음</string>
<string name="alert_w33">경고 W33: 시간/날짜 유효하지 않음</string>
<string name="alert_w34">경고 W34: 보증만료</string>
<string name="alert_w36">경고 W36: 임시Basal 취소</string>
<string name="alert_w38">경고 W38: Bolus 취소</string>
<string name="alert_w39">경고 W39: Loantime 경고</string>
<string name="alert_m20">정비 M20: 주사기가 삽입되지 않았습니다.</string>
<string name="alert_m21">정비 M21: 주사기가 비었습니다.</string>
<string name="alert_m22">정비 M22: 배터리가 방전되었습니다.</string>
<string name="alert_m23">정비 M23: 자동 OFF</string>
<string name="alert_m24">정비 M24: 막힘</string>
<string name="alert_m25">정비 M25: Loantime 종료 - 작업 종료</string>
<string name="alert_m26">정비 M26: 주사기 교체가 완료되지 않았습니다.</string>
<string name="alert_m27">정비 M27: 데이터 다운로드가 실패하였습니다.</string>
<string name="alert_m28">정비 M28: 일시정지모드 시간만료</string>
<string name="alert_m29">정비 M29: 배터리 타입이 설정되지 않았습니다.</string>
<string name="alert_m30">정비 M30: 주사기 타입이 설정되지 않았습니다.</string>
<string name="alert_e6">에러 E6: 기계적 에러</string>
<string name="alert_e7">에러 E7: 전기적 에러</string>
<string name="alert_e10">에러 E10: Rewind 에러</string>
<string name="alert_e13">에러 E13: 언어 에러</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Waarschuwing W31: Cartridge bijna leeg</string>
<string name="alert_w32">Waarschuwing W32: Batterij bijna leeg</string>
<string name="alert_w33">Waarschuwing W33: Onjuiste tijd/datum</string>
<string name="alert_w34">Waarschuwing W34: Einde van garantie</string>
<string name="alert_w36">Waarschuwing W36: TBR geannuleerd</string>
<string name="alert_w38">Waarschuwing W38: Bolus geannuleerd</string>
<string name="alert_w39">Waarschuwing W39: Leentijd waarschuwing</string>
<string name="alert_m20">Onderhoud M20: Cartridge niet geplaatst</string>
<string name="alert_m21">Onderhoud M21: Cartridge leeg</string>
<string name="alert_m22">Onderhoud M22: Batterij leeg</string>
<string name="alert_m23">Onderhoud M23: Automatisch uit</string>
<string name="alert_m24">Onderhoud M24: Verstopping</string>
<string name="alert_m25">Onderhoud M25: Leentijd verstreken - werking geëindigd</string>
<string name="alert_m26">Onderhoud M26: Cartridge verwisselen niet afgerond</string>
<string name="alert_m27">Onderhoud M27: Data download mislukt</string>
<string name="alert_m28">Onderhoud M28: Pauze modus timeout</string>
<string name="alert_m29">Onderhoud M29: Batterij type niet ingesteld</string>
<string name="alert_m30">Onderhoud M30: Cartridge type niet ingesteld</string>
<string name="alert_e6">Fout E6: Mechanische fout</string>
<string name="alert_e7">Fout E7: Elektronische fout</string>
<string name="alert_e10">Fout E10: Terugdraaien fout</string>
<string name="alert_e13">Fout E13: Taal fout</string>
<string name="alert_w31">Waarschuwing W31: Cartridge bijna leeg</string>
<string name="alert_w32">Waarschuwing W32: Batterij bijna leeg</string>
<string name="alert_w33">Waarschuwing W33: Onjuiste tijd/datum</string>
<string name="alert_w34">Waarschuwing W34: Einde van garantie</string>
<string name="alert_w36">Waarschuwing W36: TBR geannuleerd</string>
<string name="alert_w38">Waarschuwing W38: Bolus geannuleerd</string>
<string name="alert_w39">Waarschuwing W39: Leentijd waarschuwing</string>
<string name="alert_m20">Onderhoud M20: Cartridge niet geplaatst</string>
<string name="alert_m21">Onderhoud M21: Cartridge leeg</string>
<string name="alert_m22">Onderhoud M22: Batterij leeg</string>
<string name="alert_m23">Onderhoud M23: Automatisch uit</string>
<string name="alert_m24">Onderhoud M24: Verstopping</string>
<string name="alert_m25">Onderhoud M25: Leentijd verstreken - werking geëindigd</string>
<string name="alert_m26">Onderhoud M26: Cartridge verwisselen niet afgerond</string>
<string name="alert_m27">Onderhoud M27: Data download mislukt</string>
<string name="alert_m28">Onderhoud M28: Pauze modus timeout</string>
<string name="alert_m29">Onderhoud M29: Batterij type niet ingesteld</string>
<string name="alert_m30">Onderhoud M30: Cartridge type niet ingesteld</string>
<string name="alert_e6">Fout E6: Mechanische fout</string>
<string name="alert_e7">Fout E7: Elektronische fout</string>
<string name="alert_e10">Fout E10: Terugdraaien fout</string>
<string name="alert_e13">Fout E13: Taal fout</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Ostrzeżenie W31: Niski poziom insuliny</string>
<string name="alert_w32">Ostrzeżenie W32: Niski stan baterii</string>
<string name="alert_w33">Ostrzeżenie W33: Nieprawidłowa godzina/data</string>
<string name="alert_w34">Ostrzeżenie W34: Koniec gwarancji</string>
<string name="alert_w36">Ostrzeżenie W36: Anulowana baza tymczasowa [TBR]</string>
<string name="alert_w38">Ostrzeżenie W38: Bolus anulowany</string>
<string name="alert_w39">Ostrzeżenie W39: ostrzeżenie o użyczonym/przyznanym czasie</string>
<string name="alert_m20">Konserwacja M20: Brak pojemnika na isulinę</string>
<string name="alert_m21">Konserwacja M21: Pusty zbiornik na insulinę</string>
<string name="alert_m22">Konserwacja M22: Koniec baterii</string>
<string name="alert_m23">Konserwacja M23: Wyłącz automatycznie</string>
<string name="alert_m24">Konserwacja M24: Niedrożność</string>
<string name="alert_m25">Obsługa M25: koniec użyczonego czasu - koniec działania</string>
<string name="alert_m26">Konserwacja M26: Nie zakończono wymiany zbiornika</string>
<string name="alert_m27">Konserwacja M27: Błąd pobierania danych</string>
<string name="alert_m28">Obsługa M28: koniec czasu trybu pauza</string>
<string name="alert_m29">Konserwacja M29: Nie wybrano rodzaju baterii</string>
<string name="alert_m30">Konserwacja M30: Nie ustawiono rodzaju pojemnika</string>
<string name="alert_e6">Błąd E6: Usterka mechaniczna</string>
<string name="alert_e7">Błąd E7: Usterka elektroniczna</string>
<string name="alert_e10">Błąd E10: Usterka przewijania</string>
<string name="alert_e13">Błąd E6: Błąd języka</string>
<string name="alert_w31">Ostrzeżenie W31: Niski poziom insuliny</string>
<string name="alert_w32">Ostrzeżenie W32: Niski stan baterii</string>
<string name="alert_w33">Ostrzeżenie W33: Nieprawidłowa godzina/data</string>
<string name="alert_w34">Ostrzeżenie W34: Koniec gwarancji</string>
<string name="alert_w36">Ostrzeżenie W36: Anulowana baza tymczasowa [TBR]</string>
<string name="alert_w38">Ostrzeżenie W38: Bolus anulowany</string>
<string name="alert_w39">Ostrzeżenie W39: ostrzeżenie o użyczonym/przyznanym czasie</string>
<string name="alert_m20">Konserwacja M20: Brak pojemnika na isulinę</string>
<string name="alert_m21">Konserwacja M21: Pusty zbiornik na insulinę</string>
<string name="alert_m22">Konserwacja M22: Koniec baterii</string>
<string name="alert_m23">Konserwacja M23: Wyłącz automatycznie</string>
<string name="alert_m24">Konserwacja M24: Niedrożność</string>
<string name="alert_m25">Obsługa M25: koniec użyczonego czasu - koniec działania</string>
<string name="alert_m26">Konserwacja M26: Nie zakończono wymiany zbiornika</string>
<string name="alert_m27">Konserwacja M27: Błąd pobierania danych</string>
<string name="alert_m28">Obsługa M28: koniec czasu trybu pauza</string>
<string name="alert_m29">Konserwacja M29: Nie wybrano rodzaju baterii</string>
<string name="alert_m30">Konserwacja M30: Nie ustawiono rodzaju pojemnika</string>
<string name="alert_e6">Błąd E6: Usterka mechaniczna</string>
<string name="alert_e7">Błąd E7: Usterka elektroniczna</string>
<string name="alert_e10">Błąd E10: Usterka przewijania</string>
<string name="alert_e13">Błąd E6: Błąd języka</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Alerta W31: Cartucho com pouca insulina</string>
<string name="alert_w32">Aviso W32: Bateria baixa</string>
<string name="alert_w33">Aviso W33: Data/hora inválida</string>
<string name="alert_w34">Aviso W34: Fim da garantia</string>
<string name="alert_w36">W36 aviso: DTB cancelada</string>
<string name="alert_w38">Aviso W38: Bolus cancelado</string>
<string name="alert_w39">Alerta W39: Alerta Tempo de Empréstimo</string>
<string name="alert_m20">Manutenção M20: Cartucho não inserido</string>
<string name="alert_m21">Manutenção M21: Cartucho vazio</string>
<string name="alert_m22">Manutenção M22: Bateria vazia</string>
<string name="alert_m23">Manutenção M23: Desligar automático</string>
<string name="alert_m24">Manutenção M24: Oclusão</string>
<string name="alert_m25">Manutenção M25: Tempo de empréstimo expirado - operação finalizada</string>
<string name="alert_m26">Manutenção M26: Mudança de cartucho não concluída</string>
<string name="alert_m27">Manutenção M27: Transferência de dados falhada</string>
<string name="alert_m28">Manutenção M28: Tempo pausa expirado</string>
<string name="alert_m29">Manutenção M29: Tipo de bateria não definido</string>
<string name="alert_m30">Manutenção M30: Tipo de cartucho não definido</string>
<string name="alert_e6">E6 de erro: Erro mecânico</string>
<string name="alert_e7">E7 de erro: Erro electrónico</string>
<string name="alert_e10">Erro E10: Erro a recuar embolo</string>
<string name="alert_e13">E13 de erro: Erro de idioma</string>
<string name="alert_w31">Alerta W31: Cartucho com pouca insulina</string>
<string name="alert_w32">Aviso W32: Bateria baixa</string>
<string name="alert_w33">Aviso W33: Data/hora inválida</string>
<string name="alert_w34">Aviso W34: Fim da garantia</string>
<string name="alert_w36">W36 aviso: DTB cancelada</string>
<string name="alert_w38">Aviso W38: Bolus cancelado</string>
<string name="alert_w39">Alerta W39: Alerta Tempo de Empréstimo</string>
<string name="alert_m20">Manutenção M20: Cartucho não inserido</string>
<string name="alert_m21">Manutenção M21: Cartucho vazio</string>
<string name="alert_m22">Manutenção M22: Bateria vazia</string>
<string name="alert_m23">Manutenção M23: Desligar automático</string>
<string name="alert_m24">Manutenção M24: Oclusão</string>
<string name="alert_m25">Manutenção M25: Tempo de empréstimo expirado - operação finalizada</string>
<string name="alert_m26">Manutenção M26: Mudança de cartucho não concluída</string>
<string name="alert_m27">Manutenção M27: Transferência de dados falhada</string>
<string name="alert_m28">Manutenção M28: Tempo pausa expirado</string>
<string name="alert_m29">Manutenção M29: Tipo de bateria não definido</string>
<string name="alert_m30">Manutenção M30: Tipo de cartucho não definido</string>
<string name="alert_e6">E6 de erro: Erro mecânico</string>
<string name="alert_e7">E7 de erro: Erro electrónico</string>
<string name="alert_e10">Erro E10: Erro a recuar embolo</string>
<string name="alert_e13">E13 de erro: Erro de idioma</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Atenționarea W31: rezervor pe terminate</string>
<string name="alert_w32">Atenționarea W32: baterie pe terminate</string>
<string name="alert_w33">Atenționarea W33: Timp/dată invalide</string>
<string name="alert_w34">Atenționarea W34: Sfârșitul perioadei de garanție</string>
<string name="alert_w36">Atenționarea W36: RBT anulată</string>
<string name="alert_w38">Atenționarea W38: Bolus anulat</string>
<string name="alert_w39">Atenționarea W39: Atenționare perioadă de închiriere</string>
<string name="alert_m20">Mentenanță M20: Rezervor neinserat</string>
<string name="alert_m21">Mentenanță M21: Rezervor gol</string>
<string name="alert_m22">Mentenanță M22: Baterie terminată</string>
<string name="alert_m23">Mentenanță M23: Oprire automată</string>
<string name="alert_m24">Mentenanță M24: Ocluzie</string>
<string name="alert_m25">Mentenanță M25: Perioadă de închiriere terminată - sfârșitul operării</string>
<string name="alert_m26">Mentenanță M26: Schimbarea rezervorului este incompletă</string>
<string name="alert_m27">Mentenanță M27: Descărcarea datelor a eșuat</string>
<string name="alert_m28">Mentenanță M28: Sfârșitul modului de pauză</string>
<string name="alert_m29">Mentenanță M29: Tipul de baterie nu este configurat</string>
<string name="alert_m30">Mentenanță M30: Tipul de rezervor nu este configurat</string>
<string name="alert_e6">Eroarea E6: Eroare mecanică</string>
<string name="alert_e7">Eroarea E7: Eroare de electronică</string>
<string name="alert_e10">Eroarea E10: Eroare de derulare</string>
<string name="alert_e13">Eroarea E13: Eroare de limbaj</string>
<string name="alert_w31">Atenționarea W31: rezervor pe terminate</string>
<string name="alert_w32">Atenționarea W32: baterie pe terminate</string>
<string name="alert_w33">Atenționarea W33: Timp/dată invalide</string>
<string name="alert_w34">Atenționarea W34: Sfârșitul perioadei de garanție</string>
<string name="alert_w36">Atenționarea W36: RBT anulată</string>
<string name="alert_w38">Atenționarea W38: Bolus anulat</string>
<string name="alert_w39">Atenționarea W39: Atenționare perioadă de închiriere</string>
<string name="alert_m20">Mentenanță M20: Rezervor neinserat</string>
<string name="alert_m21">Mentenanță M21: Rezervor gol</string>
<string name="alert_m22">Mentenanță M22: Baterie terminată</string>
<string name="alert_m23">Mentenanță M23: Oprire automată</string>
<string name="alert_m24">Mentenanță M24: Ocluzie</string>
<string name="alert_m25">Mentenanță M25: Perioadă de închiriere terminată - sfârșitul operării</string>
<string name="alert_m26">Mentenanță M26: Schimbarea rezervorului este incompletă</string>
<string name="alert_m27">Mentenanță M27: Descărcarea datelor a eșuat</string>
<string name="alert_m28">Mentenanță M28: Sfârșitul modului de pauză</string>
<string name="alert_m29">Mentenanță M29: Tipul de baterie nu este configurat</string>
<string name="alert_m30">Mentenanță M30: Tipul de rezervor nu este configurat</string>
<string name="alert_e6">Eroarea E6: Eroare mecanică</string>
<string name="alert_e7">Eroarea E7: Eroare de electronică</string>
<string name="alert_e10">Eroarea E10: Eroare de derulare</string>
<string name="alert_e13">Eroarea E13: Eroare de limbaj</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Предупреждение W31: Картридж заканчивается</string>
<string name="alert_w32">Предупреждение W32: Низкий заряд батареи</string>
<string name="alert_w33">Предупреждение W33: Недопустимое время/Дата</string>
<string name="alert_w34">Предупреждение W34: Окончание гарантии</string>
<string name="alert_w36">W36 предупреждение: временный базал TBR отменен</string>
<string name="alert_w38">Предупреждение W38: Болюс отменен</string>
<string name="alert_w39">Предупреждение W39: окончание заемного периода</string>
<string name="alert_m20">Техническое обслуживание M20: Картридж не вставлен</string>
<string name="alert_m21">Техническое обслуживание M21: Картридж пуст</string>
<string name="alert_m22">Техническое обслуживание M22: Батарея разряжена</string>
<string name="alert_m23">Техническое обслуживание: M23: Автоматическое выключение</string>
<string name="alert_m24">Техническое обслуживание M24: закупорка</string>
<string name="alert_m25">Техническое обслуживание M25: Конец заемного периода - конец операции</string>
<string name="alert_m26">Техническое обслуживание M26: Замена картриджа не завершена</string>
<string name="alert_m27">Техническое обслуживание M27: Ошибка загрузки данных</string>
<string name="alert_m28">Техническое обслуживание M28: Тайм-аут режима паузы</string>
<string name="alert_m29">Техническое обслуживание M29: Тип батареи не задан</string>
<string name="alert_m30">Техническое обслуживание M30: Тип картриджа не задан</string>
<string name="alert_e6">Ошибка E6: Механическая ошибка</string>
<string name="alert_e7">Ошибка E7: Ошибка электроники</string>
<string name="alert_e10">Ошибка Е10: Ошибка возврата</string>
<string name="alert_e13">Ошибка E13: Ошибка языка</string>
<string name="alert_w31">Предупреждение W31: Картридж заканчивается</string>
<string name="alert_w32">Предупреждение W32: Низкий заряд батареи</string>
<string name="alert_w33">Предупреждение W33: Недопустимое время/Дата</string>
<string name="alert_w34">Предупреждение W34: Окончание гарантии</string>
<string name="alert_w36">W36 предупреждение: временный базал TBR отменен</string>
<string name="alert_w38">Предупреждение W38: Болюс отменен</string>
<string name="alert_w39">Предупреждение W39: окончание заемного периода</string>
<string name="alert_m20">Техническое обслуживание M20: Картридж не вставлен</string>
<string name="alert_m21">Техническое обслуживание M21: Картридж пуст</string>
<string name="alert_m22">Техническое обслуживание M22: Батарея разряжена</string>
<string name="alert_m23">Техническое обслуживание: M23: Автоматическое выключение</string>
<string name="alert_m24">Техническое обслуживание M24: закупорка</string>
<string name="alert_m25">Техническое обслуживание M25: Конец заемного периода - конец операции</string>
<string name="alert_m26">Техническое обслуживание M26: Замена картриджа не завершена</string>
<string name="alert_m27">Техническое обслуживание M27: Ошибка загрузки данных</string>
<string name="alert_m28">Техническое обслуживание M28: Тайм-аут режима паузы</string>
<string name="alert_m29">Техническое обслуживание M29: Тип батареи не задан</string>
<string name="alert_m30">Техническое обслуживание M30: Тип картриджа не задан</string>
<string name="alert_e6">Ошибка E6: Механическая ошибка</string>
<string name="alert_e7">Ошибка E7: Ошибка электроники</string>
<string name="alert_e10">Ошибка Е10: Ошибка возврата</string>
<string name="alert_e13">Ошибка E13: Ошибка языка</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Upozornenie W31: Zásobník takmer prázdny</string>
<string name="alert_w32">Upozornenie W32: Batéria takmer vybitá</string>
<string name="alert_w33">Upozornenie W33: Neplatný čas/dátum</string>
<string name="alert_w34">Upozornenie W34: Koniec záruky</string>
<string name="alert_w36">Upozornenie W36: Dočasný bazál zrušený</string>
<string name="alert_w38">Upozornenie W38: Bolus zrušený</string>
<string name="alert_w39">Upozornenie W39: Upozornenie na dobu zapožičania</string>
<string name="alert_m20">Údržba M20: Nie je vložený zásobník</string>
<string name="alert_m21">Údržba M21: Prázdny zásobník</string>
<string name="alert_m22">Údržba M22: Vybitá batéria</string>
<string name="alert_m23">Údržba M23: Automatické vypnutie</string>
<string name="alert_m24">Údržba M24: Oklúzia</string>
<string name="alert_m25">Údržba M25: Doba zapožičania uplynula - koniec prevádzky</string>
<string name="alert_m26">Údržba M26: Výmena zásobníka nedokončená</string>
<string name="alert_m27">Údržba M27: Sťahovanie sa nepodarilo</string>
<string name="alert_m28">Údržba M28: Časový limit režimu pauza</string>
<string name="alert_m29">Údržba M29: Nenastavený typ batérie</string>
<string name="alert_m30">Údržba M30: Nenastavený typ zásobníka</string>
<string name="alert_e6">Chyba E6: Mechanická chyba</string>
<string name="alert_e7">Chyba E7: Elektronická chyba</string>
<string name="alert_e10">Chyba E10: Chyba previnutia</string>
<string name="alert_e13">Chyba E13: Chyba jazyka</string>
<string name="alert_w31">Upozornenie W31: Zásobník takmer prázdny</string>
<string name="alert_w32">Upozornenie W32: Batéria takmer vybitá</string>
<string name="alert_w33">Upozornenie W33: Neplatný čas/dátum</string>
<string name="alert_w34">Upozornenie W34: Koniec záruky</string>
<string name="alert_w36">Upozornenie W36: Dočasný bazál zrušený</string>
<string name="alert_w38">Upozornenie W38: Bolus zrušený</string>
<string name="alert_w39">Upozornenie W39: Upozornenie na dobu zapožičania</string>
<string name="alert_m20">Údržba M20: Nie je vložený zásobník</string>
<string name="alert_m21">Údržba M21: Prázdny zásobník</string>
<string name="alert_m22">Údržba M22: Vybitá batéria</string>
<string name="alert_m23">Údržba M23: Automatické vypnutie</string>
<string name="alert_m24">Údržba M24: Oklúzia</string>
<string name="alert_m25">Údržba M25: Doba zapožičania uplynula - koniec prevádzky</string>
<string name="alert_m26">Údržba M26: Výmena zásobníka nedokončená</string>
<string name="alert_m27">Údržba M27: Sťahovanie sa nepodarilo</string>
<string name="alert_m28">Údržba M28: Časový limit režimu pauza</string>
<string name="alert_m29">Údržba M29: Nenastavený typ batérie</string>
<string name="alert_m30">Údržba M30: Nenastavený typ zásobníka</string>
<string name="alert_e6">Chyba E6: Mechanická chyba</string>
<string name="alert_e7">Chyba E7: Elektronická chyba</string>
<string name="alert_e10">Chyba E10: Chyba previnutia</string>
<string name="alert_e13">Chyba E13: Chyba jazyka</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Varning W31: Reservoarnivå låg</string>
<string name="alert_w32">Varning W32: Batterinivå låg</string>
<string name="alert_w33">Varning W33: Ogiltig tid/datum</string>
<string name="alert_w34">Varning W34: Garantiperioden har upphört</string>
<string name="alert_w36">Varning W36: Tempbasal avbruten</string>
<string name="alert_w38">Varning W38: Bolus avbruten</string>
<string name="alert_w39">Varning W39: Låneperioden upphör snart</string>
<string name="alert_m20">Underhåll M20: Reservoar inte monterad</string>
<string name="alert_m21">Underhåll M21: Reservoar tom</string>
<string name="alert_m22">Underhåll M22: Batteri tomt</string>
<string name="alert_m23">Underhåll M23: Automatisk avstängning</string>
<string name="alert_m24">Underhåll M24: Ocklusion</string>
<string name="alert_m25">Underhåll M25: Låneperioden över. Stänger av pumpen</string>
<string name="alert_m26">Underhåll M26: Reservoarbyte ej slutfört</string>
<string name="alert_m27">Underhåll M27: Datanedladdning misslyckades</string>
<string name="alert_m28">Underhåll M28: Pausläge timeout</string>
<string name="alert_m29">Underhåll M29: Batterityp inte inställd</string>
<string name="alert_m30">Underhåll M30: Reservoartyp inte inställd</string>
<string name="alert_e6">Fel E6: Mekaniskt fel</string>
<string name="alert_e7">Fel E7: Elektroniskt fel</string>
<string name="alert_e10">Felet E10: Återställningsfel</string>
<string name="alert_e13">Fel E13: Språkfel</string>
<string name="alert_w31">Varning W31: Reservoarnivå låg</string>
<string name="alert_w32">Varning W32: Batterinivå låg</string>
<string name="alert_w33">Varning W33: Ogiltig tid/datum</string>
<string name="alert_w34">Varning W34: Garantiperioden har upphört</string>
<string name="alert_w36">Varning W36: Tempbasal avbruten</string>
<string name="alert_w38">Varning W38: Bolus avbruten</string>
<string name="alert_w39">Varning W39: Låneperioden upphör snart</string>
<string name="alert_m20">Underhåll M20: Reservoar inte monterad</string>
<string name="alert_m21">Underhåll M21: Reservoar tom</string>
<string name="alert_m22">Underhåll M22: Batteri tomt</string>
<string name="alert_m23">Underhåll M23: Automatisk avstängning</string>
<string name="alert_m24">Underhåll M24: Ocklusion</string>
<string name="alert_m25">Underhåll M25: Låneperioden över. Stänger av pumpen</string>
<string name="alert_m26">Underhåll M26: Reservoarbyte ej slutfört</string>
<string name="alert_m27">Underhåll M27: Datanedladdning misslyckades</string>
<string name="alert_m28">Underhåll M28: Pausläge timeout</string>
<string name="alert_m29">Underhåll M29: Batterityp inte inställd</string>
<string name="alert_m30">Underhåll M30: Reservoartyp inte inställd</string>
<string name="alert_e6">Fel E6: Mekaniskt fel</string>
<string name="alert_e7">Fel E7: Elektroniskt fel</string>
<string name="alert_e10">Felet E10: Återställningsfel</string>
<string name="alert_e13">Fel E13: Språkfel</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">Uyarı W31: Kartuş düşük</string>
<string name="alert_w32">Uyarı W32: Pil bitmek üzere</string>
<string name="alert_w33">Uyarı W33: Geçersiz saat/tarih</string>
<string name="alert_w34">Garanti süresi doldu</string>
<string name="alert_w36">Uyarı W36: Geçici bazal iptal edildi</string>
<string name="alert_w38">Uyarı W38: Bolus iptal edildi</string>
<string name="alert_w39">Uyarı W39: Kiralama süresi uyarısı</string>
<string name="alert_m20">Bakım M20: Kartuş takılı değil</string>
<string name="alert_m21">Bakım M21: Kartuş boş</string>
<string name="alert_m22">Bakım M22: Pil boş</string>
<string name="alert_m23">Bakım M23: Otomatik kapalı</string>
<string name="alert_m24">Bakım M24: Tıkanıklık</string>
<string name="alert_m25">Bakım M25: Kiralama süresi doldu</string>
<string name="alert_m26">Bakım M26: Kartuş değişimi tamamlanamadı</string>
<string name="alert_m27">Bakım M27: Veri yükleme başarısız</string>
<string name="alert_m28">Bakım M28: Duraklat modunda zaman aşımı</string>
<string name="alert_m29">Bakım M29: Pil türü seçili değil</string>
<string name="alert_m30">Bakım M30: Kartuş türü ayarlı değil</string>
<string name="alert_e6">Hata E6: Mekanik hata</string>
<string name="alert_e7">Hata E7: Elektronik hata</string>
<string name="alert_e10">Hata E10: Geri sarma hata</string>
<string name="alert_e13">Hata E13: Dil ekranında hata</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="alert_w31">警告 W31储药器药量低</string>
<string name="alert_w32">警告 W32电池电量低</string>
<string name="alert_w33">警告 W33不合规的时间/日期</string>
<string name="alert_w34">警告 W34保修期结束</string>
<string name="alert_w36">警告 W36临时基础率被取消了</string>
<string name="alert_w38">警告 W38大剂量被取消了</string>
<string name="alert_w39">警告 W39Loantime 警告</string>
<string name="alert_m20">维护 M10储药器没有插入</string>
<string name="alert_m21">维护 M21储药器空了</string>
<string name="alert_m22">维护 M22电池没有插入</string>
<string name="alert_m23">维护 M23自动关机</string>
<string name="alert_m24">维护 M24堵管</string>
<string name="alert_m25">维护 M25Loantime结束操作结束</string>
<string name="alert_m26">维护 M26储药器更换没有完成</string>
<string name="alert_m27">维护 M27数据下载失败</string>
<string name="alert_m28">维护 M28暂停模式超时</string>
<string name="alert_m29">维护 M29电池类型没有设置</string>
<string name="alert_m30">维护 M30储药器类型没有设置</string>
<string name="alert_e6">错误 E6机械错误</string>
<string name="alert_e7">错误 E7电子错误</string>
<string name="alert_e10">错误 E10复位错误</string>
<string name="alert_e13">错误 E13语言错误</string>
<string name="alert_w31">警告 W31储药器药量低</string>
<string name="alert_w32">警告 W32电池电量低</string>
<string name="alert_w33">警告 W33不合规的时间/日期</string>
<string name="alert_w34">警告 W34保修期结束</string>
<string name="alert_w36">警告 W36临时基础率被取消了</string>
<string name="alert_w38">警告 W38大剂量被取消了</string>
<string name="alert_w39">警告 W39Loantime 警告</string>
<string name="alert_m20">维护 M10储药器没有插入</string>
<string name="alert_m21">维护 M21储药器空了</string>
<string name="alert_m22">维护 M22电池没有插入</string>
<string name="alert_m23">维护 M23自动关机</string>
<string name="alert_m24">维护 M24堵管</string>
<string name="alert_m25">维护 M25Loantime结束操作结束</string>
<string name="alert_m26">维护 M26储药器更换没有完成</string>
<string name="alert_m27">维护 M27数据下载失败</string>
<string name="alert_m28">维护 M28暂停模式超时</string>
<string name="alert_m29">维护 M29电池类型没有设置</string>
<string name="alert_m30">维护 M30储药器类型没有设置</string>
<string name="alert_e6">错误 E6机械错误</string>
<string name="alert_e7">错误 E7电子错误</string>
<string name="alert_e10">错误 E10复位错误</string>
<string name="alert_e13">错误 E13语言错误</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -12,6 +12,7 @@
<string-array name="languagesArray">
<item>@string/en_lang</item>
<item>@string/af_lang</item>
<item>@string/bg_lang</item>
<item>@string/cs_lang</item>
<item>@string/de_lang</item>
@ -28,10 +29,12 @@
<item>@string/sk_lang</item>
<item>@string/sv_lang</item>
<item>@string/pl_lang</item>
<item>@string/tr_lang</item>
<item>@string/zh_lang</item>
</string-array>
<string-array name="languagesValues" translatable="false">
<item>en</item>
<item>af</item>
<item>bg</item>
<item>cs</item>
<item>de</item>
@ -48,6 +51,7 @@
<item>sk</item>
<item>sv</item>
<item>pl</item>
<item>tr</item>
<item>zh</item>
</string-array>

View file

@ -183,6 +183,7 @@
<string name="objectives_pumpstatusavailableinns">Pump status available in NS</string>
<string name="objectives_manualenacts">Manual enacts</string>
<string name="loopdisabled">LOOP DISABLED BY CONSTRAINTS</string>
<string name="af_lang" translatable="false">Afrikaans</string>
<string name="cs_lang" translatable="false">Czech</string>
<string name="en_lang" translatable="false">English</string>
<string name="treatments_wizard_basaliob_label">Basal IOB</string>
@ -247,7 +248,8 @@
<string name="sv_lang" translatable="false">Swedish</string>
<string name="fr_lang" translatable="false">French</string>
<string name="zh_lang" translatable="false">Chinese</string>
<string name="pl_lang" translatable="false">Polski</string>
<string name="tr_lang" translatable="false">Turkish</string>
<string name="pl_lang" translatable="false">Polish</string>
<string name="openapsma_maxbasal_title">Max U/hr a Temp Basal can be set to</string>
<string name="openapsma_maxbasal_summary">This value is called max basal in OpenAPS context</string>
<string name="openapsma_maxiob_title">Maximum basal IOB OpenAPS can deliver [U]</string>
@ -583,6 +585,7 @@
<string name="disconnectpumpfor2h">Disconnect pump for 2 h</string>
<string name="disconnectpumpfor3h">Disconnect pump for 3 h</string>
<string name="resume">Resume</string>
<string name="reconnect">Reconnect Pump</string>
<string name="smscommunicator_wrongduration">Wrong duration</string>
<string name="smscommunicator_loopsuspended">Loop suspended</string>
<string name="smscommunicator_loopresumed">Loop resumed</string>
@ -609,6 +612,7 @@
<string name="danar_bluetooth_status">Bluetooth status</string>
<string name="nav_about">About</string>
<string name="smscommunicator_missingsmspermission">Missing SMS permission</string>
<string name="smscommunicator_missingphonestatepermission">Missing phone state permission</string>
<string name="xdripstatus_settings">xDrip Status (watch)</string>
<string name="xdripstatus">xDrip Statusline (watch)</string>
<string name="xdripstatus_shortname">xds</string>
@ -1006,6 +1010,8 @@
<string name="closedmodedisabledinpreferences">Closed loop mode disabled in preferences</string>
<string name="autosensdisabledinpreferences">Autosens disabled in preferences</string>
<string name="smbdisabledinpreferences">SMB disabled in preferences</string>
<string name="uamdisabledinpreferences">UAM disabled in preferences</string>
<string name="uamdisabledoref1notselected">UAM disabled because it rely on Oref1 sensitivity plugin</string>
<string name="limitingbasalratio">Limiting max basal rate to %1$.2f U/h because of %2$s</string>
<string name="pumplimit">pump limit</string>
<string name="key_openapsma_max_basal" translatable="false">openapsma_max_basal</string>
@ -1171,9 +1177,10 @@
<string name="error_adding_treatment_title">Treatment data incomplete</string>
<string name="maintenance_settings">Maintenance Settings</string>
<string name="maintenance_email">Email</string>
<string name="key_maintenance_logs_email" translatable="false">email</string>
<string name="key_maintenance_logs_email" translatable="false">maintenance_logs_email</string>
<string name="invalid_email_message">Invalid Email</string>
<string name="key_maintenance_logs_amount" translatable="false">amount of logs to send</string>
<string name="key_maintenance_logs_amount" translatable="false">maintenance_logs_amount</string>
<string name="key_logshipper_amount" translatable="false">logshipper_amount</string>
<string name="maintenance_amount">No of Logs to send</string>
<string name="maintenance">Maintenance</string>
<string name="maintenance_shortname">MAINT</string>
@ -1205,6 +1212,12 @@
<string name="loop_openmode_min_change">Minimal request change [%]</string>
<string name="loop_openmode_min_change_summary">Loop will popup new change request only if change is bigger than this value. Default value is 20%</string>
<string name="key_short_tabtitles" translatable="false">short_tabtitles</string>
<string name="pairfirst">Please pair your pump with your phone!</string>
<string name="profile_total">== ∑ %1$s U</string>
<string name="profile_ins_units_per_hout">U/h</string>
<string name="profile_carbs_per_unit">g/U</string>
<string name="profile_per_unit">/U</string>
<plurals name="objective_days">
<item quantity="one">%1$d day</item>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<automotiveApp>
<uses name="notification" />
</automotiveApp>

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:key="language"
android:title="@string/configbuilder_general">
<ListPreference
@ -9,6 +8,6 @@
android:defaultValue="en"
android:entries="@array/languagesArray"
android:entryValues="@array/languagesValues"
android:key="language" />
android:key="@string/key_language" />
</PreferenceCategory>
</PreferenceScreen>

View file

@ -24,6 +24,7 @@ import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.ConfigBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.androidaps.plugins.PumpDanaRv2.DanaRv2Plugin;
import info.nightscout.androidaps.plugins.Treatments.TreatmentService;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPlugin;
@ -100,6 +101,9 @@ public class AAPSMocker {
when(MainApp.gs(R.string.careportal_profileswitch)).thenReturn("Profile Switch");
when(MainApp.gs(R.string.configbuilder_insulin)).thenReturn("Insulin");
when(MainApp.gs(R.string.bolusdelivering)).thenReturn("Delivering 0.0U");
when(MainApp.gs(R.string.profile_per_unit)).thenReturn("/U");
when(MainApp.gs(R.string.profile_carbs_per_unit)).thenReturn("g/U");
when(MainApp.gs(R.string.profile_ins_units_per_hout)).thenReturn("U/h");
}
public static MainApp mockMainApp() {
@ -176,8 +180,10 @@ public class AAPSMocker {
public static DanaRPlugin mockDanaRPlugin() {
PowerMockito.mockStatic(DanaRPlugin.class);
DanaRPlugin danaRPlugin = mock(DanaRPlugin.class);
DanaRv2Plugin danaRv2Plugin = mock(DanaRv2Plugin.class);
DanaRKoreanPlugin danaRKoreanPlugin = mock(DanaRKoreanPlugin.class);
when(MainApp.getSpecificPlugin(DanaRPlugin.class)).thenReturn(danaRPlugin);
when(MainApp.getSpecificPlugin(DanaRv2Plugin.class)).thenReturn(danaRv2Plugin);
when(MainApp.getSpecificPlugin(DanaRKoreanPlugin.class)).thenReturn(danaRKoreanPlugin);
return danaRPlugin;
}

View file

@ -117,6 +117,7 @@ public class MainAppTest {
@Test
public void isEngineeringModeOrReleaseTest() {
mainApp.devBranch = true;
Assert.assertEquals(!Config.APS, mainApp.isEngineeringModeOrRelease());
}

View file

@ -120,9 +120,10 @@ public class IobCobCalculatorPluginTest {
bgReadingList.add(new BgReading().date(T.mins(5).msecs()).value(100));
iobCobCalculatorPlugin.setBgReadings(bgReadingList);
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
iobCobCalculatorPlugin.createBucketedData();
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
Assert.assertEquals(bgReadingList.get(0).date, iobCobCalculatorPlugin.getBucketedData().get(0).date);
Assert.assertEquals(bgReadingList.get(3).date, iobCobCalculatorPlugin.getBucketedData().get(3).date);
Assert.assertEquals(bgReadingList.size(), iobCobCalculatorPlugin.getBucketedData().size());
@ -134,9 +135,10 @@ public class IobCobCalculatorPluginTest {
bgReadingList.add(new BgReading().date(T.mins(5).msecs()).value(100));
iobCobCalculatorPlugin.setBgReadings(bgReadingList);
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
iobCobCalculatorPlugin.createBucketedData();
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
Assert.assertEquals(bgReadingList.get(0).date, iobCobCalculatorPlugin.getBucketedData().get(0).date);
Assert.assertEquals(bgReadingList.get(2).date, iobCobCalculatorPlugin.getBucketedData().get(3).date);
Assert.assertEquals(bgReadingList.size() + 1, iobCobCalculatorPlugin.getBucketedData().size());
@ -150,9 +152,10 @@ public class IobCobCalculatorPluginTest {
bgReadingList.add(new BgReading().date(T.mins(0).msecs()).value(100));
iobCobCalculatorPlugin.setBgReadings(bgReadingList);
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
iobCobCalculatorPlugin.createBucketedData();
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
Assert.assertEquals(T.mins(20).msecs(), iobCobCalculatorPlugin.getBucketedData().get(0).date);
Assert.assertEquals(T.mins(15).msecs(), iobCobCalculatorPlugin.getBucketedData().get(1).date);
Assert.assertEquals(T.mins(10).msecs(), iobCobCalculatorPlugin.getBucketedData().get(2).date);
@ -165,9 +168,10 @@ public class IobCobCalculatorPluginTest {
bgReadingList.add(new BgReading().date(T.mins(5).msecs()).value(100));
iobCobCalculatorPlugin.setBgReadings(bgReadingList);
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
iobCobCalculatorPlugin.createBucketedData();
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
Assert.assertEquals(null, iobCobCalculatorPlugin.getBucketedData());
// data should be reconstructed
@ -177,9 +181,10 @@ public class IobCobCalculatorPluginTest {
bgReadingList.add(new BgReading().date(T.mins(20).msecs()).value(40));
iobCobCalculatorPlugin.setBgReadings(bgReadingList);
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
iobCobCalculatorPlugin.createBucketedData();
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
Assert.assertEquals(T.mins(50).msecs(), iobCobCalculatorPlugin.getBucketedData().get(0).date);
Assert.assertEquals(T.mins(20).msecs(), iobCobCalculatorPlugin.getBucketedData().get(6).date);
Assert.assertEquals(7, iobCobCalculatorPlugin.getBucketedData().size());
@ -196,9 +201,10 @@ public class IobCobCalculatorPluginTest {
bgReadingList.add(new BgReading().date(T.mins(20).msecs()).value(40));
iobCobCalculatorPlugin.setBgReadings(bgReadingList);
Assert.assertEquals(false, iobCobCalculatorPlugin.isAbout5minData());
iobCobCalculatorPlugin.createBucketedData();
Assert.assertEquals(false, iobCobCalculatorPlugin.isAbout5minData());
Assert.assertEquals(T.mins(50).msecs(), iobCobCalculatorPlugin.getBucketedData().get(0).date);
Assert.assertEquals(T.mins(20).msecs(), iobCobCalculatorPlugin.getBucketedData().get(6).date);
Assert.assertEquals(7, iobCobCalculatorPlugin.getBucketedData().size());
@ -333,11 +339,40 @@ public class IobCobCalculatorPluginTest {
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-09-05T03:44:57Z")).value(100));
iobCobCalculatorPlugin.setBgReadings(bgReadingList);
iobCobCalculatorPlugin.createBucketedData();
Assert.assertEquals(true, iobCobCalculatorPlugin.isAbout5minData());
iobCobCalculatorPlugin.createBucketedData();
Assert.assertEquals(DateUtil.fromISODateString("2018-09-05T13:34:57Z").getTime(), iobCobCalculatorPlugin.getBucketedData().get(0).date);
Assert.assertEquals(DateUtil.fromISODateString("2018-09-05T03:44:57Z").getTime(), iobCobCalculatorPlugin.getBucketedData().get(iobCobCalculatorPlugin.getBucketedData().size() - 1).date);
// 5min 4sec data
bgReadingList.clear();
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T06:33:40Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T06:28:36Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T06:23:32Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T06:18:28Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T06:13:24Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T06:08:19Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T06:03:16Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:58:11Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:53:07Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:48:03Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:42:58Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:37:54Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:32:51Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:27:46Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:22:42Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:17:38Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:12:33Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:07:29Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T05:02:26Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T04:57:21Z")).value(100));
bgReadingList.add(new BgReading().date(DateUtil.fromISODateString("2018-10-05T04:52:17Z")).value(100));
iobCobCalculatorPlugin.setBgReadings(bgReadingList);
Assert.assertEquals(false, iobCobCalculatorPlugin.isAbout5minData());
}
@Test

View file

@ -0,0 +1,82 @@
package info.nightscout.androidaps.plugins.PumpdanaRv2;
import android.content.Context;
import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import info.AAPSMocker;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.interfaces.Constraint;
import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.PumpDanaR.DanaRPump;
import info.nightscout.androidaps.plugins.PumpDanaRv2.DanaRv2Plugin;
import info.nightscout.utils.SP;
import info.nightscout.utils.ToastUtils;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;
/**
* Created by Rumen on 01.08.2018
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({MainApp.class, ConfigBuilderPlugin.class, ToastUtils.class, Context.class, SP.class})
public class DanaRv2PluginTest {
DanaRv2Plugin danaRv2Plugin;
@Test
public void getPlugin() {
danaRv2Plugin.getPlugin();
}
@Test
public void basalRateShouldBeLimited() throws Exception {
danaRv2Plugin.setPluginEnabled(PluginType.PUMP, true);
danaRv2Plugin.setPluginEnabled(PluginType.PUMP, true);
DanaRPump.getInstance().maxBasal = 0.8d;
Constraint<Double> c = new Constraint<>(Constants.REALLYHIGHBASALRATE);
danaRv2Plugin.applyBasalConstraints(c, AAPSMocker.getValidProfile());
Assert.assertEquals(0.8d, c.value());
Assert.assertEquals("DanaRv2: Limiting basal rate to 0.80 U/h because of pump limit", c.getReasons());
Assert.assertEquals("DanaRv2: Limiting basal rate to 0.80 U/h because of pump limit", c.getMostLimitedReasons());
}
@Test
public void percentBasalRateShouldBeLimited() throws Exception {
danaRv2Plugin.setPluginEnabled(PluginType.PUMP, true);
danaRv2Plugin.setPluginEnabled(PluginType.PUMP, true);
DanaRPump.getInstance().maxBasal = 0.8d;
Constraint<Integer> c = new Constraint<>(Constants.REALLYHIGHPERCENTBASALRATE);
danaRv2Plugin.applyBasalPercentConstraints(c, AAPSMocker.getValidProfile());
Assert.assertEquals((Integer) 200, c.value());
Assert.assertEquals("DanaRv2: Limiting percent rate to 200% because of pump limit", c.getReasons());
Assert.assertEquals("DanaRv2: Limiting percent rate to 200% because of pump limit", c.getMostLimitedReasons());
}
@Before
public void prepareMocks() throws Exception {
AAPSMocker.mockMainApp();
AAPSMocker.mockConfigBuilder();
AAPSMocker.mockBus();
AAPSMocker.mockStrings();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockCommandQueue();
// when(SP.getString(R.string.key_danars_address, "")).thenReturn("");
danaRv2Plugin = DanaRv2Plugin.getPlugin();
}
}

View file

@ -0,0 +1,60 @@
package info.nightscout.androidaps.plugins.PumpdanaRv2.comm;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import info.AAPSMocker;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.PumpDanaR.comm.MessageBase;
import info.nightscout.androidaps.plugins.PumpDanaRv2.comm.MessageHashTable_v2;
import info.nightscout.androidaps.plugins.PumpDanaRv2.comm.MsgStatusAPS_v2;
import info.nightscout.utils.SP;
import static org.junit.Assert.*;
/**
* Created by Rumen Georgiev on 30.10.2018.
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({MainApp.class, SP.class, L.class})
public class MessageHashTable_v2Test {
@Test
public void runTest() {
AAPSMocker.mockMainApp();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockL();
AAPSMocker.mockBus();
MessageHashTable_v2 packet = new MessageHashTable_v2();
MessageBase forTesting = new MsgStatusAPS_v2();
MessageBase testPacket = MessageHashTable_v2.findMessage(forTesting.getCommand());
assertEquals(0xE001, testPacket.getCommand());
// try putting another command
MessageBase testMessage = new MessageBase();
testMessage.SetCommand(0xE005);
packet.put(testMessage);
assertEquals(0xE005, packet.findMessage(0xE005).getCommand());
}
byte[] createArray(int length, byte fillWith){
byte[] ret = new byte[length];
for(int i = 0; i<length; i++){
ret[i] = fillWith;
}
return ret;
}
double[] createArray(int length, double fillWith){
double[] ret = new double[length];
for(int i = 0; i<length; i++){
ret[i] = fillWith;
}
return ret;
}
}

Some files were not shown because too many files have changed in this diff Show more