Merge branch 'dev' of https://github.com/MilosKozak/AndroidAPS into force
This commit is contained in:
commit
a49a496651
3 changed files with 6 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- daily rollover. Make sure the path matches the one in the file element or else
|
<!-- daily rollover. Make sure the path matches the one in the file element or else
|
||||||
the rollover logs are placed in the working directory. -->
|
the rollover logs are placed in the working directory. -->
|
||||||
<fileNamePattern>${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}.%i.zip</fileNamePattern>
|
<fileNamePattern>${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}_%d{HH-mm-ss, aux}_.%i.zip</fileNamePattern>
|
||||||
|
|
||||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||||
<maxFileSize>5MB</maxFileSize>
|
<maxFileSize>5MB</maxFileSize>
|
||||||
|
|
|
@ -10,6 +10,8 @@ import android.os.Handler;
|
||||||
import android.os.HandlerThread;
|
import android.os.HandlerThread;
|
||||||
import android.support.v7.app.NotificationCompat;
|
import android.support.v7.app.NotificationCompat;
|
||||||
|
|
||||||
|
import com.crashlytics.android.answers.Answers;
|
||||||
|
import com.crashlytics.android.answers.CustomEvent;
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
@ -277,6 +279,7 @@ public class LoopPlugin implements PluginBase {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final PumpEnactResult applyResult = configBuilder.applyAPSRequest(resultAfterConstraints);
|
final PumpEnactResult applyResult = configBuilder.applyAPSRequest(resultAfterConstraints);
|
||||||
|
Answers.getInstance().logCustom(new CustomEvent("APSRequest"));
|
||||||
if (applyResult.enacted || applyResult.success) {
|
if (applyResult.enacted || applyResult.success) {
|
||||||
lastRun.setByPump = applyResult;
|
lastRun.setByPump = applyResult;
|
||||||
lastRun.lastEnact = lastRun.lastAPSRun;
|
lastRun.lastEnact = lastRun.lastAPSRun;
|
||||||
|
|
|
@ -201,6 +201,7 @@ public class NSSettingsStatus {
|
||||||
|
|
||||||
private String getStringOrNull(String key) {
|
private String getStringOrNull(String key) {
|
||||||
String ret = null;
|
String ret = null;
|
||||||
|
if(data == null) return null;
|
||||||
if (data.has(key)) {
|
if (data.has(key)) {
|
||||||
try {
|
try {
|
||||||
ret = data.getString(key);
|
ret = data.getString(key);
|
||||||
|
@ -309,6 +310,7 @@ public class NSSettingsStatus {
|
||||||
public JSONObject extentendedPumpSettings() {
|
public JSONObject extentendedPumpSettings() {
|
||||||
try {
|
try {
|
||||||
JSONObject extended = getExtendedSettings();
|
JSONObject extended = getExtendedSettings();
|
||||||
|
if(extended == null) return null;
|
||||||
if (extended.has("pump")) {
|
if (extended.has("pump")) {
|
||||||
JSONObject pump = extended.getJSONObject("pump");
|
JSONObject pump = extended.getJSONObject("pump");
|
||||||
return pump;
|
return pump;
|
||||||
|
|
Loading…
Reference in a new issue