revert dev changes

This commit is contained in:
Roumen Georgiev 2018-11-06 11:40:08 +02:00
parent 43a61f312a
commit 707a9e62d8
5 changed files with 19 additions and 27 deletions

View file

@ -23,18 +23,19 @@ tempBasalFunctions.setTempBasal = function setTempBasal(rate, duration, profile,
if (rate < 0) { if (rate < 0) {
rate = 0; rate = 0;
} else if (rate > maxSafeBasal) { } // if >30m @ 0 required, zero temp will be extended to 30m instead
else if (rate > maxSafeBasal) {
rate = maxSafeBasal; rate = maxSafeBasal;
} }
var suggestedRate = round_basal(rate, profile); 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 && duration > 0 ) { 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) {
rT.reason += " "+currenttemp.duration+"m left and " + currenttemp.rate + " ~ req " + suggestedRate + "U/hr: no temp required"; rT.reason += " "+currenttemp.duration+"m left and " + currenttemp.rate + " ~ req " + suggestedRate + "U/hr: no temp required";
return rT; return rT;
} }
if (suggestedRate === profile.current_basal) { if (suggestedRate === profile.current_basal) {
if (profile.skip_neutral_temps === true) { if (profile.skip_neutral_temps) {
if (typeof(currenttemp) !== 'undefined' && typeof(currenttemp.duration) !== 'undefined' && currenttemp.duration > 0) { 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'); reason(rT, 'Suggested rate is same as profile rate, a temp basal is active, canceling current temp');
rT.duration = 0; rT.duration = 0;

View file

@ -156,12 +156,6 @@ 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() { public int getOldVersion() {
return oldVersion; return oldVersion;
} }

View file

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

View file

@ -1364,7 +1364,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
// Sensitivity // Sensitivity
if (sensitivityView != null) { if (sensitivityView != null) {
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensData("Overview"); AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensDataSynchronized("Overview");
if (autosensData != null) if (autosensData != null)
sensitivityView.setText(String.format("%.0f%%", autosensData.autosensResult.ratio * 100)); sensitivityView.setText(String.format("%.0f%%", autosensData.autosensResult.ratio * 100));
else else

View file

@ -1052,7 +1052,6 @@
<string name="insulinlimitviolation">Překročen limit inzulínu</string> <string name="insulinlimitviolation">Překročen limit inzulínu</string>
<string name="loop_openmode_min_change">Minimální změna pro výzvu [%]</string> <string name="loop_openmode_min_change">Minimální změna pro výzvu [%]</string>
<string name="loop_openmode_min_change_summary">Smyčka vytvoří novou žádost o změnu pouze v případě, že změna je větší než tato hodnota. Výchozí hodnota je 20 %</string> <string name="loop_openmode_min_change_summary">Smyčka vytvoří novou žádost o změnu pouze v případě, že změna je větší než tato hodnota. Výchozí hodnota je 20 %</string>
<string name="pairfirst">Spárujte pumpu s telefonem!</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d den</item> <item quantity="one">%1$d den</item>
<item quantity="few">%1$d dnů</item> <item quantity="few">%1$d dnů</item>