logging options
This commit is contained in:
parent
bf32b1e065
commit
16319aeb52
|
@ -32,7 +32,6 @@ public class Config {
|
||||||
public static final boolean logPumpComm = true;
|
public static final boolean logPumpComm = true;
|
||||||
public static final boolean logPrefsChange = true;
|
public static final boolean logPrefsChange = true;
|
||||||
public static final boolean logConfigBuilder = true;
|
public static final boolean logConfigBuilder = true;
|
||||||
public static final boolean logConstraintsChanges = true;
|
|
||||||
public static final boolean logNSUpload = true;
|
public static final boolean logNSUpload = true;
|
||||||
public static final boolean logPumpActions = true;
|
public static final boolean logPumpActions = true;
|
||||||
public static final boolean logCongigBuilderActions = true;
|
public static final boolean logCongigBuilderActions = true;
|
||||||
|
|
|
@ -155,7 +155,8 @@ public class IobCobThread extends Thread {
|
||||||
AutosensData hourAgoData = iobCobCalculatorPlugin.getAutosensData(hourago);
|
AutosensData hourAgoData = iobCobCalculatorPlugin.getAutosensData(hourago);
|
||||||
if (hourAgoData != null) {
|
if (hourAgoData != null) {
|
||||||
int initialIndex = autosensDataTable.indexOfKey(hourAgoData.time);
|
int initialIndex = autosensDataTable.indexOfKey(hourAgoData.time);
|
||||||
log.debug(">>>>> bucketed_data.size()=" + bucketed_data.size() + " i=" + i + "hourAgoData=" + hourAgoData.toString());
|
if (Config.logAutosensData)
|
||||||
|
log.debug(">>>>> bucketed_data.size()=" + bucketed_data.size() + " i=" + i + "hourAgoData=" + hourAgoData.toString());
|
||||||
int past = 1;
|
int past = 1;
|
||||||
try {
|
try {
|
||||||
for (; past < 12; past++) {
|
for (; past < 12; past++) {
|
||||||
|
@ -242,7 +243,8 @@ public class IobCobThread extends Thread {
|
||||||
|
|
||||||
previous = autosensData;
|
previous = autosensData;
|
||||||
autosensDataTable.put(bgTime, autosensData);
|
autosensDataTable.put(bgTime, autosensData);
|
||||||
log.debug("Running detectSensitivity from: " + DateUtil.dateAndTimeString(oldestTimeWithData) + " to: " + DateUtil.dateAndTimeString(bgTime));
|
if (Config.logAutosensData)
|
||||||
|
log.debug("Running detectSensitivity from: " + DateUtil.dateAndTimeString(oldestTimeWithData) + " to: " + DateUtil.dateAndTimeString(bgTime));
|
||||||
autosensData.autosensRatio = iobCobCalculatorPlugin.detectSensitivity(oldestTimeWithData, bgTime).ratio;
|
autosensData.autosensRatio = iobCobCalculatorPlugin.detectSensitivity(oldestTimeWithData, bgTime).ratio;
|
||||||
if (Config.logAutosensData)
|
if (Config.logAutosensData)
|
||||||
log.debug(autosensData.toString());
|
log.debug(autosensData.toString());
|
||||||
|
|
|
@ -30,7 +30,7 @@ import info.nightscout.utils.SafeParse;
|
||||||
* Created by mike on 24.06.2017.
|
* Created by mike on 24.06.2017.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SensitivityAAPSPlugin extends PluginBase implements SensitivityInterface{
|
public class SensitivityAAPSPlugin extends PluginBase implements SensitivityInterface {
|
||||||
private static Logger log = LoggerFactory.getLogger(SensitivityAAPSPlugin.class);
|
private static Logger log = LoggerFactory.getLogger(SensitivityAAPSPlugin.class);
|
||||||
|
|
||||||
static SensitivityAAPSPlugin plugin = null;
|
static SensitivityAAPSPlugin plugin = null;
|
||||||
|
@ -118,7 +118,9 @@ public class SensitivityAAPSPlugin extends PluginBase implements SensitivityInte
|
||||||
String ratioLimit = "";
|
String ratioLimit = "";
|
||||||
String sensResult = "";
|
String sensResult = "";
|
||||||
|
|
||||||
log.debug("Records: " + index + " " + pastSensitivity);
|
if (Config.logAutosensData)
|
||||||
|
log.debug("Records: " + index + " " + pastSensitivity);
|
||||||
|
|
||||||
Arrays.sort(deviations);
|
Arrays.sort(deviations);
|
||||||
|
|
||||||
double percentile = IobCobCalculatorPlugin.percentile(deviations, 0.50);
|
double percentile = IobCobCalculatorPlugin.percentile(deviations, 0.50);
|
||||||
|
@ -133,7 +135,8 @@ public class SensitivityAAPSPlugin extends PluginBase implements SensitivityInte
|
||||||
sensResult = "Sensitivity normal";
|
sensResult = "Sensitivity normal";
|
||||||
}
|
}
|
||||||
|
|
||||||
log.debug(sensResult);
|
if (Config.logAutosensData)
|
||||||
|
log.debug(sensResult);
|
||||||
|
|
||||||
double rawRatio = ratio;
|
double rawRatio = ratio;
|
||||||
ratio = Math.max(ratio, SafeParse.stringToDouble(SP.getString("openapsama_autosens_min", "0.7")));
|
ratio = Math.max(ratio, SafeParse.stringToDouble(SP.getString("openapsama_autosens_min", "0.7")));
|
||||||
|
|
|
@ -118,7 +118,9 @@ public class SensitivityOref0Plugin extends PluginBase implements SensitivityInt
|
||||||
String ratioLimit = "";
|
String ratioLimit = "";
|
||||||
String sensResult = "";
|
String sensResult = "";
|
||||||
|
|
||||||
log.debug("Records: " + index + " " + pastSensitivity);
|
if (Config.logAutosensData)
|
||||||
|
log.debug("Records: " + index + " " + pastSensitivity);
|
||||||
|
|
||||||
Arrays.sort(deviations);
|
Arrays.sort(deviations);
|
||||||
|
|
||||||
for (double i = 0.9; i > 0.1; i = i - 0.02) {
|
for (double i = 0.9; i > 0.1; i = i - 0.02) {
|
||||||
|
@ -140,7 +142,10 @@ public class SensitivityOref0Plugin extends PluginBase implements SensitivityInt
|
||||||
} else {
|
} else {
|
||||||
sensResult = "Sensitivity normal";
|
sensResult = "Sensitivity normal";
|
||||||
}
|
}
|
||||||
log.debug(sensResult);
|
|
||||||
|
if (Config.logAutosensData)
|
||||||
|
log.debug(sensResult);
|
||||||
|
|
||||||
ratio = 1 + (basalOff / profile.getMaxDailyBasal());
|
ratio = 1 + (basalOff / profile.getMaxDailyBasal());
|
||||||
|
|
||||||
double rawRatio = ratio;
|
double rawRatio = ratio;
|
||||||
|
|
Loading…
Reference in a new issue