Merge pull request #2359 from MilosKozak/dagger3-stacktracelogger
add caller to log output
This commit is contained in:
commit
a5d153c035
|
@ -18,7 +18,7 @@
|
||||||
<maxHistory>120</maxHistory>
|
<maxHistory>120</maxHistory>
|
||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
<encoder>
|
<encoder>
|
||||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %.-1level/%logger: [%class{0}.%M\(\):%line]: %msg%n</pattern>
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %.-1level/%logger: %msg%n</pattern>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<pattern>%logger{0}</pattern>
|
<pattern>%logger{0}</pattern>
|
||||||
</tagEncoder>
|
</tagEncoder>
|
||||||
<encoder>
|
<encoder>
|
||||||
<pattern>[%thread] [%class{0}.%M\(\):%line]: %msg%n</pattern>
|
<pattern>[%thread]: %msg%n</pattern>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ import info.nightscout.androidaps.interfaces.PluginType;
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.logging.LTag;
|
import info.nightscout.androidaps.logging.LTag;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin;
|
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin;
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.OpenAPSMAPlugin;
|
import info.nightscout.androidaps.plugins.aps.openAPSMA.OpenAPSMAPlugin;
|
||||||
|
@ -109,7 +110,7 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper;
|
||||||
import io.fabric.sdk.android.Fabric;
|
import io.fabric.sdk.android.Fabric;
|
||||||
|
|
||||||
public class MainApp extends DaggerApplication {
|
public class MainApp extends DaggerApplication {
|
||||||
static Logger log = LoggerFactory.getLogger(L.CORE);
|
static Logger log = StacktraceLoggerWrapper.getLogger(L.CORE);
|
||||||
|
|
||||||
static MainApp sInstance;
|
static MainApp sInstance;
|
||||||
private static Resources sResources;
|
private static Resources sResources;
|
||||||
|
|
|
@ -39,6 +39,7 @@ import info.nightscout.androidaps.db.TDD;
|
||||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||||
import info.nightscout.androidaps.interfaces.ActivePluginProvider;
|
import info.nightscout.androidaps.interfaces.ActivePluginProvider;
|
||||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
||||||
|
@ -70,7 +71,7 @@ public class TDDStatsActivity extends NoSplashAppCompatActivity {
|
||||||
@Inject ConfigBuilderPlugin configBuilderPlugin;
|
@Inject ConfigBuilderPlugin configBuilderPlugin;
|
||||||
@Inject CommandQueueProvider commandQueue;
|
@Inject CommandQueueProvider commandQueue;
|
||||||
|
|
||||||
private static Logger log = LoggerFactory.getLogger(TDDStatsActivity.class);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(TDDStatsActivity.class);
|
||||||
private CompositeDisposable disposable = new CompositeDisposable();
|
private CompositeDisposable disposable = new CompositeDisposable();
|
||||||
|
|
||||||
TextView statusView, statsMessage, totalBaseBasal2;
|
TextView statusView, statsMessage, totalBaseBasal2;
|
||||||
|
|
|
@ -7,13 +7,14 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface;
|
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.PointsWithLabelGraphSeries;
|
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.PointsWithLabelGraphSeries;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
import info.nightscout.androidaps.utils.Round;
|
import info.nightscout.androidaps.utils.Round;
|
||||||
|
|
||||||
public class IobTotal implements DataPointWithLabelInterface {
|
public class IobTotal implements DataPointWithLabelInterface {
|
||||||
private static Logger log = LoggerFactory.getLogger(IobTotal.class);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(IobTotal.class);
|
||||||
|
|
||||||
public double iob;
|
public double iob;
|
||||||
public double activity;
|
public double activity;
|
||||||
|
|
|
@ -17,6 +17,7 @@ import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.interfaces.PumpDescription;
|
import info.nightscout.androidaps.interfaces.PumpDescription;
|
||||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||||
|
@ -28,7 +29,7 @@ import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||||
import info.nightscout.androidaps.utils.MidnightTime;
|
import info.nightscout.androidaps.utils.MidnightTime;
|
||||||
|
|
||||||
public class Profile {
|
public class Profile {
|
||||||
private static Logger log = LoggerFactory.getLogger(Profile.class);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(Profile.class);
|
||||||
|
|
||||||
private JSONObject json;
|
private JSONObject json;
|
||||||
private String units;
|
private String units;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.interfaces.Interval;
|
import info.nightscout.androidaps.interfaces.Interval;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 09.05.2017.
|
* Created by mike on 09.05.2017.
|
||||||
|
@ -19,7 +20,7 @@ import info.nightscout.androidaps.interfaces.Interval;
|
||||||
// When no interval match the lastest record without duration is used
|
// When no interval match the lastest record without duration is used
|
||||||
|
|
||||||
public class ProfileIntervals<T extends Interval> {
|
public class ProfileIntervals<T extends Interval> {
|
||||||
private static Logger log = LoggerFactory.getLogger(ProfileIntervals.class);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(ProfileIntervals.class);
|
||||||
|
|
||||||
private LongSparseArray<T> rawData; // oldest at index 0
|
private LongSparseArray<T> rawData; // oldest at index 0
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package info.nightscout.androidaps.data
|
package info.nightscout.androidaps.data
|
||||||
|
|
||||||
import androidx.collection.ArrayMap
|
import androidx.collection.ArrayMap
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper
|
||||||
import info.nightscout.androidaps.utils.JsonHelper
|
import info.nightscout.androidaps.utils.JsonHelper
|
||||||
import org.json.JSONException
|
import org.json.JSONException
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
|
@ -8,7 +9,7 @@ import org.slf4j.LoggerFactory
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class ProfileStore(val data: JSONObject) {
|
class ProfileStore(val data: JSONObject) {
|
||||||
private val log = LoggerFactory.getLogger(ProfileStore::class.java)
|
private val log = StacktraceLoggerWrapper.getLogger(ProfileStore::class.java)
|
||||||
|
|
||||||
private val cachedObjects = ArrayMap<String, Profile>()
|
private val cachedObjects = ArrayMap<String, Profile>()
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,12 @@ import org.slf4j.LoggerFactory;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
import info.nightscout.androidaps.utils.DecimalFormatter;
|
||||||
import info.nightscout.androidaps.utils.Round;
|
import info.nightscout.androidaps.utils.Round;
|
||||||
|
|
||||||
public class PumpEnactResult {
|
public class PumpEnactResult {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.APS);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.APS);
|
||||||
|
|
||||||
public boolean success = false; // request was processed successfully (but possible no change was needed)
|
public boolean success = false; // request was processed successfully (but possible no change was needed)
|
||||||
public boolean enacted = false; // request was processed successfully and change has been made
|
public boolean enacted = false; // request was processed successfully and change has been made
|
||||||
|
|
|
@ -25,6 +25,7 @@ import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.interfaces.Interval;
|
import info.nightscout.androidaps.interfaces.Interval;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.data.NSMbg;
|
import info.nightscout.androidaps.plugins.general.nsclient.data.NSMbg;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.OverviewFragment;
|
import info.nightscout.androidaps.plugins.general.overview.OverviewFragment;
|
||||||
|
@ -36,7 +37,7 @@ import info.nightscout.androidaps.utils.Translator;
|
||||||
|
|
||||||
@DatabaseTable(tableName = DatabaseHelper.DATABASE_CAREPORTALEVENTS)
|
@DatabaseTable(tableName = DatabaseHelper.DATABASE_CAREPORTALEVENTS)
|
||||||
public class CareportalEvent implements DataPointWithLabelInterface, Interval {
|
public class CareportalEvent implements DataPointWithLabelInterface, Interval {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.DATABASE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.DATABASE);
|
||||||
|
|
||||||
@DatabaseField(id = true)
|
@DatabaseField(id = true)
|
||||||
public long date;
|
public long date;
|
||||||
|
|
|
@ -47,6 +47,7 @@ import info.nightscout.androidaps.events.EventTempBasalChange;
|
||||||
import info.nightscout.androidaps.events.EventTempTargetChange;
|
import info.nightscout.androidaps.events.EventTempTargetChange;
|
||||||
import info.nightscout.androidaps.interfaces.ProfileInterface;
|
import info.nightscout.androidaps.interfaces.ProfileInterface;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
|
@ -70,7 +71,7 @@ import info.nightscout.androidaps.utils.ToastUtils;
|
||||||
* direct calls to the corresponding methods (eg. resetDatabases) should be done by a central service.
|
* direct calls to the corresponding methods (eg. resetDatabases) should be done by a central service.
|
||||||
*/
|
*/
|
||||||
public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.DATABASE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.DATABASE);
|
||||||
|
|
||||||
public static final String DATABASE_NAME = "AndroidAPSDb";
|
public static final String DATABASE_NAME = "AndroidAPSDb";
|
||||||
public static final String DATABASE_BGREADINGS = "BgReadings";
|
public static final String DATABASE_BGREADINGS = "BgReadings";
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,7 +21,7 @@ import info.nightscout.androidaps.utils.DateUtil;
|
||||||
*/
|
*/
|
||||||
@DatabaseTable(tableName = DatabaseHelper.DATABASE_DBREQUESTS)
|
@DatabaseTable(tableName = DatabaseHelper.DATABASE_DBREQUESTS)
|
||||||
public class DbRequest {
|
public class DbRequest {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.DATABASE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.DATABASE);
|
||||||
|
|
||||||
@DatabaseField(id = true)
|
@DatabaseField(id = true)
|
||||||
public String nsClientID = null;
|
public String nsClientID = null;
|
||||||
|
|
|
@ -22,6 +22,7 @@ import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.interfaces.InsulinInterface;
|
import info.nightscout.androidaps.interfaces.InsulinInterface;
|
||||||
import info.nightscout.androidaps.interfaces.Interval;
|
import info.nightscout.androidaps.interfaces.Interval;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface;
|
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.PointsWithLabelGraphSeries;
|
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.PointsWithLabelGraphSeries;
|
||||||
|
@ -38,7 +39,7 @@ import info.nightscout.androidaps.utils.Round;
|
||||||
|
|
||||||
@DatabaseTable(tableName = DatabaseHelper.DATABASE_EXTENDEDBOLUSES)
|
@DatabaseTable(tableName = DatabaseHelper.DATABASE_EXTENDEDBOLUSES)
|
||||||
public class ExtendedBolus implements Interval, DataPointWithLabelInterface {
|
public class ExtendedBolus implements Interval, DataPointWithLabelInterface {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.DATABASE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.DATABASE);
|
||||||
|
|
||||||
@DatabaseField(id = true)
|
@DatabaseField(id = true)
|
||||||
public long date;
|
public long date;
|
||||||
|
|
|
@ -20,6 +20,7 @@ import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.interfaces.Interval;
|
import info.nightscout.androidaps.interfaces.Interval;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface;
|
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface;
|
||||||
|
@ -33,7 +34,7 @@ import info.nightscout.androidaps.utils.T;
|
||||||
|
|
||||||
@DatabaseTable(tableName = DatabaseHelper.DATABASE_PROFILESWITCHES)
|
@DatabaseTable(tableName = DatabaseHelper.DATABASE_PROFILESWITCHES)
|
||||||
public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
|
public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.DATABASE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.DATABASE);
|
||||||
|
|
||||||
@DatabaseField(id = true)
|
@DatabaseField(id = true)
|
||||||
public long date;
|
public long date;
|
||||||
|
|
|
@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil;
|
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
|
|
||||||
|
@ -19,7 +20,7 @@ import info.nightscout.androidaps.utils.DateUtil;
|
||||||
|
|
||||||
@DatabaseTable(tableName = DatabaseHelper.DATABASE_TDDS)
|
@DatabaseTable(tableName = DatabaseHelper.DATABASE_TDDS)
|
||||||
public class TDD {
|
public class TDD {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.DATABASE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.DATABASE);
|
||||||
|
|
||||||
@DatabaseField(id = true)
|
@DatabaseField(id = true)
|
||||||
public long date;
|
public long date;
|
||||||
|
|
|
@ -14,12 +14,13 @@ import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.interfaces.Interval;
|
import info.nightscout.androidaps.interfaces.Interval;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
import info.nightscout.androidaps.utils.DecimalFormatter;
|
||||||
|
|
||||||
@DatabaseTable(tableName = DatabaseHelper.DATABASE_TEMPTARGETS)
|
@DatabaseTable(tableName = DatabaseHelper.DATABASE_TEMPTARGETS)
|
||||||
public class TempTarget implements Interval {
|
public class TempTarget implements Interval {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.DATABASE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.DATABASE);
|
||||||
|
|
||||||
@DatabaseField(id = true)
|
@DatabaseField(id = true)
|
||||||
public long date;
|
public long date;
|
||||||
|
|
|
@ -15,6 +15,7 @@ import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.interfaces.InsulinInterface;
|
import info.nightscout.androidaps.interfaces.InsulinInterface;
|
||||||
import info.nightscout.androidaps.interfaces.Interval;
|
import info.nightscout.androidaps.interfaces.Interval;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult;
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensResult;
|
||||||
|
@ -29,7 +30,7 @@ import info.nightscout.androidaps.utils.SP;
|
||||||
|
|
||||||
@DatabaseTable(tableName = DatabaseHelper.DATABASE_TEMPORARYBASALS)
|
@DatabaseTable(tableName = DatabaseHelper.DATABASE_TEMPORARYBASALS)
|
||||||
public class TemporaryBasal implements Interval, DbObjectBase {
|
public class TemporaryBasal implements Interval, DbObjectBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.DATABASE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.DATABASE);
|
||||||
|
|
||||||
@DatabaseField(id = true)
|
@DatabaseField(id = true)
|
||||||
public long date;
|
public long date;
|
||||||
|
|
|
@ -7,13 +7,14 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 19.03.2018.
|
* Created by mike on 19.03.2018.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Constraint<T extends Comparable> {
|
public class Constraint<T extends Comparable> {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.CONSTRAINTS);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.CONSTRAINTS);
|
||||||
|
|
||||||
T value;
|
T value;
|
||||||
T originalValue;
|
T originalValue;
|
||||||
|
|
|
@ -9,51 +9,56 @@ import org.slf4j.LoggerFactory
|
||||||
class AAPSLoggerProduction : AAPSLogger {
|
class AAPSLoggerProduction : AAPSLogger {
|
||||||
|
|
||||||
override fun debug(message: String) {
|
override fun debug(message: String) {
|
||||||
LoggerFactory.getLogger(LTag.CORE.tag).debug(message)
|
LoggerFactory.getLogger(LTag.CORE.tag).debug(stackLogMarker() + message)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun debug(enable: Boolean, tag: LTag, message: String) {
|
override fun debug(enable: Boolean, tag: LTag, message: String) {
|
||||||
if (enable && L.isEnabled(tag.tag)) {
|
if (enable && L.isEnabled(tag.tag)) {
|
||||||
LoggerFactory.getLogger(tag.tag).debug(message)
|
LoggerFactory.getLogger(tag.tag).debug(stackLogMarker() + message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun debug(tag: LTag, message: String) {
|
override fun debug(tag: LTag, message: String) {
|
||||||
if (L.isEnabled(tag.tag)) {
|
if (L.isEnabled(tag.tag)) {
|
||||||
LoggerFactory.getLogger(tag.tag).debug(message)
|
LoggerFactory.getLogger(tag.tag).debug(stackLogMarker() + message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun warn(tag: LTag, message: String) {
|
override fun warn(tag: LTag, message: String) {
|
||||||
if (L.isEnabled(tag.tag)) {
|
if (L.isEnabled(tag.tag)) {
|
||||||
LoggerFactory.getLogger(tag.tag).warn(message)
|
LoggerFactory.getLogger(tag.tag).warn(stackLogMarker() + message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun info(tag: LTag, message: String) {
|
override fun info(tag: LTag, message: String) {
|
||||||
if (L.isEnabled(tag.tag)) {
|
if (L.isEnabled(tag.tag)) {
|
||||||
LoggerFactory.getLogger(tag.tag).info(message)
|
LoggerFactory.getLogger(tag.tag).info(stackLogMarker() + message)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun error(tag: LTag, message: String) {
|
override fun error(tag: LTag, message: String) {
|
||||||
if (L.isEnabled(tag.tag)) {
|
if (L.isEnabled(tag.tag)) {
|
||||||
LoggerFactory.getLogger(tag.tag).error(message)
|
LoggerFactory.getLogger(tag.tag).error(stackLogMarker() + message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun error(message: String) {
|
override fun error(message: String) {
|
||||||
LoggerFactory.getLogger(LTag.CORE.tag).error(message)
|
LoggerFactory.getLogger(LTag.CORE.tag).error(stackLogMarker() + message)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun error(message: String, throwable: Throwable) {
|
override fun error(message: String, throwable: Throwable) {
|
||||||
LoggerFactory.getLogger(LTag.CORE.tag).error(message, throwable)
|
LoggerFactory.getLogger(LTag.CORE.tag).error(stackLogMarker() + message, throwable)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun error(tag: LTag, message: String, throwable: Throwable) {
|
override fun error(tag: LTag, message: String, throwable: Throwable) {
|
||||||
if (L.isEnabled(tag.tag)) {
|
if (L.isEnabled(tag.tag)) {
|
||||||
LoggerFactory.getLogger(tag.tag).error(message, throwable)
|
LoggerFactory.getLogger(tag.tag).error(stackLogMarker() + message, throwable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun StackTraceElement.toLogString(): String = "[${this.className.substringAfterLast(".")}.${this.methodName}():${this.lineNumber}]: "
|
||||||
|
|
||||||
|
/* Needs to be inline. Don't remove even if IDE suggests it. */
|
||||||
|
inline fun stackLogMarker() = Throwable().stackTrace[1].toLogString()
|
|
@ -0,0 +1,43 @@
|
||||||
|
package info.nightscout.androidaps.logging
|
||||||
|
|
||||||
|
import org.slf4j.Logger
|
||||||
|
import org.slf4j.LoggerFactory
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by adrian on 2020-01-13.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class StacktraceLoggerWrapper(private val delegate: Logger) : Logger by delegate {
|
||||||
|
|
||||||
|
override fun debug(msg: String?) {
|
||||||
|
delegate.debug(stackLogMarker() + msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun debug(format: String?, arg: Any?) {
|
||||||
|
delegate.debug(stackLogMarker() + format, arg)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun info(msg: String?) {
|
||||||
|
delegate.info(stackLogMarker() + msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun error(msg: String?) {
|
||||||
|
delegate.error(stackLogMarker() + msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun warn(msg: String?) {
|
||||||
|
delegate.warn(stackLogMarker() + msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
// all other methods will be implemented by delegate
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
@Deprecated("please inject AAPSLogger")
|
||||||
|
fun getLogger(name: String) = StacktraceLoggerWrapper(LoggerFactory.getLogger(name))
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
@Deprecated("please inject AAPSLogger")
|
||||||
|
fun getLogger(clazz: Class<*>) = StacktraceLoggerWrapper(LoggerFactory.getLogger(clazz))
|
||||||
|
}
|
||||||
|
}
|
|
@ -22,6 +22,7 @@ import info.nightscout.androidaps.interfaces.Constraint;
|
||||||
import info.nightscout.androidaps.interfaces.PumpDescription;
|
import info.nightscout.androidaps.interfaces.PumpDescription;
|
||||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||||
|
@ -33,7 +34,7 @@ import info.nightscout.androidaps.utils.SP;
|
||||||
* Created by mike on 09.06.2016.
|
* Created by mike on 09.06.2016.
|
||||||
*/
|
*/
|
||||||
public class APSResult {
|
public class APSResult {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.APS);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.APS);
|
||||||
|
|
||||||
public long date = 0;
|
public long date = 0;
|
||||||
public String reason;
|
public String reason;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
|
@ -365,7 +366,7 @@ import info.nightscout.androidaps.logging.L;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class DeviceStatus {
|
public class DeviceStatus {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.APS);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.APS);
|
||||||
|
|
||||||
public String device = null;
|
public String device = null;
|
||||||
public JSONObject pump = null;
|
public JSONObject pump = null;
|
||||||
|
|
|
@ -25,6 +25,7 @@ import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
import info.nightscout.androidaps.interfaces.ProfileInterface;
|
import info.nightscout.androidaps.interfaces.ProfileInterface;
|
||||||
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||||
import info.nightscout.androidaps.queue.Callback;
|
import info.nightscout.androidaps.queue.Callback;
|
||||||
|
@ -35,7 +36,7 @@ import io.reactivex.disposables.CompositeDisposable;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
|
||||||
public class ProfileFunctions implements ProfileFunction {
|
public class ProfileFunctions implements ProfileFunction {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PROFILE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PROFILE);
|
||||||
private CompositeDisposable disposable = new CompositeDisposable();
|
private CompositeDisposable disposable = new CompositeDisposable();
|
||||||
|
|
||||||
private static ProfileFunctions profileFunctions = null;
|
private static ProfileFunctions profileFunctions = null;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import info.nightscout.androidaps.interfaces.PluginDescription
|
||||||
import info.nightscout.androidaps.interfaces.PluginType
|
import info.nightscout.androidaps.interfaces.PluginType
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.logging.L
|
import info.nightscout.androidaps.logging.L
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
|
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
|
||||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
|
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
|
||||||
|
@ -51,7 +52,7 @@ class SignatureVerifierPlugin @Inject constructor(
|
||||||
private val REVOKED_CERTS_URL = "https://raw.githubusercontent.com/MilosKozak/AndroidAPS/master/app/src/main/assets/revoked_certs.txt"
|
private val REVOKED_CERTS_URL = "https://raw.githubusercontent.com/MilosKozak/AndroidAPS/master/app/src/main/assets/revoked_certs.txt"
|
||||||
private val UPDATE_INTERVAL = TimeUnit.DAYS.toMillis(1)
|
private val UPDATE_INTERVAL = TimeUnit.DAYS.toMillis(1)
|
||||||
|
|
||||||
private val log = LoggerFactory.getLogger(L.CORE)
|
private val log = StacktraceLoggerWrapper.getLogger(L.CORE)
|
||||||
private val lock: Any = arrayOfNulls<Any>(0)
|
private val lock: Any = arrayOfNulls<Any>(0)
|
||||||
private var revokedCertsFile: File? = null
|
private var revokedCertsFile: File? = null
|
||||||
private var revokedCerts: List<ByteArray>? = null
|
private var revokedCerts: List<ByteArray>? = null
|
||||||
|
|
|
@ -49,6 +49,7 @@ import info.nightscout.androidaps.data.ProfileStore;
|
||||||
import info.nightscout.androidaps.db.BgReading;
|
import info.nightscout.androidaps.db.BgReading;
|
||||||
import info.nightscout.androidaps.db.CareportalEvent;
|
import info.nightscout.androidaps.db.CareportalEvent;
|
||||||
import info.nightscout.androidaps.db.ProfileSwitch;
|
import info.nightscout.androidaps.db.ProfileSwitch;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
||||||
|
@ -76,7 +77,7 @@ public class NewNSTreatmentDialog extends DaggerDialogFragment implements View.O
|
||||||
@Inject ConfigBuilderPlugin configBuilderPlugin;
|
@Inject ConfigBuilderPlugin configBuilderPlugin;
|
||||||
@Inject TreatmentsPlugin treatmentsPlugin;
|
@Inject TreatmentsPlugin treatmentsPlugin;
|
||||||
|
|
||||||
private static Logger log = LoggerFactory.getLogger(NewNSTreatmentDialog.class);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(NewNSTreatmentDialog.class);
|
||||||
|
|
||||||
private static OptionsToShow options;
|
private static OptionsToShow options;
|
||||||
private static @StringRes int event;
|
private static @StringRes int event;
|
||||||
|
|
|
@ -32,6 +32,7 @@ import info.nightscout.androidaps.events.Event;
|
||||||
import info.nightscout.androidaps.events.EventFoodDatabaseChanged;
|
import info.nightscout.androidaps.events.EventFoodDatabaseChanged;
|
||||||
import info.nightscout.androidaps.events.EventNsFood;
|
import info.nightscout.androidaps.events.EventNsFood;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||||
import io.reactivex.disposables.CompositeDisposable;
|
import io.reactivex.disposables.CompositeDisposable;
|
||||||
|
@ -42,7 +43,7 @@ import io.reactivex.schedulers.Schedulers;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class FoodService extends OrmLiteBaseService<DatabaseHelper> {
|
public class FoodService extends OrmLiteBaseService<DatabaseHelper> {
|
||||||
private Logger log = LoggerFactory.getLogger(L.DATAFOOD);
|
private Logger log = StacktraceLoggerWrapper.getLogger(L.DATAFOOD);
|
||||||
private CompositeDisposable disposable = new CompositeDisposable();
|
private CompositeDisposable disposable = new CompositeDisposable();
|
||||||
|
|
||||||
private static final ScheduledExecutorService foodEventWorker = Executors.newSingleThreadScheduledExecutor();
|
private static final ScheduledExecutorService foodEventWorker = Executors.newSingleThreadScheduledExecutor();
|
||||||
|
|
|
@ -27,6 +27,7 @@ import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.events.EventAppExit;
|
import info.nightscout.androidaps.events.EventAppExit;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.utils.OKDialog;
|
import info.nightscout.androidaps.utils.OKDialog;
|
||||||
import info.nightscout.androidaps.utils.SP;
|
import info.nightscout.androidaps.utils.SP;
|
||||||
|
@ -37,7 +38,7 @@ import info.nightscout.androidaps.utils.ToastUtils;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ImportExportPrefs {
|
public class ImportExportPrefs {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.CORE);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.CORE);
|
||||||
private static File path = new File(Environment.getExternalStorageDirectory().toString());
|
private static File path = new File(Environment.getExternalStorageDirectory().toString());
|
||||||
static public final File file = new File(path, MainApp.gs(R.string.app_name) + "Preferences");
|
static public final File file = new File(path, MainApp.gs(R.string.app_name) + "Preferences");
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,14 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import ch.qos.logback.classic.LoggerContext;
|
import ch.qos.logback.classic.LoggerContext;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides serveral methods for log-handling (eg. sending logs as emails).
|
* This class provides serveral methods for log-handling (eg. sending logs as emails).
|
||||||
*/
|
*/
|
||||||
public class LoggerUtils {
|
public class LoggerUtils {
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(L.CORE);
|
private static final Logger LOGGER = StacktraceLoggerWrapper.getLogger(L.CORE);
|
||||||
|
|
||||||
public static String SUFFIX = ".log.zip";
|
public static String SUFFIX = ".log.zip";
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||||
import info.nightscout.androidaps.interfaces.PluginType;
|
import info.nightscout.androidaps.interfaces.PluginType;
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.data.AlarmAck;
|
import info.nightscout.androidaps.plugins.general.nsclient.data.AlarmAck;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.data.NSAlarm;
|
import info.nightscout.androidaps.plugins.general.nsclient.data.NSAlarm;
|
||||||
|
@ -53,7 +54,7 @@ import io.reactivex.schedulers.Schedulers;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class NSClientPlugin extends PluginBase {
|
public class NSClientPlugin extends PluginBase {
|
||||||
private Logger log = LoggerFactory.getLogger(L.NSCLIENT);
|
private Logger log = StacktraceLoggerWrapper.getLogger(L.NSCLIENT);
|
||||||
private CompositeDisposable disposable = new CompositeDisposable();
|
private CompositeDisposable disposable = new CompositeDisposable();
|
||||||
|
|
||||||
private final AAPSLogger aapsLogger;
|
private final AAPSLogger aapsLogger;
|
||||||
|
@ -72,7 +73,7 @@ public class NSClientPlugin extends PluginBase {
|
||||||
|
|
||||||
public NSClientService nsClientService = null;
|
public NSClientService nsClientService = null;
|
||||||
|
|
||||||
private NsClientReceiverDelegate nsClientReceiverDelegate;
|
private NsClientReceiverDelegate nsClientReceiverDelegate = new NsClientReceiverDelegate();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public NSClientPlugin(
|
public NSClientPlugin(
|
||||||
|
@ -114,7 +115,6 @@ public class NSClientPlugin extends PluginBase {
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
paused = SP.getBoolean(R.string.key_nsclientinternal_paused, false);
|
paused = SP.getBoolean(R.string.key_nsclientinternal_paused, false);
|
||||||
autoscroll = SP.getBoolean(R.string.key_nsclientinternal_autoscroll, true);
|
autoscroll = SP.getBoolean(R.string.key_nsclientinternal_autoscroll, true);
|
||||||
nsClientReceiverDelegate = new NsClientReceiverDelegate();
|
|
||||||
|
|
||||||
Context context = MainApp.instance().getApplicationContext();
|
Context context = MainApp.instance().getApplicationContext();
|
||||||
Intent intent = new Intent(context, NSClientService.class);
|
Intent intent = new Intent(context, NSClientService.class);
|
||||||
|
|
|
@ -37,6 +37,7 @@ import info.nightscout.androidaps.db.ProfileSwitch;
|
||||||
import info.nightscout.androidaps.db.TempTarget;
|
import info.nightscout.androidaps.db.TempTarget;
|
||||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.APSResult;
|
import info.nightscout.androidaps.plugins.aps.loop.APSResult;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.DeviceStatus;
|
import info.nightscout.androidaps.plugins.aps.loop.DeviceStatus;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
||||||
|
@ -51,7 +52,7 @@ import info.nightscout.androidaps.utils.SP;
|
||||||
* Created by mike on 26.05.2017.
|
* Created by mike on 26.05.2017.
|
||||||
*/
|
*/
|
||||||
public class NSUpload {
|
public class NSUpload {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.NSCLIENT);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.NSCLIENT);
|
||||||
|
|
||||||
public static void uploadTempBasalStartAbsolute(TemporaryBasal temporaryBasal, Double originalExtendedAmount) {
|
public static void uploadTempBasalStartAbsolute(TemporaryBasal temporaryBasal, Double originalExtendedAmount) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -17,6 +17,7 @@ import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.db.DatabaseHelper;
|
import info.nightscout.androidaps.db.DatabaseHelper;
|
||||||
import info.nightscout.androidaps.db.DbRequest;
|
import info.nightscout.androidaps.db.DbRequest;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientResend;
|
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientResend;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.services.NSClientService;
|
import info.nightscout.androidaps.plugins.general.nsclient.services.NSClientService;
|
||||||
|
@ -25,7 +26,7 @@ import info.nightscout.androidaps.plugins.general.nsclient.services.NSClientServ
|
||||||
* Created by mike on 21.02.2016.
|
* Created by mike on 21.02.2016.
|
||||||
*/
|
*/
|
||||||
public class UploadQueue {
|
public class UploadQueue {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.NSCLIENT);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.NSCLIENT);
|
||||||
|
|
||||||
public static String status() {
|
public static String status() {
|
||||||
return "QUEUE: " + MainApp.getDbHelper().size(DatabaseHelper.DATABASE_DBREQUESTS);
|
return "QUEUE: " + MainApp.getDbHelper().size(DatabaseHelper.DATABASE_DBREQUESTS);
|
||||||
|
|
|
@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.events.Event;
|
import info.nightscout.androidaps.events.Event;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientRestart;
|
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientRestart;
|
||||||
import io.socket.client.Ack;
|
import io.socket.client.Ack;
|
||||||
|
@ -15,7 +16,7 @@ import io.socket.client.Ack;
|
||||||
* Created by mike on 29.12.2015.
|
* Created by mike on 29.12.2015.
|
||||||
*/
|
*/
|
||||||
public class NSAddAck extends Event implements Ack {
|
public class NSAddAck extends Event implements Ack {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.NSCLIENT);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.NSCLIENT);
|
||||||
public String _id = null;
|
public String _id = null;
|
||||||
public String nsClientID = null;
|
public String nsClientID = null;
|
||||||
public JSONObject json = null;
|
public JSONObject json = null;
|
||||||
|
|
|
@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.events.Event;
|
import info.nightscout.androidaps.events.Event;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import io.socket.client.Ack;
|
import io.socket.client.Ack;
|
||||||
|
|
||||||
|
@ -14,7 +15,7 @@ import io.socket.client.Ack;
|
||||||
* Created by mike on 21.02.2016.
|
* Created by mike on 21.02.2016.
|
||||||
*/
|
*/
|
||||||
public class NSUpdateAck extends Event implements Ack {
|
public class NSUpdateAck extends Event implements Ack {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.NSCLIENT);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.NSCLIENT);
|
||||||
public boolean result = false;
|
public boolean result = false;
|
||||||
public String _id;
|
public String _id;
|
||||||
public String action;
|
public String action;
|
||||||
|
|
|
@ -6,9 +6,10 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
public class NSMbg {
|
public class NSMbg {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.NSCLIENT);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.NSCLIENT);
|
||||||
public long date;
|
public long date;
|
||||||
public double mbg;
|
public double mbg;
|
||||||
public String json;
|
public String json;
|
||||||
|
|
|
@ -6,13 +6,14 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* {"mgdl":105,"mills":1455136282375,"device":"xDrip-BluetoothWixel","direction":"Flat","filtered":98272,"unfiltered":98272,"noise":1,"rssi":100}
|
* {"mgdl":105,"mills":1455136282375,"device":"xDrip-BluetoothWixel","direction":"Flat","filtered":98272,"unfiltered":98272,"noise":1,"rssi":100}
|
||||||
*/
|
*/
|
||||||
public class NSSgv {
|
public class NSSgv {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.NSCLIENT);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.NSCLIENT);
|
||||||
|
|
||||||
private JSONObject data;
|
private JSONObject data;
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,10 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
public class NSTreatment {
|
public class NSTreatment {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.NSCLIENT);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.NSCLIENT);
|
||||||
|
|
||||||
private JSONObject data;
|
private JSONObject data;
|
||||||
private String action = null; // "update", "remove" or null (add)
|
private String action = null; // "update", "remove" or null (add)
|
||||||
|
|
|
@ -43,6 +43,7 @@ import info.nightscout.androidaps.interfaces.PluginType;
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.logging.LTag;
|
import info.nightscout.androidaps.logging.LTag;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSClientPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue;
|
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue;
|
||||||
|
@ -86,7 +87,7 @@ public class NSClientService extends DaggerService {
|
||||||
@Inject SP sp;
|
@Inject SP sp;
|
||||||
@Inject NSClientPlugin nsClientPlugin;
|
@Inject NSClientPlugin nsClientPlugin;
|
||||||
|
|
||||||
private static Logger log = LoggerFactory.getLogger(L.NSCLIENT);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.NSCLIENT);
|
||||||
private CompositeDisposable disposable = new CompositeDisposable();
|
private CompositeDisposable disposable = new CompositeDisposable();
|
||||||
|
|
||||||
static public PowerManager.WakeLock mWakeLock;
|
static public PowerManager.WakeLock mWakeLock;
|
||||||
|
|
|
@ -29,6 +29,7 @@ import info.nightscout.androidaps.db.ExtendedBolus;
|
||||||
import info.nightscout.androidaps.db.ProfileSwitch;
|
import info.nightscout.androidaps.db.ProfileSwitch;
|
||||||
import info.nightscout.androidaps.db.TempTarget;
|
import info.nightscout.androidaps.db.TempTarget;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.APSResult;
|
import info.nightscout.androidaps.plugins.aps.loop.APSResult;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
|
import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
|
||||||
|
@ -57,7 +58,7 @@ import info.nightscout.androidaps.utils.SP;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GraphData {
|
public class GraphData {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.OVERVIEW);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.OVERVIEW);
|
||||||
|
|
||||||
private GraphView graph;
|
private GraphView graph;
|
||||||
public double maxY = Double.MIN_VALUE;
|
public double maxY = Double.MIN_VALUE;
|
||||||
|
|
|
@ -3,12 +3,13 @@ package info.nightscout.androidaps.plugins.general.smsCommunicator
|
||||||
import info.nightscout.androidaps.Constants
|
import info.nightscout.androidaps.Constants
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.logging.L
|
import info.nightscout.androidaps.logging.L
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper
|
||||||
import info.nightscout.androidaps.utils.DateUtil
|
import info.nightscout.androidaps.utils.DateUtil
|
||||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
|
|
||||||
class AuthRequest internal constructor(val plugin: SmsCommunicatorPlugin, val resourceHelper: ResourceHelper, var requester: Sms, requestText: String, var confirmCode: String, val action: SmsAction) {
|
class AuthRequest internal constructor(val plugin: SmsCommunicatorPlugin, val resourceHelper: ResourceHelper, var requester: Sms, requestText: String, var confirmCode: String, val action: SmsAction) {
|
||||||
private val log = LoggerFactory.getLogger(L.SMS)
|
private val log = StacktraceLoggerWrapper.getLogger(L.SMS)
|
||||||
|
|
||||||
private val date = DateUtil.now()
|
private val date = DateUtil.now()
|
||||||
private var processed = false
|
private var processed = false
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package info.nightscout.androidaps.plugins.general.tidepool.comm
|
package info.nightscout.androidaps.plugins.general.tidepool.comm
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L
|
import info.nightscout.androidaps.logging.L
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper
|
||||||
import okhttp3.Interceptor
|
import okhttp3.Interceptor
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import okio.Buffer
|
import okio.Buffer
|
||||||
|
@ -9,7 +10,7 @@ import java.io.IOException
|
||||||
|
|
||||||
class InfoInterceptor(tag: String) : Interceptor {
|
class InfoInterceptor(tag: String) : Interceptor {
|
||||||
|
|
||||||
private val log = LoggerFactory.getLogger(L.TIDEPOOL)
|
private val log = StacktraceLoggerWrapper.getLogger(L.TIDEPOOL)
|
||||||
private var tag = "interceptor"
|
private var tag = "interceptor"
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package info.nightscout.androidaps.plugins.general.tidepool.comm
|
package info.nightscout.androidaps.plugins.general.tidepool.comm
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L
|
import info.nightscout.androidaps.logging.L
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||||
import info.nightscout.androidaps.plugins.general.tidepool.events.EventTidepoolStatus
|
import info.nightscout.androidaps.plugins.general.tidepool.events.EventTidepoolStatus
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
|
@ -9,7 +10,7 @@ import retrofit2.Callback
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
|
|
||||||
internal class TidepoolCallback<T>(private val rxBus: RxBusWrapper, private val session: Session, val name: String, val onSuccess: () -> Unit, val onFail: () -> Unit) : Callback<T> {
|
internal class TidepoolCallback<T>(private val rxBus: RxBusWrapper, private val session: Session, val name: String, val onSuccess: () -> Unit, val onFail: () -> Unit) : Callback<T> {
|
||||||
private val log = LoggerFactory.getLogger(L.TIDEPOOL)
|
private val log = StacktraceLoggerWrapper.getLogger(L.TIDEPOOL)
|
||||||
|
|
||||||
override fun onResponse(call: Call<T>, response: Response<T>) {
|
override fun onResponse(call: Call<T>, response: Response<T>) {
|
||||||
if (response.isSuccessful && response.body() != null) {
|
if (response.isSuccessful && response.body() != null) {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import info.nightscout.androidaps.db.TemporaryBasal
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.logging.L
|
import info.nightscout.androidaps.logging.L
|
||||||
import info.nightscout.androidaps.logging.LTag
|
import info.nightscout.androidaps.logging.LTag
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction
|
||||||
|
@ -37,7 +38,7 @@ class UploadChunk @Inject constructor(
|
||||||
|
|
||||||
private val MAX_UPLOAD_SIZE = T.days(7).msecs() // don't change this
|
private val MAX_UPLOAD_SIZE = T.days(7).msecs() // don't change this
|
||||||
|
|
||||||
private val log = LoggerFactory.getLogger(L.TIDEPOOL)
|
private val log = StacktraceLoggerWrapper.getLogger(L.TIDEPOOL)
|
||||||
|
|
||||||
fun getNext(session: Session?): String? {
|
fun getNext(session: Session?): String? {
|
||||||
if (session == null)
|
if (session == null)
|
||||||
|
|
|
@ -2,13 +2,14 @@ package info.nightscout.androidaps.plugins.general.tidepool.events
|
||||||
|
|
||||||
import info.nightscout.androidaps.events.Event
|
import info.nightscout.androidaps.events.Event
|
||||||
import info.nightscout.androidaps.logging.L
|
import info.nightscout.androidaps.logging.L
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper
|
||||||
import info.nightscout.androidaps.utils.DateUtil
|
import info.nightscout.androidaps.utils.DateUtil
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class EventTidepoolStatus(val status: String) : Event() {
|
class EventTidepoolStatus(val status: String) : Event() {
|
||||||
private val log = LoggerFactory.getLogger(L.TIDEPOOL)
|
private val log = StacktraceLoggerWrapper.getLogger(L.TIDEPOOL)
|
||||||
|
|
||||||
var date: Long = DateUtil.now()
|
var date: Long = DateUtil.now()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package info.nightscout.androidaps.plugins.general.tidepool.utils
|
package info.nightscout.androidaps.plugins.general.tidepool.utils
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L
|
import info.nightscout.androidaps.logging.L
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper
|
||||||
import info.nightscout.androidaps.utils.DateUtil
|
import info.nightscout.androidaps.utils.DateUtil
|
||||||
import info.nightscout.androidaps.utils.T
|
import info.nightscout.androidaps.utils.T
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
|
@ -10,7 +11,7 @@ object RateLimit {
|
||||||
|
|
||||||
private val rateLimits = HashMap<String, Long>()
|
private val rateLimits = HashMap<String, Long>()
|
||||||
|
|
||||||
private val log = LoggerFactory.getLogger(L.TIDEPOOL)
|
private val log = StacktraceLoggerWrapper.getLogger(L.TIDEPOOL)
|
||||||
|
|
||||||
// return true if below rate limit
|
// return true if below rate limit
|
||||||
@Synchronized
|
@Synchronized
|
||||||
|
|
|
@ -14,6 +14,7 @@ import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
|
import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface;
|
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface;
|
||||||
|
@ -27,7 +28,7 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper;
|
||||||
import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
||||||
|
|
||||||
public class AutosensData implements DataPointWithLabelInterface {
|
public class AutosensData implements DataPointWithLabelInterface {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.AUTOSENS);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.AUTOSENS);
|
||||||
|
|
||||||
@Inject SP sp;
|
@Inject SP sp;
|
||||||
@Inject ResourceHelper resourceHelper;
|
@Inject ResourceHelper resourceHelper;
|
||||||
|
|
|
@ -6,12 +6,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 06.01.2017.
|
* Created by mike on 06.01.2017.
|
||||||
*/
|
*/
|
||||||
public class AutosensResult {
|
public class AutosensResult {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.AUTOSENS);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.AUTOSENS);
|
||||||
|
|
||||||
//default values to show when autosens algorithm is not called
|
//default values to show when autosens algorithm is not called
|
||||||
public double ratio = 1d;
|
public double ratio = 1d;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.db.BgReading;
|
import info.nightscout.androidaps.db.BgReading;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
import info.nightscout.androidaps.utils.DecimalFormatter;
|
||||||
import info.nightscout.androidaps.utils.Round;
|
import info.nightscout.androidaps.utils.Round;
|
||||||
|
@ -19,7 +20,7 @@ import info.nightscout.androidaps.utils.Round;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GlucoseStatus {
|
public class GlucoseStatus {
|
||||||
private static Logger log = LoggerFactory.getLogger(GlucoseStatus.class);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(GlucoseStatus.class);
|
||||||
public double glucose = 0d;
|
public double glucose = 0d;
|
||||||
public double delta = 0d;
|
public double delta = 0d;
|
||||||
public double avgdelta = 0d;
|
public double avgdelta = 0d;
|
||||||
|
|
|
@ -42,6 +42,7 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
import info.nightscout.androidaps.interfaces.PumpPluginBase;
|
import info.nightscout.androidaps.interfaces.PumpPluginBase;
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
||||||
import info.nightscout.androidaps.plugins.common.ManufacturerType;
|
import info.nightscout.androidaps.plugins.common.ManufacturerType;
|
||||||
|
@ -80,7 +81,7 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
||||||
*/
|
*/
|
||||||
@Singleton
|
@Singleton
|
||||||
public class ComboPlugin extends PumpPluginBase implements PumpInterface, ConstraintsInterface {
|
public class ComboPlugin extends PumpPluginBase implements PumpInterface, ConstraintsInterface {
|
||||||
private static final Logger log = LoggerFactory.getLogger(L.PUMP);
|
private static final Logger log = StacktraceLoggerWrapper.getLogger(L.PUMP);
|
||||||
static final String COMBO_TBRS_SET = "combo_tbrs_set";
|
static final String COMBO_TBRS_SET = "combo_tbrs_set";
|
||||||
static final String COMBO_BOLUSES_DELIVERED = "combo_boluses_delivered";
|
static final String COMBO_BOLUSES_DELIVERED = "combo_boluses_delivered";
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.ReadQuickInfoCommand;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.ReadQuickInfoCommand;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.BolusCommand;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.BolusCommand;
|
||||||
|
@ -45,7 +46,7 @@ import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.commands.SetT
|
||||||
* operations and are cleanly separated from the thread management, connection management etc
|
* operations and are cleanly separated from the thread management, connection management etc
|
||||||
*/
|
*/
|
||||||
public class RuffyScripter implements RuffyCommands {
|
public class RuffyScripter implements RuffyCommands {
|
||||||
private static final Logger log = LoggerFactory.getLogger(RuffyScripter.class);
|
private static final Logger log = StacktraceLoggerWrapper.getLogger(RuffyScripter.class);
|
||||||
|
|
||||||
private IRuffyService ruffyService;
|
private IRuffyService ruffyService;
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.WarningOrErrorCode;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.WarningOrErrorCode;
|
||||||
|
@ -23,7 +24,7 @@ import static info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusP
|
||||||
import static info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter.State.STOPPING;
|
import static info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BolusProgressReporter.State.STOPPING;
|
||||||
|
|
||||||
public class BolusCommand extends BaseCommand {
|
public class BolusCommand extends BaseCommand {
|
||||||
private static final Logger log = LoggerFactory.getLogger(BolusCommand.class);
|
private static final Logger log = StacktraceLoggerWrapper.getLogger(BolusCommand.class);
|
||||||
|
|
||||||
protected final double bolus;
|
protected final double bolus;
|
||||||
private final BolusProgressReporter bolusProgressReporter;
|
private final BolusProgressReporter bolusProgressReporter;
|
||||||
|
|
|
@ -4,11 +4,12 @@ import org.monkey.d.ruffy.ruffy.driver.display.MenuType;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
||||||
|
|
||||||
public class CancelTbrCommand extends BaseCommand {
|
public class CancelTbrCommand extends BaseCommand {
|
||||||
private static final Logger log = LoggerFactory.getLogger(CancelTbrCommand.class);
|
private static final Logger log = StacktraceLoggerWrapper.getLogger(CancelTbrCommand.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getReconnectWarningId() {
|
public Integer getReconnectWarningId() {
|
||||||
|
|
|
@ -9,11 +9,12 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
||||||
|
|
||||||
public class ReadBasalProfileCommand extends BaseCommand {
|
public class ReadBasalProfileCommand extends BaseCommand {
|
||||||
private static final Logger log = LoggerFactory.getLogger(ReadBasalProfileCommand.class);
|
private static final Logger log = StacktraceLoggerWrapper.getLogger(ReadBasalProfileCommand.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
|
|
|
@ -12,6 +12,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpAlert;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpAlert;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistory;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistory;
|
||||||
|
@ -20,7 +21,7 @@ import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tbr;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tdd;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tdd;
|
||||||
|
|
||||||
public class ReadHistoryCommand extends BaseCommand {
|
public class ReadHistoryCommand extends BaseCommand {
|
||||||
private static Logger log = LoggerFactory.getLogger(ReadHistoryCommand.class);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(ReadHistoryCommand.class);
|
||||||
|
|
||||||
private final PumpHistoryRequest request;
|
private final PumpHistoryRequest request;
|
||||||
private final PumpHistory history = new PumpHistory();
|
private final PumpHistory history = new PumpHistory();
|
||||||
|
|
|
@ -9,11 +9,12 @@ import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Bolus;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistory;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistory;
|
||||||
|
|
||||||
public class ReadQuickInfoCommand extends BaseCommand {
|
public class ReadQuickInfoCommand extends BaseCommand {
|
||||||
private static final Logger log = LoggerFactory.getLogger(ReadQuickInfoCommand.class);
|
private static final Logger log = StacktraceLoggerWrapper.getLogger(ReadQuickInfoCommand.class);
|
||||||
|
|
||||||
private final int numberOfBolusRecordsToRetrieve;
|
private final int numberOfBolusRecordsToRetrieve;
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,12 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.BasalProfile;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
||||||
|
|
||||||
public class SetBasalProfileCommand extends BaseCommand {
|
public class SetBasalProfileCommand extends BaseCommand {
|
||||||
private static final Logger log = LoggerFactory.getLogger(SetBasalProfileCommand.class);
|
private static final Logger log = StacktraceLoggerWrapper.getLogger(SetBasalProfileCommand.class);
|
||||||
|
|
||||||
private final BasalProfile basalProfile;
|
private final BasalProfile basalProfile;
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,13 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpState;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.PumpWarningCodes;
|
||||||
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.WarningOrErrorCode;
|
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.WarningOrErrorCode;
|
||||||
|
|
||||||
public class SetTbrCommand extends BaseCommand {
|
public class SetTbrCommand extends BaseCommand {
|
||||||
private static final Logger log = LoggerFactory.getLogger(SetTbrCommand.class);
|
private static final Logger log = StacktraceLoggerWrapper.getLogger(SetTbrCommand.class);
|
||||||
|
|
||||||
private final long percentage;
|
private final long percentage;
|
||||||
private final long duration;
|
private final long duration;
|
||||||
|
|
|
@ -30,6 +30,7 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
import info.nightscout.androidaps.interfaces.PumpPluginBase;
|
import info.nightscout.androidaps.interfaces.PumpPluginBase;
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.data.PumpStatus;
|
import info.nightscout.androidaps.plugins.pump.common.data.PumpStatus;
|
||||||
|
@ -54,7 +55,7 @@ import io.reactivex.schedulers.Schedulers;
|
||||||
public abstract class PumpPluginAbstract extends PumpPluginBase implements PumpInterface, ConstraintsInterface {
|
public abstract class PumpPluginAbstract extends PumpPluginBase implements PumpInterface, ConstraintsInterface {
|
||||||
private CompositeDisposable disposable = new CompositeDisposable();
|
private CompositeDisposable disposable = new CompositeDisposable();
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMP);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMP);
|
||||||
/*
|
/*
|
||||||
protected static final PumpEnactResult OPERATION_NOT_SUPPORTED = new PumpEnactResult().success(false)
|
protected static final PumpEnactResult OPERATION_NOT_SUPPORTED = new PumpEnactResult().success(false)
|
||||||
.enacted(false).comment(MainApp.gs(R.string.pump_operation_not_supported_by_pump_driver));
|
.enacted(false).comment(MainApp.gs(R.string.pump_operation_not_supported_by_pump_driver));
|
||||||
|
|
|
@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.pump.common.bolusInfo
|
||||||
|
|
||||||
import info.nightscout.androidaps.data.DetailedBolusInfo
|
import info.nightscout.androidaps.data.DetailedBolusInfo
|
||||||
import info.nightscout.androidaps.logging.L
|
import info.nightscout.androidaps.logging.L
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper
|
||||||
import info.nightscout.androidaps.plugins.pump.medtronic.data.MedtronicHistoryData
|
import info.nightscout.androidaps.plugins.pump.medtronic.data.MedtronicHistoryData
|
||||||
import info.nightscout.androidaps.utils.T
|
import info.nightscout.androidaps.utils.T
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
|
@ -9,7 +10,7 @@ import java.util.*
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
|
|
||||||
object DetailedBolusInfoStorage {
|
object DetailedBolusInfoStorage {
|
||||||
private val log = LoggerFactory.getLogger(L.PUMP)
|
private val log = StacktraceLoggerWrapper.getLogger(L.PUMP)
|
||||||
val store = ArrayList<DetailedBolusInfo>()
|
val store = ArrayList<DetailedBolusInfo>()
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
|
|
|
@ -43,6 +43,7 @@ import java.util.Map;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity;
|
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||||
|
@ -56,7 +57,7 @@ import info.nightscout.androidaps.utils.SP;
|
||||||
// IMPORTANT: This activity needs to be called from RileyLinkSelectPreference (see pref_medtronic.xml as example)
|
// IMPORTANT: This activity needs to be called from RileyLinkSelectPreference (see pref_medtronic.xml as example)
|
||||||
public class RileyLinkBLEScanActivity extends NoSplashAppCompatActivity {
|
public class RileyLinkBLEScanActivity extends NoSplashAppCompatActivity {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(RileyLinkBLEScanActivity.class);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(RileyLinkBLEScanActivity.class);
|
||||||
|
|
||||||
private static final int PERMISSION_REQUEST_COARSE_LOCATION = 30241; // arbitrary.
|
private static final int PERMISSION_REQUEST_COARSE_LOCATION = 30241; // arbitrary.
|
||||||
private static final int REQUEST_ENABLE_BT = 30242; // arbitrary
|
private static final int REQUEST_ENABLE_BT = 30242; // arbitrary
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.data.PumpStatus;
|
import info.nightscout.androidaps.plugins.pump.common.data.PumpStatus;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
||||||
|
@ -32,7 +33,7 @@ import info.nightscout.androidaps.utils.SP;
|
||||||
*/
|
*/
|
||||||
public abstract class RileyLinkCommunicationManager {
|
public abstract class RileyLinkCommunicationManager {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
private static final int SCAN_TIMEOUT = 1500;
|
private static final int SCAN_TIMEOUT = 1500;
|
||||||
private static final int ALLOWED_PUMP_UNREACHABLE = 10 * 60 * 1000; // 10 minutes
|
private static final int ALLOWED_PUMP_UNREACHABLE = 10 * 60 * 1000; // 10 minutes
|
||||||
|
|
|
@ -16,6 +16,7 @@ import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.encoding.Encoding4b6b;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.encoding.Encoding4b6b;
|
||||||
|
@ -43,7 +44,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicDe
|
||||||
|
|
||||||
public class RileyLinkUtil {
|
public class RileyLinkUtil {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMP);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMP);
|
||||||
protected static List<RLHistoryItem> historyRileyLink = new ArrayList<>();
|
protected static List<RLHistoryItem> historyRileyLink = new ArrayList<>();
|
||||||
protected static RileyLinkCommunicationManager rileyLinkCommunicationManager;
|
protected static RileyLinkCommunicationManager rileyLinkCommunicationManager;
|
||||||
static ServiceTask currentTask;
|
static ServiceTask currentTask;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import java.util.UUID;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.Reset;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.Reset;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.RileyLinkCommand;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.RileyLinkCommand;
|
||||||
|
@ -40,7 +41,7 @@ public class RFSpy {
|
||||||
|
|
||||||
public static final long RILEYLINK_FREQ_XTAL = 24000000;
|
public static final long RILEYLINK_FREQ_XTAL = 24000000;
|
||||||
public static final int EXPECTED_MAX_BLUETOOTH_LATENCY_MS = 7500; // 1500
|
public static final int EXPECTED_MAX_BLUETOOTH_LATENCY_MS = 7500; // 1500
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPBTCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPBTCOMM);
|
||||||
public int notConnectedCount = 0;
|
public int notConnectedCount = 0;
|
||||||
private RileyLinkBLE rileyLinkBle;
|
private RileyLinkBLE rileyLinkBle;
|
||||||
private RFSpyReader reader;
|
private RFSpyReader reader;
|
||||||
|
|
|
@ -12,6 +12,7 @@ import android.os.AsyncTask;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType;
|
||||||
|
@ -24,7 +25,7 @@ import info.nightscout.androidaps.plugins.pump.common.utils.ThreadUtil;
|
||||||
*/
|
*/
|
||||||
public class RFSpyReader {
|
public class RFSpyReader {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPBTCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPBTCOMM);
|
||||||
private static AsyncTask<Void, Void, Void> readerTask;
|
private static AsyncTask<Void, Void, Void> readerTask;
|
||||||
private RileyLinkBLE rileyLinkBle;
|
private RileyLinkBLE rileyLinkBle;
|
||||||
private Semaphore waitForRadioData = new Semaphore(0, true);
|
private Semaphore waitForRadioData = new Semaphore(0, true);
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.util.UUID;
|
||||||
import java.util.concurrent.Semaphore;
|
import java.util.concurrent.Semaphore;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes;
|
||||||
|
@ -39,7 +40,7 @@ import info.nightscout.androidaps.plugins.pump.common.utils.ThreadUtil;
|
||||||
*/
|
*/
|
||||||
public class RileyLinkBLE {
|
public class RileyLinkBLE {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPBTCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPBTCOMM);
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
public boolean gattDebugEnabled = true;
|
public boolean gattDebugEnabled = true;
|
||||||
|
|
|
@ -5,6 +5,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.RileyLinkCommand;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.command.RileyLinkCommand;
|
||||||
|
@ -19,7 +20,7 @@ import info.nightscout.androidaps.plugins.pump.common.utils.CRC;
|
||||||
*/
|
*/
|
||||||
public class RadioResponse {
|
public class RadioResponse {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPBTCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPBTCOMM);
|
||||||
|
|
||||||
public boolean decodedOK = false;
|
public boolean decodedOK = false;
|
||||||
public int rssi;
|
public int rssi;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkBLEError;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkBLEError;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
||||||
|
@ -16,7 +17,7 @@ import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
||||||
|
|
||||||
public class Encoding4b6bGeoff extends Encoding4b6bAbstract {
|
public class Encoding4b6bGeoff extends Encoding4b6bAbstract {
|
||||||
|
|
||||||
public static final Logger LOG = LoggerFactory.getLogger(Encoding4b6bGeoff.class);
|
public static final Logger LOG = StacktraceLoggerWrapper.getLogger(Encoding4b6bGeoff.class);
|
||||||
|
|
||||||
|
|
||||||
public byte[] encode4b6b(byte[] data) {
|
public byte[] encode4b6b(byte[] data) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import java.util.Map;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkBLEError;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkBLEError;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
||||||
|
@ -16,7 +17,7 @@ import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
||||||
|
|
||||||
public class Encoding4b6bGo extends Encoding4b6bAbstract {
|
public class Encoding4b6bGo extends Encoding4b6bAbstract {
|
||||||
|
|
||||||
public static final Logger LOG = LoggerFactory.getLogger(Encoding4b6bGo.class);
|
public static final Logger LOG = StacktraceLoggerWrapper.getLogger(Encoding4b6bGo.class);
|
||||||
private static Map<Short, Short> decodeGoMap;
|
private static Map<Short, Short> decodeGoMap;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import java.util.Map;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
||||||
|
|
||||||
|
@ -16,9 +17,8 @@ import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Encoding4b6bLoop extends Encoding4b6bAbstract {
|
public class Encoding4b6bLoop extends Encoding4b6bAbstract {
|
||||||
private static final Logger log = LoggerFactory.getLogger(Encoding4b6bLoop.class);
|
private static final Logger log = StacktraceLoggerWrapper.getLogger(Encoding4b6bLoop.class);
|
||||||
|
|
||||||
public static final Logger LOG = LoggerFactory.getLogger(Encoding4b6bLoop.class);
|
|
||||||
public Map<Integer, Byte> codesRev = null;
|
public Map<Integer, Byte> codesRev = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import android.bluetooth.BluetoothGattCharacteristic;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes;
|
||||||
|
|
||||||
|
@ -19,7 +20,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.Gatt
|
||||||
*/
|
*/
|
||||||
public class CharacteristicReadOperation extends BLECommOperation {
|
public class CharacteristicReadOperation extends BLECommOperation {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPBTCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPBTCOMM);
|
||||||
|
|
||||||
private BluetoothGattCharacteristic characteristic;
|
private BluetoothGattCharacteristic characteristic;
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import android.bluetooth.BluetoothGattCharacteristic;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes;
|
||||||
|
|
||||||
|
@ -19,7 +20,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.Gatt
|
||||||
*/
|
*/
|
||||||
public class CharacteristicWriteOperation extends BLECommOperation {
|
public class CharacteristicWriteOperation extends BLECommOperation {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPBTCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPBTCOMM);
|
||||||
|
|
||||||
private BluetoothGattCharacteristic characteristic;
|
private BluetoothGattCharacteristic characteristic;
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import android.bluetooth.BluetoothGatt;
|
||||||
import android.bluetooth.BluetoothGattDescriptor;
|
import android.bluetooth.BluetoothGattDescriptor;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkBLE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +18,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLink
|
||||||
*/
|
*/
|
||||||
public class DescriptorWriteOperation extends BLECommOperation {
|
public class DescriptorWriteOperation extends BLECommOperation {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(DescriptorWriteOperation.class);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(DescriptorWriteOperation.class);
|
||||||
|
|
||||||
private BluetoothGattDescriptor descr;
|
private BluetoothGattDescriptor descr;
|
||||||
|
|
||||||
|
|
|
@ -12,13 +12,14 @@ import org.slf4j.LoggerFactory;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||||
|
|
||||||
public class RileyLinkBluetoothStateReceiver extends BroadcastReceiver {
|
public class RileyLinkBluetoothStateReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
private static Logger LOG = LoggerFactory.getLogger(L.PUMP);
|
private static Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMP);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkFirmwareVersion;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkFirmwareVersion;
|
||||||
|
@ -39,7 +40,7 @@ import info.nightscout.androidaps.utils.SP;
|
||||||
*/
|
*/
|
||||||
public class RileyLinkBroadcastReceiver extends BroadcastReceiver {
|
public class RileyLinkBroadcastReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
RileyLinkService serviceInstance;
|
RileyLinkService serviceInstance;
|
||||||
protected Map<String, List<String>> broadcastIdentifiers = null;
|
protected Map<String, List<String>> broadcastIdentifiers = null;
|
||||||
|
|
|
@ -12,6 +12,7 @@ import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||||
|
@ -33,7 +34,7 @@ import info.nightscout.androidaps.utils.SP;
|
||||||
*/
|
*/
|
||||||
public abstract class RileyLinkService extends Service {
|
public abstract class RileyLinkService extends Service {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public RileyLinkBLE rileyLinkBLE; // android-bluetooth management
|
public RileyLinkBLE rileyLinkBLE; // android-bluetooth management
|
||||||
protected BluetoothAdapter bluetoothAdapter;
|
protected BluetoothAdapter bluetoothAdapter;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError;
|
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError;
|
||||||
|
@ -24,7 +25,7 @@ public class InitializePumpManagerTask extends ServiceTask {
|
||||||
|
|
||||||
private static final String TAG = "InitPumpManagerTask";
|
private static final String TAG = "InitPumpManagerTask";
|
||||||
private RileyLinkTargetDevice targetDevice;
|
private RileyLinkTargetDevice targetDevice;
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public InitializePumpManagerTask(RileyLinkTargetDevice targetDevice) {
|
public InitializePumpManagerTask(RileyLinkTargetDevice targetDevice) {
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -13,13 +13,14 @@ import java.util.Calendar;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is simple version of ATechDate, limited only to one format (yyyymmddHHMIss)
|
* This is simple version of ATechDate, limited only to one format (yyyymmddHHMIss)
|
||||||
*/
|
*/
|
||||||
public class DateTimeUtil {
|
public class DateTimeUtil {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static final Logger LOG = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DateTime is packed as long: yyyymmddHHMMss
|
* DateTime is packed as long: yyyymmddHHMMss
|
||||||
|
|
|
@ -29,6 +29,7 @@ import info.nightscout.androidaps.interfaces.PumpPluginBase;
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
import info.nightscout.androidaps.logging.AAPSLogger;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.logging.LTag;
|
import info.nightscout.androidaps.logging.LTag;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.common.ManufacturerType;
|
import info.nightscout.androidaps.plugins.common.ManufacturerType;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
||||||
|
@ -51,7 +52,7 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public abstract class AbstractDanaRPlugin extends PumpPluginBase implements PumpInterface, DanaRInterface, ConstraintsInterface {
|
public abstract class AbstractDanaRPlugin extends PumpPluginBase implements PumpInterface, DanaRInterface, ConstraintsInterface {
|
||||||
private Logger log = LoggerFactory.getLogger(L.PUMP);
|
private Logger log = StacktraceLoggerWrapper.getLogger(L.PUMP);
|
||||||
|
|
||||||
protected AbstractDanaRExecutionService sExecutionService;
|
protected AbstractDanaRExecutionService sExecutionService;
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
|
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageHashTableBase;
|
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageHashTableBase;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.services.AbstractSerialIOThread;
|
import info.nightscout.androidaps.plugins.pump.danaR.services.AbstractSerialIOThread;
|
||||||
|
@ -20,7 +21,7 @@ import info.nightscout.androidaps.utils.CRC;
|
||||||
* Created by mike on 17.07.2016.
|
* Created by mike on 17.07.2016.
|
||||||
*/
|
*/
|
||||||
public class SerialIOThread extends AbstractSerialIOThread {
|
public class SerialIOThread extends AbstractSerialIOThread {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPBTCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPBTCOMM);
|
||||||
|
|
||||||
private InputStream mInputStream = null;
|
private InputStream mInputStream = null;
|
||||||
private OutputStream mOutputStream = null;
|
private OutputStream mOutputStream = null;
|
||||||
|
|
|
@ -14,6 +14,7 @@ import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.db.CareportalEvent;
|
import info.nightscout.androidaps.db.CareportalEvent;
|
||||||
import info.nightscout.androidaps.db.DanaRHistoryRecord;
|
import info.nightscout.androidaps.db.DanaRHistoryRecord;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.comm.RecordTypes;
|
import info.nightscout.androidaps.plugins.pump.danaR.comm.RecordTypes;
|
||||||
|
@ -26,7 +27,7 @@ import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class DanaRNSHistorySync {
|
public class DanaRNSHistorySync {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMP);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMP);
|
||||||
private List<DanaRHistoryRecord> historyRecords;
|
private List<DanaRHistoryRecord> historyRecords;
|
||||||
|
|
||||||
private final static int SYNC_BOLUS = 0b00000001;
|
private final static int SYNC_BOLUS = 0b00000001;
|
||||||
|
|
|
@ -13,6 +13,7 @@ import java.util.Date;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.utils.CRC;
|
import info.nightscout.androidaps.utils.CRC;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -22,7 +23,7 @@ import info.nightscout.androidaps.utils.CRC;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MessageBase {
|
public class MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
protected byte[] buffer = new byte[512];
|
protected byte[] buffer = new byte[512];
|
||||||
private int position = 6;
|
private int position = 6;
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,13 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 28.05.2016.
|
* Created by mike on 28.05.2016.
|
||||||
*/
|
*/
|
||||||
public class MessageOriginalNames {
|
public class MessageOriginalNames {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
private static HashMap<Integer, String> messageNames;
|
private static HashMap<Integer, String> messageNames;
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,13 @@ import org.slf4j.LoggerFactory;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
||||||
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
||||||
|
|
||||||
public class MsgBolusProgress extends MessageBase {
|
public class MsgBolusProgress extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
private static Treatment t;
|
private static Treatment t;
|
||||||
private static double amount;
|
private static double amount;
|
||||||
|
|
|
@ -5,10 +5,11 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.interfaces.Constraint;
|
import info.nightscout.androidaps.interfaces.Constraint;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
||||||
|
|
||||||
public class MsgBolusStart extends MessageBase {
|
public class MsgBolusStart extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public static int errorCode;
|
public static int errorCode;
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,11 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.interfaces.Constraint;
|
import info.nightscout.androidaps.interfaces.Constraint;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
||||||
|
|
||||||
public class MsgBolusStartWithSpeed extends MessageBase {
|
public class MsgBolusStartWithSpeed extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public static int errorCode;
|
public static int errorCode;
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,13 @@ import org.slf4j.LoggerFactory;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
||||||
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
||||||
|
|
||||||
public class MsgBolusStop extends MessageBase {
|
public class MsgBolusStop extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
private static Treatment t;
|
private static Treatment t;
|
||||||
private static Double amount;
|
private static Double amount;
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,13 @@ import org.slf4j.LoggerFactory;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
|
|
||||||
public class MsgError extends MessageBase {
|
public class MsgError extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public MsgError() {
|
public MsgError() {
|
||||||
SetCommand(0x0601);
|
SetCommand(0x0601);
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryAlarm extends MsgHistoryAll {
|
public class MsgHistoryAlarm extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
public MsgHistoryAlarm() {
|
public MsgHistoryAlarm() {
|
||||||
SetCommand(0x3105);
|
SetCommand(0x3105);
|
||||||
if (L.isEnabled(L.PUMPCOMM))
|
if (L.isEnabled(L.PUMPCOMM))
|
||||||
|
|
|
@ -6,12 +6,13 @@ import org.slf4j.LoggerFactory;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.db.DanaRHistoryRecord;
|
import info.nightscout.androidaps.db.DanaRHistoryRecord;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
import info.nightscout.androidaps.plugins.bus.RxBus;
|
import info.nightscout.androidaps.plugins.bus.RxBus;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.events.EventDanaRSyncStatus;
|
import info.nightscout.androidaps.plugins.pump.danaR.events.EventDanaRSyncStatus;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
|
|
||||||
public class MsgHistoryAll extends MessageBase {
|
public class MsgHistoryAll extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public MsgHistoryAll() {
|
public MsgHistoryAll() {
|
||||||
SetCommand(0x41F2);
|
SetCommand(0x41F2);
|
||||||
|
|
|
@ -4,9 +4,10 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
public class MsgHistoryAllDone extends MessageBase {
|
public class MsgHistoryAllDone extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
public static boolean received = false;
|
public static boolean received = false;
|
||||||
|
|
||||||
public MsgHistoryAllDone() {
|
public MsgHistoryAllDone() {
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryBasalHour extends MsgHistoryAll {
|
public class MsgHistoryBasalHour extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
public MsgHistoryBasalHour() {
|
public MsgHistoryBasalHour() {
|
||||||
SetCommand(0x310A);
|
SetCommand(0x310A);
|
||||||
if (L.isEnabled(L.PUMPCOMM))
|
if (L.isEnabled(L.PUMPCOMM))
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryBolus extends MsgHistoryAll {
|
public class MsgHistoryBolus extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public MsgHistoryBolus() {
|
public MsgHistoryBolus() {
|
||||||
SetCommand(0x3101);
|
SetCommand(0x3101);
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryCarbo extends MsgHistoryAll {
|
public class MsgHistoryCarbo extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
public MsgHistoryCarbo() {
|
public MsgHistoryCarbo() {
|
||||||
SetCommand(0x3107);
|
SetCommand(0x3107);
|
||||||
if (L.isEnabled(L.PUMPCOMM))
|
if (L.isEnabled(L.PUMPCOMM))
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryDailyInsulin extends MsgHistoryAll {
|
public class MsgHistoryDailyInsulin extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
public MsgHistoryDailyInsulin() {
|
public MsgHistoryDailyInsulin() {
|
||||||
SetCommand(0x3102);
|
SetCommand(0x3102);
|
||||||
if (L.isEnabled(L.PUMPCOMM))
|
if (L.isEnabled(L.PUMPCOMM))
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryDone extends MessageBase {
|
public class MsgHistoryDone extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
public static boolean received = false;
|
public static boolean received = false;
|
||||||
|
|
||||||
public MsgHistoryDone() {
|
public MsgHistoryDone() {
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryError extends MsgHistoryAll {
|
public class MsgHistoryError extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public MsgHistoryError() {
|
public MsgHistoryError() {
|
||||||
SetCommand(0x3106);
|
SetCommand(0x3106);
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryGlucose extends MsgHistoryAll {
|
public class MsgHistoryGlucose extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public MsgHistoryGlucose() {
|
public MsgHistoryGlucose() {
|
||||||
SetCommand(0x3104);
|
SetCommand(0x3104);
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryNew extends MsgHistoryAll {
|
public class MsgHistoryNew extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public MsgHistoryNew() {
|
public MsgHistoryNew() {
|
||||||
SetCommand(0x42F2);
|
SetCommand(0x42F2);
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryNewDone extends MessageBase {
|
public class MsgHistoryNewDone extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
public static boolean received = false;
|
public static boolean received = false;
|
||||||
|
|
||||||
public MsgHistoryNewDone() {
|
public MsgHistoryNewDone() {
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistoryRefill extends MsgHistoryAll {
|
public class MsgHistoryRefill extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public MsgHistoryRefill() {
|
public MsgHistoryRefill() {
|
||||||
SetCommand(0x3108);
|
SetCommand(0x3108);
|
||||||
|
|
|
@ -4,12 +4,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 20.07.2016.
|
* Created by mike on 20.07.2016.
|
||||||
*/
|
*/
|
||||||
public class MsgHistorySuspend extends MsgHistoryAll {
|
public class MsgHistorySuspend extends MsgHistoryAll {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public MsgHistorySuspend() {
|
public MsgHistorySuspend() {
|
||||||
SetCommand(0x3109);
|
SetCommand(0x3109);
|
||||||
|
|
|
@ -4,9 +4,10 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.logging.StacktraceLoggerWrapper;
|
||||||
|
|
||||||
public class MsgPCCommStart extends MessageBase {
|
public class MsgPCCommStart extends MessageBase {
|
||||||
private static Logger log = LoggerFactory.getLogger(L.PUMPCOMM);
|
private static Logger log = StacktraceLoggerWrapper.getLogger(L.PUMPCOMM);
|
||||||
|
|
||||||
public MsgPCCommStart() {
|
public MsgPCCommStart() {
|
||||||
SetCommand(0x3001);
|
SetCommand(0x3001);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue