xdrip calibration
This commit is contained in:
parent
6f6e3385c5
commit
8db3f258cd
16 changed files with 335 additions and 72 deletions
|
@ -70,7 +70,7 @@ android {
|
|||
dimension "limits"
|
||||
buildConfigField "int", "MAXBOLUS", "5"
|
||||
}
|
||||
full {
|
||||
full {
|
||||
dimension "standard"
|
||||
buildConfigField "boolean", "APS", "true"
|
||||
buildConfigField "boolean", "PUMPDRIVERS", "true"
|
||||
|
|
|
@ -31,4 +31,6 @@ public interface Intents {
|
|||
String ACTION_NEW_BG_ESTIMATE_NO_DATA = "com.eveningoutpost.dexdrip.BgEstimateNoData";
|
||||
|
||||
String NS_EMULATOR = "com.eveningoutpost.dexdrip.NS_EMULATOR";
|
||||
|
||||
String ACTION_REMOTE_CALIBRATION = "com.eveningoutpost.dexdrip.NewCalibration";
|
||||
}
|
||||
|
|
|
@ -6,6 +6,14 @@ import android.support.annotation.Nullable;
|
|||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
|
||||
import com.j256.ormlite.dao.Dao;
|
||||
import com.j256.ormlite.stmt.PreparedQuery;
|
||||
import com.j256.ormlite.stmt.QueryBuilder;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -21,6 +29,7 @@ import info.nightscout.utils.Round;
|
|||
*/
|
||||
|
||||
public class GlucoseStatus {
|
||||
private static Logger log = LoggerFactory.getLogger(GlucoseStatus.class);
|
||||
public double glucose = 0d;
|
||||
public double delta = 0d;
|
||||
public double avgdelta = 0d;
|
||||
|
@ -124,6 +133,48 @@ public class GlucoseStatus {
|
|||
return status.round();
|
||||
}
|
||||
|
||||
/*
|
||||
* Return last BgReading from database or null if db is empty
|
||||
*/
|
||||
@Nullable
|
||||
public static BgReading lastBg() {
|
||||
List<BgReading> bgList = null;
|
||||
|
||||
try {
|
||||
Dao<BgReading, Long> daoBgReadings = MainApp.getDbHelper().getDaoBgReadings();
|
||||
QueryBuilder<BgReading, Long> queryBuilder = daoBgReadings.queryBuilder();
|
||||
queryBuilder.orderBy("timeIndex", false);
|
||||
queryBuilder.limit(1L);
|
||||
queryBuilder.where().gt("value", 38);
|
||||
PreparedQuery<BgReading> preparedQuery = queryBuilder.prepare();
|
||||
bgList = daoBgReadings.query(preparedQuery);
|
||||
|
||||
} catch (SQLException e) {
|
||||
log.debug(e.getMessage(), e);
|
||||
}
|
||||
if (bgList != null && bgList.size() > 0)
|
||||
return bgList.get(0);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return bg reading if not old ( <9 min )
|
||||
* or null if older
|
||||
*/
|
||||
@Nullable
|
||||
public static BgReading actualBg() {
|
||||
BgReading lastBg = lastBg();
|
||||
|
||||
if (lastBg == null)
|
||||
return null;
|
||||
|
||||
if (lastBg.timeIndex > new Date().getTime() - 9 * 60 * 1000)
|
||||
return lastBg;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static double average(ArrayList<Double> array) {
|
||||
double sum = 0d;
|
||||
|
||||
|
|
|
@ -172,48 +172,6 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
|||
return getDao(DanaRHistoryRecord.class);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return last BgReading from database or null if db is empty
|
||||
*/
|
||||
@Nullable
|
||||
public BgReading lastBg() {
|
||||
List<BgReading> bgList = null;
|
||||
|
||||
try {
|
||||
Dao<BgReading, Long> daoBgReadings = getDaoBgReadings();
|
||||
QueryBuilder<BgReading, Long> queryBuilder = daoBgReadings.queryBuilder();
|
||||
queryBuilder.orderBy("timeIndex", false);
|
||||
queryBuilder.limit(1L);
|
||||
queryBuilder.where().gt("value", 38);
|
||||
PreparedQuery<BgReading> preparedQuery = queryBuilder.prepare();
|
||||
bgList = daoBgReadings.query(preparedQuery);
|
||||
|
||||
} catch (SQLException e) {
|
||||
log.debug(e.getMessage(), e);
|
||||
}
|
||||
if (bgList != null && bgList.size() > 0)
|
||||
return bgList.get(0);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return bg reading if not old ( <9 min )
|
||||
* or null if older
|
||||
*/
|
||||
@Nullable
|
||||
public BgReading actualBg() {
|
||||
BgReading lastBg = lastBg();
|
||||
|
||||
if (lastBg == null)
|
||||
return null;
|
||||
|
||||
if (lastBg.timeIndex > new Date().getTime() - 9 * 60 * 1000)
|
||||
return lastBg;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<BgReading> getBgreadingsDataFromTime(long mills, boolean ascending) {
|
||||
try {
|
||||
Dao<BgReading, Long> daoBgreadings = getDaoBgReadings();
|
||||
|
|
|
@ -0,0 +1,121 @@
|
|||
package info.nightscout.androidaps.plugins.Overview.Dialogs;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.Config;
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.Services.Intents;
|
||||
import info.nightscout.androidaps.data.GlucoseStatus;
|
||||
import info.nightscout.client.data.NSProfile;
|
||||
import info.nightscout.utils.PlusMinusEditText;
|
||||
import info.nightscout.utils.SafeParse;
|
||||
import info.nightscout.utils.ToastUtils;
|
||||
|
||||
public class CalibrationDialog extends DialogFragment implements View.OnClickListener {
|
||||
private static Logger log = LoggerFactory.getLogger(CalibrationDialog.class);
|
||||
|
||||
Button okButton;
|
||||
PlusMinusEditText bgText;
|
||||
TextView unitsView;
|
||||
|
||||
Context parentContext;
|
||||
|
||||
public CalibrationDialog() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
public void setContext(Context context) {
|
||||
parentContext = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.overview_calibration_dialog, container, false);
|
||||
|
||||
getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
|
||||
getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
|
||||
|
||||
okButton = (Button) view.findViewById(R.id.overview_calibration_okbutton);
|
||||
okButton.setOnClickListener(this);
|
||||
|
||||
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
||||
Double bg = NSProfile.fromMgdlToUnits(GlucoseStatus.getGlucoseStatusData() != null ? GlucoseStatus.getGlucoseStatusData().glucose : 0d, profile.getUnits());
|
||||
if (profile.getUnits().equals(Constants.MMOL))
|
||||
bgText = new PlusMinusEditText(view, R.id.overview_calibration_bg, R.id.overview_calibration_bg_plus, R.id.overview_calibration_bg_minus, bg, 0d, 30d, 0.1d, new DecimalFormat("0.0"), false);
|
||||
else
|
||||
bgText = new PlusMinusEditText(view, R.id.overview_calibration_bg, R.id.overview_calibration_bg_plus, R.id.overview_calibration_bg_minus, bg, 0d, 500d, 1d, new DecimalFormat("0"), false);
|
||||
|
||||
unitsView = (TextView) view.findViewById(R.id.overview_calibration_units);
|
||||
unitsView.setText(profile.getUnits());
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.overview_calibration_okbutton:
|
||||
if (parentContext != null) {
|
||||
final NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
||||
|
||||
final Double bg = bgText.getValue();
|
||||
|
||||
String confirmMessage = String.format(MainApp.sResources.getString(R.string.send_calibration), bg);
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(parentContext);
|
||||
builder.setTitle(MainApp.sResources.getString(R.string.confirmation));
|
||||
builder.setMessage(confirmMessage);
|
||||
builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
Context context = MainApp.instance().getApplicationContext();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putDouble("glucose_number", bg);
|
||||
bundle.putString("units", profile.getUnits().equals(Constants.MGDL) ? "mgdl" : "mmol");
|
||||
bundle.putLong("timestamp", new Date().getTime());
|
||||
Intent intent = new Intent(Intents.ACTION_REMOTE_CALIBRATION);
|
||||
intent.putExtras(bundle);
|
||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||
context.sendBroadcast(intent);
|
||||
List<ResolveInfo> q = MainApp.instance().getApplicationContext().getPackageManager().queryBroadcastReceivers(intent, 0);
|
||||
if (q.size() < 1) {
|
||||
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(),MainApp.sResources.getString(R.string.xdripnotinstalled));
|
||||
log.debug(MainApp.sResources.getString(R.string.xdripnotinstalled));
|
||||
} else {
|
||||
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(),MainApp.sResources.getString(R.string.calibrationsent));
|
||||
}
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(getString(R.string.cancel), null);
|
||||
builder.show();
|
||||
dismiss();
|
||||
} else {
|
||||
log.error("parentContext == null");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -36,6 +36,7 @@ import java.util.Date;
|
|||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.data.GlucoseStatus;
|
||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||
import info.nightscout.androidaps.db.BgReading;
|
||||
import info.nightscout.androidaps.interfaces.TempBasalsInterface;
|
||||
|
@ -278,7 +279,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener {
|
|||
else editBg.setStep(0.1d);
|
||||
|
||||
// Set BG if not old
|
||||
BgReading lastBg = MainApp.getDbHelper().actualBg();
|
||||
BgReading lastBg = GlucoseStatus.actualBg();
|
||||
|
||||
if (lastBg != null) {
|
||||
Double lastBgValue = lastBg.valueToUnits(units);
|
||||
|
|
|
@ -75,12 +75,14 @@ import info.nightscout.androidaps.plugins.Loop.events.EventNewOpenLoopNotificati
|
|||
import info.nightscout.androidaps.plugins.Objectives.ObjectivesPlugin;
|
||||
import info.nightscout.androidaps.plugins.OpenAPSAMA.DetermineBasalResultAMA;
|
||||
import info.nightscout.androidaps.plugins.OpenAPSAMA.OpenAPSAMAPlugin;
|
||||
import info.nightscout.androidaps.plugins.Overview.Dialogs.CalibrationDialog;
|
||||
import info.nightscout.androidaps.plugins.Overview.Dialogs.NewTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.Overview.Dialogs.WizardDialog;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventDismissNotification;
|
||||
import info.nightscout.androidaps.plugins.Overview.events.EventNewNotification;
|
||||
import info.nightscout.androidaps.plugins.Overview.graphExtensions.PointsWithLabelGraphSeries;
|
||||
import info.nightscout.androidaps.plugins.Overview.graphExtensions.TimeAsXAxisLabelFormatter;
|
||||
import info.nightscout.androidaps.plugins.SourceXdrip.SourceXdripPlugin;
|
||||
import info.nightscout.androidaps.plugins.TempTargetRange.TempTargetRangePlugin;
|
||||
import info.nightscout.androidaps.plugins.TempTargetRange.events.EventTempTargetRangeChange;
|
||||
import info.nightscout.client.data.NSProfile;
|
||||
|
@ -125,6 +127,7 @@ public class OverviewFragment extends Fragment {
|
|||
Button cancelTempButton;
|
||||
Button treatmentButton;
|
||||
Button wizardButton;
|
||||
Button calibrationButton;
|
||||
Button acceptTempButton;
|
||||
Button quickWizardButton;
|
||||
|
||||
|
@ -172,6 +175,7 @@ public class OverviewFragment extends Fragment {
|
|||
acceptTempButton = (Button) view.findViewById(R.id.overview_accepttempbutton);
|
||||
acceptTempLayout = (LinearLayout) view.findViewById(R.id.overview_accepttemplayout);
|
||||
quickWizardButton = (Button) view.findViewById(R.id.overview_quickwizard);
|
||||
calibrationButton = (Button) view.findViewById(R.id.overview_calibration);
|
||||
showPredictionView = (CheckBox) view.findViewById(R.id.overview_showprediction);
|
||||
|
||||
notificationsView = (RecyclerView) view.findViewById(R.id.overview_notifications);
|
||||
|
@ -233,6 +237,15 @@ public class OverviewFragment extends Fragment {
|
|||
}
|
||||
});
|
||||
|
||||
calibrationButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
FragmentManager manager = getFragmentManager();
|
||||
CalibrationDialog calibrationDialog = new CalibrationDialog();
|
||||
calibrationDialog.setContext(getContext());
|
||||
calibrationDialog.show(manager, "CalibrationDialog");
|
||||
}
|
||||
});
|
||||
|
||||
acceptTempButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -278,7 +291,7 @@ public class OverviewFragment extends Fragment {
|
|||
}
|
||||
|
||||
void processQuickWizard() {
|
||||
final BgReading lastBG = MainApp.getDbHelper().lastBg();
|
||||
final BgReading lastBG = GlucoseStatus.lastBg();
|
||||
if (MainApp.getConfigBuilder() == null || ConfigBuilderPlugin.getActiveProfile() == null) // app not initialized yet
|
||||
return;
|
||||
final NSProfile profile = ConfigBuilderPlugin.getActiveProfile().getProfile();
|
||||
|
@ -465,8 +478,8 @@ public class OverviewFragment extends Fragment {
|
|||
@SuppressLint("SetTextI18n")
|
||||
public void updateGUI() {
|
||||
updateNotifications();
|
||||
BgReading actualBG = MainApp.getDbHelper().actualBg();
|
||||
BgReading lastBG = MainApp.getDbHelper().lastBg();
|
||||
BgReading actualBG = GlucoseStatus.actualBg();
|
||||
BgReading lastBG = GlucoseStatus.lastBg();
|
||||
|
||||
if (MainApp.getConfigBuilder() == null || MainApp.getConfigBuilder().getActiveProfile() == null || MainApp.getConfigBuilder().getActiveProfile().getProfile() == null) {// app not initialized yet
|
||||
initializingView.setText(R.string.noprofileset);
|
||||
|
@ -571,6 +584,13 @@ public class OverviewFragment extends Fragment {
|
|||
acceptTempLayout.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// **** Calibration button ****
|
||||
if (MainApp.getSpecificPlugin(SourceXdripPlugin.class).isEnabled(PluginBase.BGSOURCE) && profile != null && GlucoseStatus.actualBg() != null) {
|
||||
calibrationButton.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
calibrationButton.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
TempBasal activeTemp = pump.getTempBasal();
|
||||
if (pump.isTempBasalInProgress()) {
|
||||
cancelTempLayout.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -212,8 +212,8 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
|||
if (splited.length > 0) {
|
||||
switch (splited[0].toUpperCase()) {
|
||||
case "BG":
|
||||
BgReading actualBG = MainApp.getDbHelper().actualBg();
|
||||
BgReading lastBG = MainApp.getDbHelper().lastBg();
|
||||
BgReading actualBG = GlucoseStatus.actualBg();
|
||||
BgReading lastBG = GlucoseStatus.lastBg();
|
||||
|
||||
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
||||
String units = profile.getUnits();
|
||||
|
|
|
@ -142,7 +142,7 @@ public class WatchUpdaterService extends WearableListenerService implements
|
|||
|
||||
private void sendData() {
|
||||
|
||||
BgReading lastBG = MainApp.getDbHelper().lastBg();
|
||||
BgReading lastBG = GlucoseStatus.lastBg();
|
||||
if (lastBG != null) {
|
||||
GlucoseStatus glucoseStatus = GlucoseStatus.getGlucoseStatusData();
|
||||
|
||||
|
@ -250,7 +250,7 @@ public class WatchUpdaterService extends WearableListenerService implements
|
|||
private void resendData() {
|
||||
if(googleApiClient != null && !googleApiClient.isConnected() && !googleApiClient.isConnecting()) { googleApiConnect(); }
|
||||
long startTime = System.currentTimeMillis() - (long)(60000 * 60 * 5.5);
|
||||
BgReading last_bg = MainApp.getDbHelper().lastBg();
|
||||
BgReading last_bg = GlucoseStatus.lastBg();
|
||||
|
||||
if (last_bg == null) return;
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public class PersistentNotificationPlugin implements PluginBase{
|
|||
NSProfile profile = MainApp.getConfigBuilder().getActiveProfile().getProfile();
|
||||
|
||||
|
||||
BgReading lastBG = MainApp.getDbHelper().lastBg();
|
||||
BgReading lastBG = GlucoseStatus.lastBg();
|
||||
GlucoseStatus glucoseStatus = GlucoseStatus.getGlucoseStatusData();
|
||||
|
||||
if(profile != null && lastBG != null) {
|
||||
|
|
86
app/src/main/res/layout/overview_calibration_dialog.xml
Normal file
86
app/src/main/res/layout/overview_calibration_dialog.xml
Normal file
|
@ -0,0 +1,86 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:padding="10dp"
|
||||
android:text="@string/overview_calibration_bg_label"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:padding="10dp"
|
||||
android:id="@+id/overview_calibration_units"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/overview_calibration_bg_minus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@drawable/circle"
|
||||
android:backgroundTint="#ffffff"
|
||||
android:src="@drawable/ic_action_minus"
|
||||
android:tint="#ffffff" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/overview_calibration_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center_horizontal"
|
||||
android:inputType="numberDecimal"
|
||||
android:minWidth="100dp"
|
||||
android:padding="10dp"
|
||||
android:text=""
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/overview_calibration_bg_plus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@drawable/circle"
|
||||
android:backgroundTint="#ffffff"
|
||||
android:src="@drawable/ic_action_add"
|
||||
android:tint="#ffffff" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/overview_calibration_okbutton"
|
||||
style="?android:attr/buttonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="OK"
|
||||
android:textSize="20sp"
|
||||
android:layout_marginTop="30dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -217,8 +217,8 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="Accept new temp\n0.25U/h"
|
||||
|
@ -237,8 +237,8 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="Cancel temp basal"
|
||||
|
@ -257,8 +257,8 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/overview_bolus_label"
|
||||
|
@ -270,12 +270,25 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/overview_calculator_label"
|
||||
android:textColor="@color/colorWizardButton" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/overview_calibration"
|
||||
style="?android:attr/buttonStyle"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/overview_calibration"
|
||||
android:textColor="@color/colorCalibrationButton" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -289,8 +302,8 @@
|
|||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableLeft="@drawable/bread"
|
||||
|
|
|
@ -450,4 +450,9 @@
|
|||
<string name="error_only_numeric_digits_allowed">Povoleny pouze číslice</string>
|
||||
<string name="error_only_numeric_digits_range_allowed">Povoleny pouze čísla v rozsahu %1$s - %2$s</string>
|
||||
<string name="error_phone_not_valid">Neplatné telefonní číslo</string>
|
||||
<string name="calibrationsent">Kalibrace odeslána do xDripu</string>
|
||||
<string name="overview_calibration">Kalibrace</string>
|
||||
<string name="overview_calibration_bg_label">Kalibrační glykémie</string>
|
||||
<string name="send_calibration">Poslat do xDripu kalibraci %.1f ?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ není nainstalován</string>
|
||||
</resources>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<color name="colorSetExtendedButton">#FFDD7792</color>
|
||||
<color name="colorProfileSwitchButton">#ca77dd</color>
|
||||
<color name="colorTempTargetButton">#d43429</color>
|
||||
<color name="colorCalibrationButton">#ceb812</color>
|
||||
|
||||
<color name="colorInProgress">#c45026</color>
|
||||
<color name="colorAffectingIOB">#830400</color>
|
||||
|
|
|
@ -453,7 +453,7 @@
|
|||
<string name="always_use_shortavg_summary">Useful when data from unfiltered sources like xDrip gets noisy.</string>
|
||||
<string name="advancedsettings_title">Advanced Settings</string>
|
||||
<string name="virtualpump_firmware_label">Firmware:</string>
|
||||
<string formatted="false" name="danar_model">Model: %02X Protocol: %02X Code: %02X</string>
|
||||
<string name="danar_model" formatted="false">Model: %02X Protocol: %02X Code: %02X</string>
|
||||
<string name="profile">Profile</string>
|
||||
<string name="openapsama_max_daily_safety_multiplier" translatable="false">max_daily_safety_multiplier</string>
|
||||
<string name="openapsama_max_daily_safety_multiplier_summary">Default value: 3\nThis is a key OpenAPS safety cap. What this does is limit your basals to be 3x (in this people) your biggest basal rate. You likely will not need to change this, but you should be aware that’s what is discussed about “3x max daily; 4x current” for safety caps.</string>
|
||||
|
@ -479,4 +479,9 @@
|
|||
<string name="copy_to_clipboard">Copy To Clipboard</string>
|
||||
<string name="copied_to_clipboard">Copied to clipboard</string>
|
||||
<string name="nav_show_logcat">Show log</string>
|
||||
<string name="overview_calibration">Calibration</string>
|
||||
<string name="overview_calibration_bg_label">Calibration BG</string>
|
||||
<string name="send_calibration" formatted="false">Send calibration %.1f to xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ not installed</string>
|
||||
<string name="calibrationsent">Calibration sent to xDrip</string>
|
||||
</resources>
|
||||
|
|
|
@ -66,14 +66,6 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/full/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/full/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/full/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testFull/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testFull/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testFull/assets" type="java-test-resource" />
|
||||
|
@ -82,6 +74,14 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/testFull/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testFull/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testFull/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFull/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
||||
|
|
Loading…
Reference in a new issue