Merge pull request #1621 from MilosKozak/G6

G6
This commit is contained in:
Milos Kozak 2019-02-08 21:38:46 +01:00 committed by GitHub
commit cc117e6cd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 537 additions and 35 deletions

View file

@ -88,6 +88,8 @@
<action android:name="it.ct.glicemia.ACTION_GLUCOSE_MEASURED" />
<!-- Receiver from DexcomG5 -->
<action android:name="com.dexcom.cgm.DATA" />
<action android:name="com.dexcom.cgm.AndroidAPSEVGCallback.BROADCAST" />
<action android:name="com.dexcom.cgm.g5.AndroidAPSEVGCallback.BROADCAST" />
<!-- Receiver from Poctech -->
<action android:name="com.china.poctech.data" />
</intent-filter>

View file

@ -68,6 +68,8 @@ import info.nightscout.androidaps.plugins.Sensitivity.SensitivityOref1Plugin;
import info.nightscout.androidaps.plugins.Sensitivity.SensitivityWeightedAveragePlugin;
import info.nightscout.androidaps.plugins.SmsCommunicator.SmsCommunicatorPlugin;
import info.nightscout.androidaps.plugins.Source.SourceDexcomG5Plugin;
import info.nightscout.androidaps.plugins.Source.SourceDexcomG6Plugin;
import info.nightscout.androidaps.plugins.Source.SourceEversensePlugin;
import info.nightscout.androidaps.plugins.Source.SourceGlimpPlugin;
import info.nightscout.androidaps.plugins.Source.SourceMM640gPlugin;
import info.nightscout.androidaps.plugins.Source.SourceNSClientPlugin;
@ -180,7 +182,9 @@ public class MainApp extends Application {
pluginsList.add(SourceMM640gPlugin.getPlugin());
pluginsList.add(SourceGlimpPlugin.getPlugin());
pluginsList.add(SourceDexcomG5Plugin.getPlugin());
pluginsList.add(SourceDexcomG6Plugin.getPlugin());
pluginsList.add(SourcePoctechPlugin.getPlugin());
pluginsList.add(SourceEversensePlugin.getPlugin());
if (Config.SMSCOMMUNICATORENABLED) pluginsList.add(SmsCommunicatorPlugin.getPlugin());
pluginsList.add(FoodPlugin.getPlugin());

View file

@ -470,14 +470,14 @@ public class NSUpload {
DbLogger.dbAdd(intent, data.toString());
}
public static void uploadBg(BgReading reading) {
public static void uploadBg(BgReading reading, String source) {
Context context = MainApp.instance().getApplicationContext();
Bundle bundle = new Bundle();
bundle.putString("action", "dbAdd");
bundle.putString("collection", "entries");
JSONObject data = new JSONObject();
try {
data.put("device", "AndroidAPS-DexcomG5");
data.put("device", source);
data.put("date", reading.date);
data.put("dateString", DateUtil.toISOString(reading.date));
data.put("sgv", reading.value);

View file

@ -110,6 +110,7 @@ import info.nightscout.androidaps.plugins.Overview.graphData.GraphData;
import info.nightscout.androidaps.plugins.Overview.notifications.NotificationRecyclerViewAdapter;
import info.nightscout.androidaps.plugins.Overview.notifications.NotificationStore;
import info.nightscout.androidaps.plugins.Source.SourceDexcomG5Plugin;
import info.nightscout.androidaps.plugins.Source.SourceDexcomG6Plugin;
import info.nightscout.androidaps.plugins.Source.SourceXdripPlugin;
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
import info.nightscout.androidaps.plugins.Treatments.fragments.ProfileViewerDialog;
@ -664,6 +665,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
public void onClick(View v) {
boolean xdrip = SourceXdripPlugin.getPlugin().isEnabled(PluginType.BGSOURCE);
boolean g5 = SourceDexcomG5Plugin.getPlugin().isEnabled(PluginType.BGSOURCE);
boolean g6 = SourceDexcomG6Plugin.getPlugin().isEnabled(PluginType.BGSOURCE);
String units = ProfileFunctions.getInstance().getProfileUnits();
FragmentManager manager = getFragmentManager();
@ -686,7 +688,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
if (xdrip) {
CalibrationDialog calibrationDialog = new CalibrationDialog();
calibrationDialog.show(manager, "CalibrationDialog");
} else if (g5) {
} else if (g5 || g6) {
try {
Intent i = new Intent("com.dexcom.cgm.activities.MeterEntryActivity");
startActivity(i);
@ -702,6 +704,10 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
openCgmApp("com.dexcom.cgm.region5.mgdl");
else if (g5 && units.equals(Constants.MMOL))
openCgmApp("com.dexcom.cgm.region5.mmol");
else if (g6 && units.equals(Constants.MGDL))
openCgmApp("com.dexcom.g6.region3.mgdl");
else if (g6 && units.equals(Constants.MMOL))
openCgmApp("com.dexcom.g6.region3.mmol");
break;
case R.id.overview_treatmentbutton:
NewTreatmentDialog treatmentDialogFragment = new NewTreatmentDialog();

View file

@ -9,16 +9,21 @@ import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.Config;
import java.util.Arrays;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.db.BgReading;
import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.interfaces.BgSourceInterface;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PluginDescription;
import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.androidaps.services.Intents;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.SP;
/**
@ -42,7 +47,7 @@ public class SourceDexcomG5Plugin extends PluginBase implements BgSourceInterfac
.fragmentClass(BGSourceFragment.class.getName())
.pluginName(R.string.DexcomG5)
.shortName(R.string.dexcomG5_shortname)
.preferencesId(R.xml.pref_dexcomg5)
.preferencesId(R.xml.pref_bgsource)
.description(R.string.description_source_dexcom_g5)
);
}
@ -58,6 +63,16 @@ public class SourceDexcomG5Plugin extends PluginBase implements BgSourceInterfac
if (!isEnabled(PluginType.BGSOURCE)) return;
if (intent.getAction().equals(Intents.DEXCOMG5_BG))
handleNewDataOld(intent);
if (intent.getAction().equals(Intents.DEXCOMG5_BG_NEW))
handleNewDataNew(intent);
}
public void handleNewDataOld(Intent intent) {
// onHandleIntent Bundle{ data => [{"m_time":1511939180,"m_trend":"NotComputable","m_value":335}]; android.support.content.wakelockid => 95; }Bundle
Bundle bundle = intent.getExtras();
if (bundle == null) return;
@ -81,7 +96,7 @@ public class SourceDexcomG5Plugin extends PluginBase implements BgSourceInterfac
bgReading.raw = 0;
boolean isNew = MainApp.getDbHelper().createIfNotExists(bgReading, "DexcomG5");
if (isNew && SP.getBoolean(R.string.key_dexcomg5_nsupload, false)) {
NSUpload.uploadBg(bgReading);
NSUpload.uploadBg(bgReading, "AndroidAPS-DexcomG5");
}
if (isNew && SP.getBoolean(R.string.key_dexcomg5_xdripupload, false)) {
NSUpload.sendToXdrip(bgReading);
@ -92,4 +107,126 @@ public class SourceDexcomG5Plugin extends PluginBase implements BgSourceInterfac
log.error("Exception: ", e);
}
}
public void handleNewDataNew(Intent intent) {
Bundle bundle = intent.getExtras();
if (bundle == null) return;
if (L.isEnabled(L.BGSOURCE)) {
if (bundle.containsKey("transmitterSystemTime"))
log.debug("transmitterSystemTime: " + DateUtil.dateAndTimeFullString(bundle.getLong("transmitterSystemTime")));
if (bundle.containsKey("transmitterRemainingTime"))
log.debug("transmitterRemainingTime: " + DateUtil.dateAndTimeFullString(bundle.getLong("transmitterRemainingTime")));
log.debug("transmitterId: " + bundle.getString("transmitterId"));
if (bundle.containsKey("transmitterActivatedOn"))
log.debug("transmitterActivatedOn: " + DateUtil.dateAndTimeFullString(bundle.getLong("transmitterActivatedOn")));
log.debug("transmitterVersion: " + bundle.getString("transmitterVersion"));
log.debug("transmitterSoftwareNumber: " + bundle.getString("transmitterSoftwareNumber"));
log.debug("transmitterStorageTimeDays: " + bundle.getInt("transmitterStorageTimeDays"));
log.debug("transmitterApiVersion: " + bundle.getInt("transmitterApiVersion"));
log.debug("transmitterMaxRuntimeDays: " + bundle.getInt("transmitterMaxRuntimeDays"));
log.debug("transmitterMaxStorageTimeDays: " + bundle.getInt("transmitterMaxStorageTimeDays"));
log.debug("transmitterCGMProcessorFirmwareVersion: " + bundle.getString("transmitterCGMProcessorFirmwareVersion"));
log.debug("transmitterBleRadioFirmwareVersion: " + bundle.getString("transmitterBleRadioFirmwareVersion"));
log.debug("transmitterHardwareVersion: " + bundle.getInt("transmitterHardwareVersion"));
log.debug("transmitterBleSoftDeviceVersion: " + bundle.getString("transmitterBleSoftDeviceVersion"));
log.debug("transmitterNordicAsicHwID: " + bundle.getInt("transmitterNordicAsicHwID"));
log.debug("transmitterSessionTimeDays: " + bundle.getInt("transmitterSessionTimeDays"));
log.debug("transmitterFeatureFlags: " + bundle.getInt("transmitterFeatureFlags"));
}
if (bundle.containsKey("sensorInsertionTime")) {
long sensorInsertionTime = bundle.getLong("sensorInsertionTime");
if (L.isEnabled(L.BGSOURCE))
log.debug("sensorInsertionTime: " + DateUtil.dateAndTimeFullString(sensorInsertionTime));
if (SP.getBoolean(R.string.key_dexcom_lognssensorchange, false)) {
try {
if (MainApp.getDbHelper().getCareportalEventFromTimestamp(sensorInsertionTime) == null) {
JSONObject data = new JSONObject();
data.put("enteredBy", "AndroidAPS-DexcomG5");
data.put("created_at", DateUtil.toISOString(sensorInsertionTime));
data.put("eventType", CareportalEvent.SENSORCHANGE);
NSUpload.uploadCareportalEntryToNS(data);
}
} catch (JSONException e) {
log.error("Unhandled exception", e);
}
}
}
if (bundle.containsKey("glucoseValues")) {
int[] glucoseValues = bundle.getIntArray("glucoseValues");
int[] glucoseRecordIDs = bundle.getIntArray("glucoseRecordIDs");
long[] glucoseRecordedTimestamps = bundle.getLongArray("glucoseRecordedTimestamps");
long[] glucoseSessionStartTimes = bundle.getLongArray("glucoseSessionStartTimes");
long[] glucoseSystemTimestamps = bundle.getLongArray("glucoseSystemTimestamps");
String[] glucoseTransmitterIDS = bundle.getStringArray("glucoseTransmitterIDS");
long[] glucoseTransmitterTimestamps = bundle.getLongArray("glucoseTransmitterTimestamps");
String[] glucoseTrendsArrows = bundle.getStringArray("glucoseTrendsArrows");
boolean[] glucoseWasBackfilled = bundle.getBooleanArray("glucoseWasBackfilled");
if (L.isEnabled(L.BGSOURCE)) {
log.debug("glucoseValues", Arrays.toString(glucoseValues));
log.debug("glucoseRecordIDs", Arrays.toString(glucoseRecordIDs));
log.debug("glucoseRecordedTimestamps", Arrays.toString(glucoseRecordedTimestamps));
log.debug("glucoseSessionStartTimes", Arrays.toString(glucoseSessionStartTimes));
log.debug("glucoseSystemTimestamps", Arrays.toString(glucoseSystemTimestamps));
log.debug("glucoseTransmitterIDS", Arrays.toString(glucoseTransmitterIDS));
log.debug("glucoseTransmitterTimestamps", Arrays.toString(glucoseTransmitterTimestamps));
log.debug("glucoseTrendsArrows", Arrays.toString(glucoseTrendsArrows));
log.debug("glucoseWasBackfilled", Arrays.toString(glucoseWasBackfilled));
}
for (int i = 0; i < glucoseValues.length; i++) {
BgReading bgReading = new BgReading();
bgReading.value = glucoseValues[i];
bgReading.direction = glucoseTrendsArrows[i];
bgReading.date = glucoseTransmitterTimestamps[i];
bgReading.raw = 0;
boolean isNew = MainApp.getDbHelper().createIfNotExists(bgReading, "DexcomG5");
if (isNew && SP.getBoolean(R.string.key_dexcomg5_nsupload, false)) {
NSUpload.uploadBg(bgReading, "AndroidAPS-DexcomG5");
}
if (isNew && SP.getBoolean(R.string.key_dexcomg5_xdripupload, false)) {
NSUpload.sendToXdrip(bgReading);
}
}
}
if (bundle.containsKey("meterValues")) {
String[] meterEntryTypes = bundle.getStringArray("meterEntryTypes");
long[] meterTimestamps = bundle.getLongArray("meterTimestamps");
int[] meterValues = bundle.getIntArray("meterValues");
long[] meterRecordedTimestamps = bundle.getLongArray("meterRecordedTimestamps");
int[] meterTransmitterIDs = bundle.getIntArray("meterTransmitterIDs");
long[] meterTransmitterTimestamps = bundle.getLongArray("meterTransmitterTimestamps");
if (L.isEnabled(L.BGSOURCE)) {
log.debug("meterValues", Arrays.toString(meterValues));
log.debug("meterEntryTypes", Arrays.toString(meterEntryTypes));
log.debug("meterTimestamps", Arrays.toString(meterTimestamps));
log.debug("meterTransmitterTimestamps", Arrays.toString(meterTransmitterTimestamps));
log.debug("meterRecordedTimestamps", Arrays.toString(meterRecordedTimestamps));
log.debug("meterTransmitterIDs", Arrays.toString(meterTransmitterIDs));
}
for (int i = 0; i < meterValues.length; i++) {
try {
if (MainApp.getDbHelper().getCareportalEventFromTimestamp(meterTimestamps[i]) == null) {
JSONObject data = new JSONObject();
data.put("enteredBy", "AndroidAPS-DexcomG5");
data.put("created_at", DateUtil.toISOString(meterTimestamps[i]));
data.put("eventType", CareportalEvent.BGCHECK);
data.put("glucoseType", "Finger");
data.put("glucose", meterValues[i]);
data.put("units", Constants.MGDL);
NSUpload.uploadCareportalEntryToNS(data);
}
} catch (JSONException e) {
log.error("Unhandled exception", e);
}
}
}
}
}

View file

@ -0,0 +1,174 @@
package info.nightscout.androidaps.plugins.Source;
import android.content.Intent;
import android.os.Bundle;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.db.BgReading;
import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.interfaces.BgSourceInterface;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PluginDescription;
import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.SP;
/**
* Created by mike on 30.11.2018.
*/
public class SourceDexcomG6Plugin extends PluginBase implements BgSourceInterface {
private static Logger log = LoggerFactory.getLogger(L.BGSOURCE);
private static SourceDexcomG6Plugin plugin = null;
public static SourceDexcomG6Plugin getPlugin() {
if (plugin == null)
plugin = new SourceDexcomG6Plugin();
return plugin;
}
private SourceDexcomG6Plugin() {
super(new PluginDescription()
.mainType(PluginType.BGSOURCE)
.fragmentClass(BGSourceFragment.class.getName())
.pluginName(R.string.DexcomG6)
.shortName(R.string.dexcomG6_shortname)
.preferencesId(R.xml.pref_bgsource)
.description(R.string.description_source_dexcom_g6)
);
}
@Override
public boolean advancedFilteringSupported() {
return true;
}
@Override
public void handleNewData(Intent intent) {
if (!isEnabled(PluginType.BGSOURCE)) return;
Bundle bundle = intent.getExtras();
if (bundle == null) return;
if (L.isEnabled(L.BGSOURCE)) {
if (bundle.containsKey("transmitterSystemTime"))
log.debug("transmitterSystemTime: " + DateUtil.dateAndTimeFullString(bundle.getLong("transmitterSystemTime")));
log.debug("transmitterId: " + bundle.getString("transmitterId"));
if (bundle.containsKey("transmitterActivatedOn"))
log.debug("transmitterActivatedOn: " + DateUtil.dateAndTimeFullString(bundle.getLong("transmitterActivatedOn")));
log.debug("transmitterVersion: " + bundle.getString("transmitterVersion"));
log.debug("transmitterSoftwareNumber: " + bundle.getString("transmitterSoftwareNumber"));
log.debug("transmitterStorageTimeDays: " + bundle.getInt("transmitterStorageTimeDays"));
log.debug("transmitterApiVersion: " + bundle.getInt("transmitterApiVersion"));
log.debug("transmitterMaxRuntimeDays: " + bundle.getInt("transmitterMaxRuntimeDays"));
log.debug("transmitterMaxStorageTimeDays: " + bundle.getInt("transmitterMaxStorageTimeDays"));
log.debug("transmitterCGMProcessorFirmwareVersion: " + bundle.getString("transmitterCGMProcessorFirmwareVersion"));
log.debug("transmitterBleRadioFirmwareVersion: " + bundle.getString("transmitterBleRadioFirmwareVersion"));
log.debug("transmitterHardwareVersion: " + bundle.getInt("transmitterHardwareVersion"));
log.debug("transmitterBleSoftDeviceVersion: " + bundle.getString("transmitterBleSoftDeviceVersion"));
log.debug("transmitterNordicAsicHwID: " + bundle.getInt("transmitterNordicAsicHwID"));
log.debug("transmitterSessionTimeDays: " + bundle.getInt("transmitterSessionTimeDays"));
log.debug("transmitterFeatureFlags: " + bundle.getInt("transmitterFeatureFlags"));
if (bundle.containsKey("sensorCode"))
log.debug("sensorCode: " + bundle.getString("sensorCode"));
}
if (bundle.containsKey("sensorInsertionTime")) {
long sensorInsertionTime = bundle.getLong("sensorInsertionTime");
if (L.isEnabled(L.BGSOURCE))
log.debug("sensorInsertionTime: " + DateUtil.dateAndTimeFullString(sensorInsertionTime));
if (SP.getBoolean(R.string.key_dexcom_lognssensorchange, false)) {
try {
if (MainApp.getDbHelper().getCareportalEventFromTimestamp(sensorInsertionTime) == null) {
JSONObject data = new JSONObject();
data.put("enteredBy", "AndroidAPS-DexcomG6");
data.put("created_at", DateUtil.toISOString(sensorInsertionTime));
data.put("eventType", CareportalEvent.SENSORCHANGE);
NSUpload.uploadCareportalEntryToNS(data);
}
} catch (JSONException e) {
log.error("Unhandled exception", e);
}
}
}
if (bundle.containsKey("evgTimestamps")) {
long[] timestamps = bundle.getLongArray("evgTimestamps");
long[] transmitterTimes = bundle.getLongArray("transmitterTimes");
int[] evgs = bundle.getIntArray("evgs");
int[] predictiveEVGs = bundle.getIntArray("predictiveEVGs");
String[] trendArrows = bundle.getStringArray("trendArrows");
if (L.isEnabled(L.BGSOURCE)) {
log.debug("timestamps", Arrays.toString(timestamps));
log.debug("transmitterTimes", Arrays.toString(transmitterTimes));
log.debug("evgs", Arrays.toString(evgs));
log.debug("predictiveEVGs", Arrays.toString(predictiveEVGs));
log.debug("trendArrows", Arrays.toString(trendArrows));
}
for (int i = 0; i < transmitterTimes.length; i++) {
BgReading bgReading = new BgReading();
bgReading.value = evgs[i];
bgReading.direction = trendArrows[i];
bgReading.date = timestamps[i];
bgReading.raw = 0;
boolean isNew = MainApp.getDbHelper().createIfNotExists(bgReading, "DexcomG6");
if (isNew && SP.getBoolean(R.string.key_dexcomg5_nsupload, false)) {
NSUpload.uploadBg(bgReading, "AndroidAPS-DexcomG6");
}
if (isNew && SP.getBoolean(R.string.key_dexcomg5_xdripupload, false)) {
NSUpload.sendToXdrip(bgReading);
}
}
}
if (bundle.containsKey("meterValues")) {
int[] meterValues = bundle.getIntArray("meterValues");
String[] meterEntryTypes = bundle.getStringArray("meterEntryTypes");
long[] meterTimestamps = bundle.getLongArray("meterTimestamps");
long[] meterTransmitterTimestamps = bundle.getLongArray("meterTransmitterTimestamps");
long[] meterRecordedTimestamps = bundle.getLongArray("meterRecordedTimestamps");
int[] meterRecordIDs = bundle.getIntArray("meterRecordIDs");
if (L.isEnabled(L.BGSOURCE)) {
log.debug("meterValues", Arrays.toString(meterValues));
log.debug("meterEntryTypes", Arrays.toString(meterEntryTypes));
log.debug("meterTimestamps", Arrays.toString(meterTimestamps));
log.debug("meterTransmitterTimestamps", Arrays.toString(meterTransmitterTimestamps));
log.debug("meterRecordedTimestamps", Arrays.toString(meterRecordedTimestamps));
log.debug("meterRecordIDs", Arrays.toString(meterRecordIDs));
}
for (int i = 0; i < meterValues.length; i++) {
try {
if (MainApp.getDbHelper().getCareportalEventFromTimestamp(meterTimestamps[i]) == null) {
JSONObject data = new JSONObject();
data.put("enteredBy", "AndroidAPS-DexcomG6");
data.put("created_at", DateUtil.toISOString(meterTimestamps[i]));
data.put("eventType", CareportalEvent.BGCHECK);
data.put("glucoseType", "Finger");
data.put("glucose", meterValues[i]);
data.put("units", Constants.MGDL);
NSUpload.uploadCareportalEntryToNS(data);
}
} catch (JSONException e) {
log.error("Unhandled exception", e);
}
}
}
}
}

View file

@ -0,0 +1,154 @@
package info.nightscout.androidaps.plugins.Source;
import android.content.Intent;
import android.os.Bundle;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.db.BgReading;
import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.interfaces.BgSourceInterface;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PluginDescription;
import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.NSClientInternal.NSUpload;
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.SP;
/**
* Created by mike on 28.11.2017.
*/
public class SourceEversensePlugin extends PluginBase implements BgSourceInterface {
private static Logger log = LoggerFactory.getLogger(L.BGSOURCE);
private static SourceEversensePlugin plugin = null;
public static SourceEversensePlugin getPlugin() {
if (plugin == null)
plugin = new SourceEversensePlugin();
return plugin;
}
private SourceEversensePlugin() {
super(new PluginDescription()
.mainType(PluginType.BGSOURCE)
.fragmentClass(BGSourceFragment.class.getName())
.pluginName(R.string.eversense)
.shortName(R.string.eversense_shortname)
.preferencesId(R.xml.pref_poctech)
.description(R.string.description_source_eversense)
);
}
@Override
public boolean advancedFilteringSupported() {
return false;
}
@Override
public void handleNewData(Intent intent) {
if (!isEnabled(PluginType.BGSOURCE)) return;
Bundle bundle = intent.getExtras();
if (bundle == null) return;
if (L.isEnabled(L.BGSOURCE)) {
if (bundle.containsKey("currentCalibrationPhase"))
log.debug("currentCalibrationPhase: " + bundle.getString("currentCalibrationPhase"));
if (bundle.containsKey("placementModeInProgress"))
log.debug("placementModeInProgress: " + bundle.getBoolean("placementModeInProgress"));
if (bundle.containsKey("glucoseLevel"))
log.debug("glucoseLevel: " + bundle.getInt("glucoseLevel"));
if (bundle.containsKey("glucoseTrendDirection"))
log.debug("glucoseTrendDirection: " + bundle.getString("glucoseTrendDirection"));
if (bundle.containsKey("glucoseTimestamp"))
log.debug("glucoseTimestamp: " + DateUtil.dateAndTimeFullString(bundle.getLong("glucoseTimestamp")));
if (bundle.containsKey("batteryLevel"))
log.debug("batteryLevel: " + bundle.getString("batteryLevel"));
if (bundle.containsKey("signalStrength"))
log.debug("signalStrength: " + bundle.getString("signalStrength"));
if (bundle.containsKey("transmitterVersionNumber"))
log.debug("transmitterVersionNumber: " + bundle.getString("transmitterVersionNumber"));
if (bundle.containsKey("isXLVersion"))
log.debug("isXLVersion: " + bundle.getBoolean("isXLVersion"));
if (bundle.containsKey("transmitterModelNumber"))
log.debug("transmitterModelNumber: " + bundle.getString("transmitterModelNumber"));
if (bundle.containsKey("transmitterSerialNumber"))
log.debug("transmitterSerialNumber: " + bundle.getString("transmitterSerialNumber"));
if (bundle.containsKey("transmitterAddress"))
log.debug("transmitterAddress: " + bundle.getString("transmitterAddress"));
if (bundle.containsKey("sensorInsertionTimestamp"))
log.debug("sensorInsertionTimestamp: " + DateUtil.dateAndTimeFullString(bundle.getLong("sensorInsertionTimestamp")));
if (bundle.containsKey("transmitterVersionNumber"))
log.debug("transmitterVersionNumber: " + bundle.getString("transmitterVersionNumber"));
if (bundle.containsKey("transmitterConnectionState"))
log.debug("transmitterConnectionState: " + bundle.getString("transmitterConnectionState"));
}
if (bundle.containsKey("glucoseLevels")) {
int[] glucoseLevels = bundle.getIntArray("glucoseLevels");
int[] glucoseRecordNumbers = bundle.getIntArray("glucoseRecordNumbers");
long[] glucoseTimestamps = bundle.getLongArray("glucoseTimestamps");
if (L.isEnabled(L.BGSOURCE)) {
log.debug("glucoseLevels", Arrays.toString(glucoseLevels));
log.debug("glucoseRecordNumbers", Arrays.toString(glucoseRecordNumbers));
log.debug("glucoseTimestamps", Arrays.toString(glucoseTimestamps));
}
for (int i = 0; i < glucoseLevels.length; i++) {
BgReading bgReading = new BgReading();
bgReading.value = glucoseLevels[i];
bgReading.date = glucoseTimestamps[i];
bgReading.raw = 0;
boolean isNew = MainApp.getDbHelper().createIfNotExists(bgReading, "Eversense");
if (isNew && SP.getBoolean(R.string.key_dexcomg5_nsupload, false)) {
NSUpload.uploadBg(bgReading, "AndroidAPS-Eversense");
}
if (isNew && SP.getBoolean(R.string.key_dexcomg5_xdripupload, false)) {
NSUpload.sendToXdrip(bgReading);
}
}
}
if (bundle.containsKey("calibrationGlucoseLevels")) {
int[] calibrationGlucoseLevels = bundle.getIntArray("calibrationGlucoseLevels");
long[] calibrationTimestamps = bundle.getLongArray("calibrationTimestamps");
long[] calibrationRecordNumbers = bundle.getLongArray("calibrationRecordNumbers");
if (L.isEnabled(L.BGSOURCE)) {
log.debug("calibrationGlucoseLevels", Arrays.toString(calibrationGlucoseLevels));
log.debug("calibrationTimestamps", Arrays.toString(calibrationTimestamps));
log.debug("calibrationRecordNumbers", Arrays.toString(calibrationRecordNumbers));
}
for (int i = 0; i < calibrationGlucoseLevels.length; i++) {
try {
if (MainApp.getDbHelper().getCareportalEventFromTimestamp(calibrationTimestamps[i]) == null) {
JSONObject data = new JSONObject();
data.put("enteredBy", "AndroidAPS-Eversense");
data.put("created_at", DateUtil.toISOString(calibrationTimestamps[i]));
data.put("eventType", CareportalEvent.BGCHECK);
data.put("glucoseType", "Finger");
data.put("glucose", calibrationGlucoseLevels[i]);
data.put("units", Constants.MGDL);
NSUpload.uploadCareportalEntryToNS(data);
}
} catch (JSONException e) {
log.error("Unhandled exception", e);
}
}
}
}
}

View file

@ -99,7 +99,7 @@ public class SourceNSClientPlugin extends PluginBase implements BgSourceInterfac
public void detectSource(String source, long timeStamp) {
if (timeStamp > lastBGTimeStamp) {
if (source.contains("G5 Native") || source.contains("G6 Native") || source.contains("AndroidAPS-DexcomG5"))
if (source.contains("G5 Native") || source.contains("G6 Native") || source.contains("AndroidAPS-DexcomG5") || source.contains("AndroidAPS-DexcomG6"))
isAdvancedFilteringEnabled = true;
else
isAdvancedFilteringEnabled = false;

View file

@ -80,7 +80,7 @@ public class SourcePoctechPlugin extends PluginBase implements BgSourceInterface
bgReading.value = bgReading.value * Constants.MMOLL_TO_MGDL;
boolean isNew = MainApp.getDbHelper().createIfNotExists(bgReading, "Poctech");
if (isNew && SP.getBoolean(R.string.key_dexcomg5_nsupload, false)) {
NSUpload.uploadBg(bgReading);
NSUpload.uploadBg(bgReading, "AndroidAPS-Poctech");
}
if (isNew && SP.getBoolean(R.string.key_dexcomg5_xdripupload, false)) {
NSUpload.sendToXdrip(bgReading);

View file

@ -26,6 +26,8 @@ import info.nightscout.androidaps.plugins.ProfileNS.NSProfilePlugin;
import info.nightscout.androidaps.plugins.PumpDanaR.activities.DanaRNSHistorySync;
import info.nightscout.androidaps.plugins.SmsCommunicator.SmsCommunicatorPlugin;
import info.nightscout.androidaps.plugins.Source.SourceDexcomG5Plugin;
import info.nightscout.androidaps.plugins.Source.SourceDexcomG6Plugin;
import info.nightscout.androidaps.plugins.Source.SourceEversensePlugin;
import info.nightscout.androidaps.plugins.Source.SourceGlimpPlugin;
import info.nightscout.androidaps.plugins.Source.SourceMM640gPlugin;
import info.nightscout.androidaps.plugins.Source.SourceNSClientPlugin;
@ -68,8 +70,14 @@ public class DataService extends IntentService {
SourceGlimpPlugin.getPlugin().handleNewData(intent);
} else if (Intents.DEXCOMG5_BG.equals(action)) {
SourceDexcomG5Plugin.getPlugin().handleNewData(intent);
} else if (Intents.DEXCOMG5_BG_NEW.equals(action)) {
SourceDexcomG5Plugin.getPlugin().handleNewData(intent);
} else if (Intents.DEXCOMG6_BG.equals(action)) {
SourceDexcomG6Plugin.getPlugin().handleNewData(intent);
} else if (Intents.POCTECH_BG.equals(action)) {
SourcePoctechPlugin.getPlugin().handleNewData(intent);
} else if (Intents.EVERSENSE_BG.equals(action)) {
SourceEversensePlugin.getPlugin().handleNewData(intent);
} else if (Intents.ACTION_NEW_SGV.equals(action)) {
SourceNSClientPlugin.getPlugin().handleNewData(intent);
} else if (Intents.ACTION_NEW_PROFILE.equals(action)) {

View file

@ -49,6 +49,9 @@ public interface Intents {
String GLIMP_BG = "it.ct.glicemia.ACTION_GLUCOSE_MEASURED";
String DEXCOMG5_BG = "com.dexcom.cgm.DATA";
String DEXCOMG5_BG_NEW = "com.dexcom.cgm.g5.AndroidAPSEVGCallback.BROADCAST";
String DEXCOMG6_BG = "com.dexcom.cgm.AndroidAPSEVGCallback.BROADCAST";
String EVERSENSE_BG = "com.senseonics.AndroidAPSEventSubscriber.BROADCAST";
String POCTECH_BG = "com.china.poctech.data";
}

View file

@ -704,7 +704,7 @@
<string name="btwatchdog_summary">Skakel asb die foon se bluetooth af vir een sekonde Indien geen verbinding met die pomp moontlik is nie. Dit mag help vir sommige selfone waar die bluetooth stapel vries.</string>
<string name="DexcomG5">DexcomG5 App (gelapte)</string>
<string name="dexcomg5_nsupload_title">BG data oplaai na NS</string>
<string name="dexcomg5_upload">G5 oplaai instellings</string>
<string name="bgsource_upload">G5 oplaai instellings</string>
<string name="poctech_upload">Poctech oplaai instellings</string>
<string name="wear_detailed_delta_title">Wys gedetailleerde delta</string>
<string name="wear_detailed_delta_summary">Wys delta met een meer desimale plek</string>

View file

@ -710,7 +710,7 @@
<string name="btwatchdog_summary">Изключва Bluetooth на телефона за една секунда, ако няма връзка с помпата. Това може да помогне на някои телефони, където Bluetooth блокира.</string>
<string name="DexcomG5">Dexcom G5 приложение (модифицирано)</string>
<string name="dexcomg5_nsupload_title">Качвай данните за КЗ в NS</string>
<string name="dexcomg5_upload">G5 настройки за качване</string>
<string name="bgsource_upload">G5 настройки за качване</string>
<string name="poctech_upload">Poctech настройки за качване</string>
<string name="wear_detailed_delta_title">Показвай подробна делта</string>
<string name="wear_detailed_delta_summary">Показвай делта с още един десетичен знак</string>

View file

@ -704,7 +704,7 @@
<string name="btwatchdog_summary">Vypne na 1 sek bluetooth v telefonu, pokud se nedaří připojit k pumpě. Může to pomoci u telefonů, které mají problémy s BT</string>
<string name="DexcomG5">DexcomG5 aplikace (upravená)</string>
<string name="dexcomg5_nsupload_title">Nahrávat data do NS</string>
<string name="dexcomg5_upload">Nastavení nahrávání z G5</string>
<string name="bgsource_upload">Nastavení nahrávání z G5</string>
<string name="poctech_upload">Nastavení nahrávání z Poctech</string>
<string name="wear_detailed_delta_title">Zobrazovat detailní změny</string>
<string name="wear_detailed_delta_summary">Zobrazovat rozdíl s jedním desetinným místem navíc</string>

View file

@ -712,7 +712,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate</string>
<string name="btwatchdog_summary">Deaktiviert Bluetooth kurzzeitig, falls keine Verbindung zur Pumpe besteht. Dies kann für Smartphones mit Verbindungsproblemen nützlich sein.</string>
<string name="DexcomG5">DexcomG5 App (gepatcht)</string>
<string name="dexcomg5_nsupload_title">Speichere BZ-Werte in Nightscout</string>
<string name="dexcomg5_upload">G5 Upload Einstellungen</string>
<string name="bgsource_upload">G5 Upload Einstellungen</string>
<string name="poctech_upload">Poctech Upload-Einstellungen</string>
<string name="wear_detailed_delta_title">Zeige detailliertes Delta</string>
<string name="wear_detailed_delta_summary">Delta wird mit Dezimalstelle angezeigt.</string>

View file

@ -703,7 +703,7 @@
<string name="btwatchdog_summary">Απενεργοποιεί το bluetooth του τηλεφώνου για ένα δευτερόλεπτο αν δεν είναι δυνατή η σύνδεση με την αντλία. Αυτό μπορεί να βοηθήσει σε ορισμένα τηλέφωνα όπου το bluetooth παγώνει.</string>
<string name="DexcomG5">Εφαρμογή DexcomG5 (τροποποιημένη)</string>
<string name="dexcomg5_nsupload_title">Ανέβασμα δεδομένων BG στο NS</string>
<string name="dexcomg5_upload">Ανέβασμα ρυθμίσεων G5</string>
<string name="bgsource_upload">Ανέβασμα ρυθμίσεων G5</string>
<string name="poctech_upload">Ανέβασμα ρυθμίσεων Poctech</string>
<string name="wear_detailed_delta_title">Εμφάνιση λεπτομερών στατιστικών</string>
<string name="wear_detailed_delta_summary">Δείξτε τη διαφορά με ένα επιπλέον δεκαδικό ψηφίο</string>

View file

@ -703,7 +703,7 @@
<string name="btwatchdog_summary">Apaga el bluetooth del móvil por un segundo si no hay conexión con la bomba. Esto ayuda con algunos móviles con problemas de establecer conexión bluetooth estable.</string>
<string name="DexcomG5">Aplicación de DexcomG5 (parcheada)</string>
<string name="dexcomg5_nsupload_title">Subir datos BG a NS</string>
<string name="dexcomg5_upload">Ajuste de subida datos G5</string>
<string name="bgsource_upload">Ajuste de subida datos G5</string>
<string name="poctech_upload">Configuración de carga Poctech</string>
<string name="wear_detailed_delta_title">Mostrar detalles delta</string>
<string name="wear_detailed_delta_summary">Mostrar delta con un decimal mas</string>

View file

@ -705,7 +705,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="btwatchdog_summary">Ceci va arrêter le Bluetooth du téléphone pour une seconde si la connexion pompe nest pas possible. Cela peut assister certains téléphones dont la connexion Bluetooth se bloque.</string>
<string name="DexcomG5">App Dexcom G5 (adaptée)</string>
<string name="dexcomg5_nsupload_title">Remonter les données glycémiques vers NS</string>
<string name="dexcomg5_upload">Paramètres de téléchargement du G5</string>
<string name="bgsource_upload">Paramètres de téléchargement du G5</string>
<string name="poctech_upload">Paramètres de téléchargement Poctech</string>
<string name="wear_detailed_delta_title">Afficher le delta détaillé</string>
<string name="wear_detailed_delta_summary">Afficher delta avec une décimale supplémentaire</string>

View file

@ -702,7 +702,7 @@
<string name="btwatchdog_summary">Spegnere il bluetooth del telefono per un secondo se non è possibile alcuna connessione al micro. Questo può aiutare in alcuni telefoni.</string>
<string name="DexcomG5">DexcomG5 App (con correzione)</string>
<string name="dexcomg5_nsupload_title">Caricare dati di BG al NS</string>
<string name="dexcomg5_upload">Impostazioni caricamento G5</string>
<string name="bgsource_upload">Impostazioni caricamento G5</string>
<string name="poctech_upload">Impostazioni di caricamento Poctech</string>
<string name="wear_detailed_delta_title">Visualizza dettagliata delta</string>
<string name="wear_detailed_delta_summary">Visualizza delta con una cifra decimale più</string>

View file

@ -702,7 +702,7 @@
<string name="btwatchdog_summary">펌프에 연결이 되지 않을때 폰의 블루투스를 1초간 껐다 켭니다. 블루투스 스택이 정지되는 일부폰에 이 기능이 도움이 됩니다.</string>
<string name="DexcomG5">DexcomG5 앱(패치버전)</string>
<string name="dexcomg5_nsupload_title">NS에 혈당데이터 업로드하기</string>
<string name="dexcomg5_upload">G5업로드 세팅</string>
<string name="bgsource_upload">G5업로드 세팅</string>
<string name="poctech_upload">Poctech 업로드 설정</string>
<string name="wear_detailed_delta_title">델타(혈당증분값) 자세히 보여주기</string>
<string name="wear_detailed_delta_summary">소수점 자리 추가된 증분값 보여주기</string>

View file

@ -705,7 +705,7 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
<string name="btwatchdog_summary">Deactiveert de bluetooth functie van de telefoon gedurende een ogenblik. Dit kan op sommige gsm\'s een vastgelopen bluetooth service verhelpen.</string>
<string name="DexcomG5">DexcomG5 App (aangepast)</string>
<string name="dexcomg5_nsupload_title">Upload BG gegevens naar NS</string>
<string name="dexcomg5_upload">G5 Upload instellingen</string>
<string name="bgsource_upload">G5 Upload instellingen</string>
<string name="poctech_upload">Poctech upload instellingen</string>
<string name="wear_detailed_delta_title">Toon gedetailleerde delta</string>
<string name="wear_detailed_delta_summary">Toon delta met een extra decimaal punt</string>

View file

@ -705,7 +705,7 @@
<string name="btwatchdog_summary">Wyłącza bluetooth telefonu na jedną sekundę, jeśli nie jest możliwe połączenie z pompą. Może to pomóc w niektórych telefonach, w których blokuje się bluetooth.</string>
<string name="DexcomG5">DexcomG5 App (patched)</string>
<string name="dexcomg5_nsupload_title">Przekaż dane BG do NS</string>
<string name="dexcomg5_upload">G5 prześlij ustawienia</string>
<string name="bgsource_upload">G5 prześlij ustawienia</string>
<string name="poctech_upload">Poctech ustawienia przesyłania</string>
<string name="wear_detailed_delta_title">Pokaż szczegółowe delta</string>
<string name="wear_detailed_delta_summary">Pokaż deltę z jednym więcej miejscem dziesiętnym</string>

View file

@ -704,7 +704,7 @@
<string name="btwatchdog_summary">Desliga o bluetooth do telefone durante um segundo se nenhuma conexão com bomba for possível. Este parâmetro pode ser util em alguns telefones, onde a pilha bluetooth congela.</string>
<string name="DexcomG5">Aplicação DexcomG5 (com patch)</string>
<string name="dexcomg5_nsupload_title">Enviar dados Glic. para NS</string>
<string name="dexcomg5_upload">Definições envio G5</string>
<string name="bgsource_upload">Definições envio G5</string>
<string name="poctech_upload">Definições de upload para Poctech</string>
<string name="wear_detailed_delta_title">Mostrar Delta detalho</string>
<string name="wear_detailed_delta_summary">Mostrar delta com mais um ponto decimal</string>

View file

@ -703,7 +703,7 @@
<string name="btwatchdog_summary">Oprește bluetooth-ul telefonului pentru o secundă dacă nu se poate conecta la pompă. Aceasta poate ajuta în cazul telefoanelor cu bluetooth incompatitibil.</string>
<string name="DexcomG5">App DexcomG5 (cu patch)</string>
<string name="dexcomg5_nsupload_title">Încarcă date glicemie în NS</string>
<string name="dexcomg5_upload">Setări înregistrare G5</string>
<string name="bgsource_upload">Setări înregistrare G5</string>
<string name="poctech_upload">Setări upload Poctech</string>
<string name="wear_detailed_delta_title">Arată variație detaliată</string>
<string name="wear_detailed_delta_summary">Arată variație cu încă o zecimală</string>

View file

@ -704,7 +704,7 @@
<string name="btwatchdog_summary">Выключает bluetooth телефона на одну секунду, если подключение к помпе невозможно. Это помогает на тех телефонах, где зависает модуль bluetooth.</string>
<string name="DexcomG5">Приложение Dexcom (пропатченное)</string>
<string name="dexcomg5_nsupload_title">Загрузить данные СК в Nightscout</string>
<string name="dexcomg5_upload">Настройки загрузки c G5</string>
<string name="bgsource_upload">Настройки загрузки c G5</string>
<string name="poctech_upload">Настройка загрузки с Poctech</string>
<string name="wear_detailed_delta_title">Показать подробно дельту</string>
<string name="wear_detailed_delta_summary">Показать дельту еще с одним десятичным знаком</string>

View file

@ -710,7 +710,7 @@
<string name="btwatchdog_summary">Vypne na 1 sekundu Bluetooth v telefóne, pokiaľ se nedarí pripojiť k pumpe. Môže to pomôcť pri telefónoch, ktoré majú problémy s BT.</string>
<string name="DexcomG5">DexcomG5 aplikácia (upravená)</string>
<string name="dexcomg5_nsupload_title">Nahrávať glykémie do NS</string>
<string name="dexcomg5_upload">Nastavenie nahrávania z G5</string>
<string name="bgsource_upload">Nastavenie nahrávania z G5</string>
<string name="poctech_upload">Nastavenie nahrávania z Poctech</string>
<string name="wear_detailed_delta_title">Zobrazovať detailné zmeny</string>
<string name="wear_detailed_delta_summary">Zobrazovať rozdiel s jedným desatinným miestom naviac</string>

View file

@ -704,7 +704,7 @@
<string name="btwatchdog_summary">Startar om bluetooth på telefonen om anslutning till pumpen misslyckas. Detta hjälper på en del telefoner där bluetooth ibland hänger sig.</string>
<string name="DexcomG5">DexcomG5 App (modifierad)</string>
<string name="dexcomg5_nsupload_title">Ladda upp BG-data till Nightscout</string>
<string name="dexcomg5_upload">Uppladdningsinställningar för G5</string>
<string name="bgsource_upload">Uppladdningsinställningar för G5</string>
<string name="poctech_upload">Uppladdningsinställningar för Poctech</string>
<string name="wear_detailed_delta_title">Visa detaljerad delta</string>
<string name="wear_detailed_delta_summary">Visa delta med en extra decimal</string>

View file

@ -705,7 +705,7 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
<string name="btwatchdog_summary">Pompa ile herhangi bir bağlantı sorunu yaşanıyorsa, Akıllı telefonunuzda Bluetooth bağlantısını kapatıp açın. Bu bluetooth bağlantı sorununu giderecektir.</string>
<string name="DexcomG5">DexcomG5 App (patched)</string>
<string name="dexcomg5_nsupload_title">KŞ verilerini NighScout\'a yükle</string>
<string name="dexcomg5_upload">G5 yükleme ayarları</string>
<string name="bgsource_upload">G5 yükleme ayarları</string>
<string name="poctech_upload">Poctech yükleme ayarları</string>
<string name="wear_detailed_delta_title">Ayrıntılı delta göster</string>
<string name="wear_detailed_delta_summary">Bir ondalık basamakla deltayı göster</string>

View file

@ -702,7 +702,7 @@
<string name="btwatchdog_summary">如果没有连接到泵,关闭手机的蓝牙一秒钟再自动打开。这在一些蓝牙堆栈僵死的手机上是有帮助的,</string>
<string name="DexcomG5">DexcomG5 app (补丁)</string>
<string name="dexcomg5_nsupload_title">将 数据血糖数据上传到 NS服务器</string>
<string name="dexcomg5_upload">G5 上传设置</string>
<string name="bgsource_upload">G5 上传设置</string>
<string name="poctech_upload">Poctech 上传设置</string>
<string name="wear_detailed_delta_title">显示详细的增量</string>
<string name="wear_detailed_delta_summary">增量再多显示一个小数位</string>

View file

@ -44,6 +44,8 @@
<string name="description_sensitivity_oref1">Sensitivity is calculated from 8h data in the past and carbs (if not absorbed) are cut after time specified in preferences. Plugin also calculates UAM.</string>
<string name="description_sensitivity_weighted_average">Sensitivity is calculated as a weighted average from deviations. Newer deviations have higher weight. Minimal carb absorption is calculated from max carb absorption time from preferences. This algorithm is the fastest in following sensitivity changes.</string>
<string name="description_source_dexcom_g5">Receive BG values from the patched Dexcom G5 app.</string>
<string name="description_source_dexcom_g6">Receive BG values from the patched Dexcom G6 app.</string>
<string name="description_source_eversense">Receive BG values from the patched Eversense app.</string>
<string name="description_source_glimp">Receive BG values from Glimp.</string>
<string name="description_source_mm640g">Receive BG values from the 600SeriesAndroidUploader.</string>
<string name="description_source_ns_client">Downloads BG data from Nightscout</string>
@ -811,10 +813,11 @@
<string name="btwatchdog_title">BT Watchdog</string>
<string name="btwatchdog_summary">Switches off the phone\'s bluetooth for one second if no connection to the pump is possible. This may help on some phones where the bluetooth stack freezes.</string>
<string name="DexcomG5">DexcomG5 App (patched)</string>
<string name="DexcomG6">DexcomG6 App (patched)</string>
<string name="eversense">Eversense App (patched)</string>
<string name="dexcomg5_nsupload_title">Upload BG data to NS</string>
<string name="key_dexcomg5_nsupload" translatable="false">dexcomg5_nsupload</string>
<string name="dexcomg5_upload">G5 upload settings</string>
<string name="poctech_upload">Poctech upload settings</string>
<string name="bgsource_upload">BG upload settings</string>
<string name="wear_detailed_delta_title">Show detailed delta</string>
<string name="wear_detailed_delta_summary">Show delta with one more decimal place</string>
<string name="smbmaxminutes" translatable="false">45 60 75 90 105 120</string>
@ -972,12 +975,14 @@
<string name="ns_create_announcements_from_errors_title">Create announcements from errors</string>
<string name="ns_create_announcements_from_errors_summary">Create Nightscout announcement for error dialogs and local alerts (also viewable in Careportal under Treatments)</string>
<string name="dexcomG5_shortname" translatable="false">G5</string>
<string name="dexcomG6_shortname" translatable="false">G6</string>
<string name="eversense_shortname" translatable="false">EVR</string>
<string name="wear_predictions_summary">Show the predictions on the watchface.</string>
<string name="wear_predictions_title">Predictions</string>
<string name="data_choices">Data Choices</string>
<string name="fabric_upload">Fabric Upload</string>
<string name="allow_automated_crash_reporting">Allow automated crash reporting and feature usage data to be sent to the developers via the fabric.io service.</string>
<string name="g5appnotdetected">Please update your G5 app to supported version</string>
<string name="g5appnotdetected">Please update your Dexcom app to supported version</string>
<string name="start_activity_tt">Start Activity TT</string>
<string name="start_eating_soon_tt">Start Eating soon TT</string>
<string name="temptargetshort">TT</string>
@ -1293,6 +1298,9 @@
<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>
<string name="key_dexcom_lognssensorchange">dexcom_lognssensorchange</string>
<string name="dexcom_lognssensorchange_title">Log sensor change to NS</string>
<string name="dexcom_lognssensorchange_summary">Create event \"Sensor Change\" in NS automaticaly on sensor start</string>
<plurals name="objective_days">
<item quantity="one">%1$d day</item>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/dexcomg5_upload">
android:title="@string/bgsource_upload">
<SwitchPreference
android:defaultValue="false"
@ -14,6 +14,12 @@
android:summary="@string/dexcomg5_xdripupload_summary"
android:title="@string/dexcomg5_xdripupload_title" />
<SwitchPreference
android:defaultValue="false"
android:key="@string/key_dexcom_lognssensorchange"
android:summary="@string/dexcom_lognssensorchange_summary"
android:title="@string/dexcom_lognssensorchange_title" />
</PreferenceCategory>
</PreferenceScreen>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/poctech_upload">
android:title="@string/bgsource_upload">
<SwitchPreference
android:defaultValue="false"

View file

@ -72,7 +72,7 @@ public class MainAppTest {
if (Config.NSCLIENT)
expected = 1; // VirtualPump only
else
expected = 8;
expected = 7;
Assert.assertEquals(expected, mainApp.getSpecificPluginsList(PluginType.PUMP).size());
}
@ -83,7 +83,7 @@ public class MainAppTest {
if (Config.NSCLIENT)
expected = 1; // VirtualPump only
else
expected = 8;
expected = 7;
Assert.assertEquals(expected, mainApp.getSpecificPluginsVisibleInList(PluginType.PUMP).size());
}
@ -94,7 +94,7 @@ public class MainAppTest {
if (Config.NSCLIENT)
expected = 1; // VirtualPump only
else
expected = 8;
expected = 7;
Assert.assertEquals(expected, mainApp.getSpecificPluginsListByInterface(PumpInterface.class).size());
}
@ -105,7 +105,7 @@ public class MainAppTest {
if (Config.NSCLIENT)
expected = 1; // VirtualPump only
else
expected = 8;
expected = 7;
Assert.assertEquals(expected, mainApp.getSpecificPluginsVisibleInListByInterface(PumpInterface.class, PluginType.PUMP).size());
}