Merge branch 'dev' into automation
This commit is contained in:
commit
4ae7efc75f
|
@ -10,6 +10,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
apply plugin: "com.android.application"
|
apply plugin: "com.android.application"
|
||||||
|
apply plugin: 'com.google.gms.google-services'
|
||||||
apply plugin: "io.fabric"
|
apply plugin: "io.fabric"
|
||||||
apply plugin: "jacoco-android"
|
apply plugin: "jacoco-android"
|
||||||
apply plugin: 'com.jakewharton.butterknife'
|
apply plugin: 'com.jakewharton.butterknife'
|
||||||
|
@ -44,6 +45,22 @@ def generateGitBuild = { ->
|
||||||
return stringBuilder.toString()
|
return stringBuilder.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def generateGitRemote = { ->
|
||||||
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
|
try {
|
||||||
|
def stdout = new ByteArrayOutputStream()
|
||||||
|
exec {
|
||||||
|
commandLine 'git', 'remote', 'get-url', 'origin'
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
String commitObject = stdout.toString().trim()
|
||||||
|
stringBuilder.append(commitObject)
|
||||||
|
} catch (ignored) {
|
||||||
|
stringBuilder.append('NoGitSystemAvailable')
|
||||||
|
}
|
||||||
|
return stringBuilder.toString()
|
||||||
|
}
|
||||||
|
|
||||||
def generateDate = { ->
|
def generateDate = { ->
|
||||||
StringBuilder stringBuilder = new StringBuilder();
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
stringBuilder.append((new Date()).format('yyyy.MM.dd-HH:mm'))
|
stringBuilder.append((new Date()).format('yyyy.MM.dd-HH:mm'))
|
||||||
|
@ -63,9 +80,10 @@ android {
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
versionCode 1500
|
versionCode 1500
|
||||||
version "2.2.1-dev"
|
version "2.2.3-dev"
|
||||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
buildConfigField "String", "VERSION", '"' + version + '"'
|
||||||
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
||||||
|
buildConfigField "String", "REMOTE", '"' + generateGitRemote()+ '"'
|
||||||
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
|
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
// if you change minSdkVersion to less than 11, you need to change executeTask for wear
|
// if you change minSdkVersion to less than 11, you need to change executeTask for wear
|
||||||
|
@ -168,12 +186,11 @@ dependencies {
|
||||||
wearApp project(':wear')
|
wearApp project(':wear')
|
||||||
|
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
|
implementation 'com.google.android.gms:play-services-wearable:16.0.1'
|
||||||
|
implementation 'com.google.firebase:firebase-core:16.0.8'
|
||||||
implementation("com.crashlytics.sdk.android:crashlytics:2.9.9@aar") {
|
implementation("com.crashlytics.sdk.android:crashlytics:2.9.9@aar") {
|
||||||
transitive = true;
|
transitive = true;
|
||||||
}
|
}
|
||||||
implementation("com.crashlytics.sdk.android:answers:1.4.7@aar") {
|
|
||||||
transitive = true;
|
|
||||||
}
|
|
||||||
libs "MilosKozak:danars-support-lib:master@zip"
|
libs "MilosKozak:danars-support-lib:master@zip"
|
||||||
|
|
||||||
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
||||||
|
@ -193,11 +210,11 @@ dependencies {
|
||||||
}
|
}
|
||||||
implementation "org.apache.commons:commons-lang3:3.7"
|
implementation "org.apache.commons:commons-lang3:3.7"
|
||||||
implementation "org.slf4j:slf4j-api:1.7.21"
|
implementation "org.slf4j:slf4j-api:1.7.21"
|
||||||
|
// Graphview cannot be upgraded
|
||||||
implementation "com.jjoe64:graphview:4.0.1"
|
implementation "com.jjoe64:graphview:4.0.1"
|
||||||
implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.1.1"
|
implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.1.1"
|
||||||
implementation 'com.google.android.gms:play-services-wearable:10.2.1'
|
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||||
implementation(name: "android-edittext-validator-v1.3.4-mod", ext: "aar")
|
implementation(name: "android-edittext-validator-v1.3.4-mod", ext: "aar")
|
||||||
implementation(name: "sightparser-release", ext: "aar")
|
|
||||||
implementation 'com.madgag.spongycastle:core:1.58.0.0'
|
implementation 'com.madgag.spongycastle:core:1.58.0.0'
|
||||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||||
|
|
||||||
|
|
107
app/google-services.json
Normal file
107
app/google-services.json
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "477603612366",
|
||||||
|
"firebase_url": "https://androidaps-c34f8.firebaseio.com",
|
||||||
|
"project_id": "androidaps-c34f8",
|
||||||
|
"storage_bucket": "androidaps-c34f8.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:477603612366:android:aef229914e3e5448",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "info.nightscout.aapspumpcontrol"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDcZpDRMaGjdhihXp531cVYM6LkEL8KbgM"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "477603612366-a925drvlvs7qn7gt73r585erbqto8c79.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:477603612366:android:efc956f55b281623",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "info.nightscout.androidaps"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDcZpDRMaGjdhihXp531cVYM6LkEL8KbgM"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "477603612366-a925drvlvs7qn7gt73r585erbqto8c79.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:477603612366:android:b38d6e7351f73cc0",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "info.nightscout.nsclient"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDcZpDRMaGjdhihXp531cVYM6LkEL8KbgM"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "477603612366-a925drvlvs7qn7gt73r585erbqto8c79.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:477603612366:android:2dc8cf3acd3332e7",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "info.nightscout.nsclient2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDcZpDRMaGjdhihXp531cVYM6LkEL8KbgM"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "477603612366-a925drvlvs7qn7gt73r585erbqto8c79.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
Binary file not shown.
|
@ -39,6 +39,7 @@
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.google.android.gms.car.application"
|
android:name="com.google.android.gms.car.application"
|
||||||
android:resource="@xml/automotive_app_desc" />
|
android:resource="@xml/automotive_app_desc" />
|
||||||
|
|
||||||
<activity android:name=".MainActivity">
|
<activity android:name=".MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
@ -47,10 +48,10 @@
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name=".activities.PreferencesActivity" />
|
<activity android:name=".activities.PreferencesActivity" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".plugins.general.overview.Dialogs.BolusProgressHelperActivity"
|
android:name=".plugins.general.overview.dialogs.BolusProgressHelperActivity"
|
||||||
android:theme="@style/Theme.AppCompat.Translucent" />
|
android:theme="@style/Theme.AppCompat.Translucent" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".plugins.general.overview.Dialogs.ErrorHelperActivity"
|
android:name=".plugins.general.overview.dialogs.ErrorHelperActivity"
|
||||||
android:theme="@style/Theme.AppCompat.Translucent" />
|
android:theme="@style/Theme.AppCompat.Translucent" />
|
||||||
<activity android:name=".activities.AgreementActivity" />
|
<activity android:name=".activities.AgreementActivity" />
|
||||||
<activity android:name=".plugins.pump.danaR.activities.DanaRHistoryActivity" />
|
<activity android:name=".plugins.pump.danaR.activities.DanaRHistoryActivity" />
|
||||||
|
@ -73,30 +74,40 @@
|
||||||
<activity android:name=".plugins.pump.danaRS.activities.PairingHelperActivity" />
|
<activity android:name=".plugins.pump.danaRS.activities.PairingHelperActivity" />
|
||||||
<activity android:name=".activities.HistoryBrowseActivity" />
|
<activity android:name=".activities.HistoryBrowseActivity" />
|
||||||
|
|
||||||
|
<!-- Receive new BG readings from other local apps -->
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".receivers.DataReceiver"
|
android:name=".receivers.DataReceiver"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
||||||
<!-- Receive new SMS messages -->
|
|
||||||
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
|
|
||||||
<!-- Receiver from xDrip -->
|
<!-- Receiver from xDrip -->
|
||||||
<action android:name="com.eveningoutpost.dexdrip.BgEstimate" />
|
<action android:name="com.eveningoutpost.dexdrip.BgEstimate"/>
|
||||||
<!-- Receiver from 640g uploader -->
|
<!-- Receiver from 640g uploader -->
|
||||||
<action android:name="com.eveningoutpost.dexdrip.NS_EMULATOR" />
|
<action android:name="com.eveningoutpost.dexdrip.NS_EMULATOR"/>
|
||||||
<!-- Receiver from glimp -->
|
<!-- Receiver from glimp -->
|
||||||
<action android:name="it.ct.glicemia.ACTION_GLUCOSE_MEASURED" />
|
<action android:name="it.ct.glicemia.ACTION_GLUCOSE_MEASURED"/>
|
||||||
<!-- Receiver from DexcomG5 -->
|
<!-- Receiver from DexcomG5 -->
|
||||||
<action android:name="com.dexcom.cgm.DATA" />
|
<action android:name="com.dexcom.cgm.DATA"/>
|
||||||
<action android:name="com.dexcom.cgm.AndroidAPSEVGCallback.BROADCAST" />
|
<action android:name="com.dexcom.cgm.AndroidAPSEVGCallback.BROADCAST"/>
|
||||||
<action android:name="com.dexcom.cgm.g5.AndroidAPSEVGCallback.BROADCAST" />
|
<action android:name="com.dexcom.cgm.g5.AndroidAPSEVGCallback.BROADCAST"/>
|
||||||
<!-- Receiver from Poctech -->
|
<!-- Receiver from Poctech -->
|
||||||
<action android:name="com.china.poctech.data" />
|
<action android:name="com.china.poctech.data"/>
|
||||||
<!-- Receiver from Tomato -->
|
<!-- Receiver from Tomato -->
|
||||||
<action android:name="com.fanqies.tomatofn.BgEstimate" />
|
<action android:name="com.fanqies.tomatofn.BgEstimate"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
|
<!-- Receive new SMS messages -->
|
||||||
|
<receiver
|
||||||
|
android:name=".receivers.SmsReceiver"
|
||||||
|
android:enabled="true"
|
||||||
|
android:exported="true"
|
||||||
|
android:permission="android.permission.BROADCAST_SMS">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.provider.Telephony.SMS_RECEIVED"/>
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
|
|
||||||
<!-- Receiver keepalive, scheduled every 30 min -->
|
<!-- Receiver keepalive, scheduled every 30 min -->
|
||||||
<receiver android:name=".receivers.KeepAliveReceiver" />
|
<receiver android:name=".receivers.KeepAliveReceiver" />
|
||||||
|
|
||||||
|
@ -179,57 +190,57 @@
|
||||||
<action android:name="com.google.android.gms.wearable.DATA_CHANGED" />
|
<action android:name="com.google.android.gms.wearable.DATA_CHANGED" />
|
||||||
|
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_data" />
|
android:pathPrefix="/nightscout_watch_data"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_data_resend" />
|
android:pathPrefix="/nightscout_watch_data_resend"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_cancel_bolus" />
|
android:pathPrefix="/nightscout_watch_cancel_bolus"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_confirmactionstring" />
|
android:pathPrefix="/nightscout_watch_confirmactionstring"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_initiateactionstring" />
|
android:pathPrefix="/nightscout_watch_initiateactionstring"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/openwearsettings" />
|
android:pathPrefix="/openwearsettings"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/sendstatustowear" />
|
android:pathPrefix="/sendstatustowear"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/sendpreferencestowear" />
|
android:pathPrefix="/sendpreferencestowear"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_basal" />
|
android:pathPrefix="/nightscout_watch_basal"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_bolusprogress" />
|
android:pathPrefix="/nightscout_watch_bolusprogress"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_actionconfirmationrequest" />
|
android:pathPrefix="/nightscout_watch_actionconfirmationrequest"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_changeconfirmationrequest" />
|
android:pathPrefix="/nightscout_watch_changeconfirmationrequest"
|
||||||
|
android:scheme="wear" />
|
||||||
<data
|
<data
|
||||||
android:scheme="wear"
|
|
||||||
android:host="*"
|
android:host="*"
|
||||||
android:pathPrefix="/nightscout_watch_cancelnotificationrequest" />
|
android:pathPrefix="/nightscout_watch_cancelnotificationrequest"
|
||||||
|
android:scheme="wear" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
<service
|
<service
|
||||||
|
@ -261,19 +272,19 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.SingleFragmentActivity"
|
android:name=".activities.SingleFragmentActivity"
|
||||||
android:theme="@style/AppTheme" />
|
android:theme="@style/AppTheme" />
|
||||||
<activity android:name=".plugins.general.maintenance.activities.LogSettingActivity"></activity>
|
<activity android:name=".plugins.general.maintenance.activities.LogSettingActivity" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".plugins.pump.insight.activities.InsightPairingActivity"
|
android:name=".plugins.pump.insight.activities.InsightPairingActivity"
|
||||||
android:theme="@style/AppTheme"
|
android:label="@string/insight_pairing"
|
||||||
android:label="@string/insight_pairing" />
|
android:theme="@style/AppTheme" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".plugins.pump.insight.activities.InsightAlertActivity"
|
android:name=".plugins.pump.insight.activities.InsightAlertActivity"
|
||||||
android:label="@string/pump_alert"
|
android:label="@string/pump_alert"
|
||||||
android:theme="@style/InsightAlertDialog" />
|
android:theme="@style/InsightAlertDialog" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".plugins.pump.insight.activities.InsightPairingInformationActivity"
|
android:name=".plugins.pump.insight.activities.InsightPairingInformationActivity"
|
||||||
android:theme="@style/AppTheme"
|
android:label="@string/pairing_information"
|
||||||
android:label="@string/pairing_information" />
|
android:theme="@style/AppTheme" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
@ -54,6 +54,7 @@ import info.nightscout.androidaps.plugins.general.nsclient.data.NSSettingsStatus
|
||||||
import info.nightscout.androidaps.setupwizard.SetupWizardActivity;
|
import info.nightscout.androidaps.setupwizard.SetupWizardActivity;
|
||||||
import info.nightscout.androidaps.tabs.TabPageAdapter;
|
import info.nightscout.androidaps.tabs.TabPageAdapter;
|
||||||
import info.nightscout.androidaps.utils.AndroidPermission;
|
import info.nightscout.androidaps.utils.AndroidPermission;
|
||||||
|
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||||
import info.nightscout.androidaps.utils.LocaleHelper;
|
import info.nightscout.androidaps.utils.LocaleHelper;
|
||||||
import info.nightscout.androidaps.utils.OKDialog;
|
import info.nightscout.androidaps.utils.OKDialog;
|
||||||
import info.nightscout.androidaps.utils.PasswordProtection;
|
import info.nightscout.androidaps.utils.PasswordProtection;
|
||||||
|
@ -115,6 +116,7 @@ public class MainActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
VersionChecker.check();
|
VersionChecker.check();
|
||||||
|
FabricPrivacy.setUserStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkPluginPreferences(ViewPager viewPager) {
|
private void checkPluginPreferences(ViewPager viewPager) {
|
||||||
|
@ -170,7 +172,7 @@ public class MainActivity extends AppCompatActivity {
|
||||||
boolean keepScreenOn = SP.getBoolean(R.string.key_keep_screen_on, false);
|
boolean keepScreenOn = SP.getBoolean(R.string.key_keep_screen_on, false);
|
||||||
final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
|
final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
|
||||||
if (keepScreenOn) {
|
if (keepScreenOn) {
|
||||||
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AAPS");
|
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AndroidAPS:MainActivity_onEventPreferenceChange");
|
||||||
if (!mWakeLock.isHeld())
|
if (!mWakeLock.isHeld())
|
||||||
mWakeLock.acquire();
|
mWakeLock.acquire();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import android.support.annotation.PluralsRes;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
|
|
||||||
import com.crashlytics.android.Crashlytics;
|
import com.crashlytics.android.Crashlytics;
|
||||||
import com.crashlytics.android.answers.Answers;
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
import com.j256.ormlite.android.apptools.OpenHelperManager;
|
import com.j256.ormlite.android.apptools.OpenHelperManager;
|
||||||
import com.squareup.otto.Bus;
|
import com.squareup.otto.Bus;
|
||||||
import com.squareup.otto.LoggingBus;
|
import com.squareup.otto.LoggingBus;
|
||||||
|
@ -98,6 +98,8 @@ public class MainApp extends Application {
|
||||||
private static MainApp sInstance;
|
private static MainApp sInstance;
|
||||||
public static Resources sResources;
|
public static Resources sResources;
|
||||||
|
|
||||||
|
private static FirebaseAnalytics mFirebaseAnalytics;
|
||||||
|
|
||||||
private static DatabaseHelper sDatabaseHelper = null;
|
private static DatabaseHelper sDatabaseHelper = null;
|
||||||
private static ConstraintChecker sConstraintsChecker = null;
|
private static ConstraintChecker sConstraintsChecker = null;
|
||||||
|
|
||||||
|
@ -124,17 +126,18 @@ public class MainApp extends Application {
|
||||||
try {
|
try {
|
||||||
if (FabricPrivacy.fabricEnabled()) {
|
if (FabricPrivacy.fabricEnabled()) {
|
||||||
Fabric.with(this, new Crashlytics());
|
Fabric.with(this, new Crashlytics());
|
||||||
Fabric.with(this, new Answers());
|
|
||||||
Crashlytics.setString("BUILDVERSION", BuildConfig.BUILDVERSION);
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Error with Fabric init! " + e);
|
log.error("Error with Fabric init! " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
||||||
|
|
||||||
JodaTimeAndroid.init(this);
|
JodaTimeAndroid.init(this);
|
||||||
|
|
||||||
log.info("Version: " + BuildConfig.VERSION_NAME);
|
log.info("Version: " + BuildConfig.VERSION_NAME);
|
||||||
log.info("BuildVersion: " + BuildConfig.BUILDVERSION);
|
log.info("BuildVersion: " + BuildConfig.BUILDVERSION);
|
||||||
|
log.info("Remote: " + BuildConfig.REMOTE);
|
||||||
|
|
||||||
String extFilesDir = LoggerUtils.getLogDirectory();
|
String extFilesDir = LoggerUtils.getLogDirectory();
|
||||||
File engineeringModeSemaphore = new File(extFilesDir, "engineering_mode");
|
File engineeringModeSemaphore = new File(extFilesDir, "engineering_mode");
|
||||||
|
@ -309,6 +312,10 @@ public class MainApp extends Application {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static FirebaseAnalytics getFirebaseAnalytics() {
|
||||||
|
return mFirebaseAnalytics;
|
||||||
|
}
|
||||||
|
|
||||||
public static ConstraintChecker getConstraintChecker() {
|
public static ConstraintChecker getConstraintChecker() {
|
||||||
return sConstraintsChecker;
|
return sConstraintsChecker;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,8 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.MainApp;
|
|
||||||
import info.nightscout.androidaps.R;
|
|
||||||
import info.nightscout.androidaps.db.BgReading;
|
import info.nightscout.androidaps.db.BgReading;
|
||||||
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
import info.nightscout.androidaps.utils.DecimalFormatter;
|
||||||
|
@ -30,12 +29,11 @@ public class GlucoseStatus {
|
||||||
public long date = 0L;
|
public long date = 0L;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
public String log() {
|
||||||
public String toString() {
|
return "Glucose: " + DecimalFormatter.to0Decimal(glucose) + " mg/dl " +
|
||||||
return MainApp.gs(R.string.glucose) + " " + DecimalFormatter.to0Decimal(glucose) + " mg/dl\n" +
|
"Delta: " + DecimalFormatter.to0Decimal(delta) + " mg/dl" +
|
||||||
MainApp.gs(R.string.delta) + " " + DecimalFormatter.to0Decimal(delta) + " mg/dl\n" +
|
"Short avg. delta: " + " " + DecimalFormatter.to2Decimal(short_avgdelta) + " mg/dl " +
|
||||||
MainApp.gs(R.string.short_avgdelta) + " " + DecimalFormatter.to2Decimal(short_avgdelta) + " mg/dl\n" +
|
"Long avg. delta: " + DecimalFormatter.to2Decimal(long_avgdelta) + " mg/dl";
|
||||||
MainApp.gs(R.string.long_avgdelta) + " " + DecimalFormatter.to2Decimal(long_avgdelta) + " mg/dl";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GlucoseStatus() {
|
public GlucoseStatus() {
|
||||||
|
@ -64,17 +62,22 @@ public class GlucoseStatus {
|
||||||
|
|
||||||
List<BgReading> data = IobCobCalculatorPlugin.getPlugin().getBgReadings();
|
List<BgReading> data = IobCobCalculatorPlugin.getPlugin().getBgReadings();
|
||||||
|
|
||||||
if (data == null)
|
if (data == null) {
|
||||||
return null;
|
if (L.isEnabled(L.GLUCOSE))
|
||||||
|
log.debug("data=null");
|
||||||
int sizeRecords = data.size();
|
|
||||||
if (sizeRecords == 0) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
sizeRecords = Math.min(sizeRecords, 9);
|
int sizeRecords = data.size();
|
||||||
|
if (sizeRecords == 0) {
|
||||||
|
if (L.isEnabled(L.GLUCOSE))
|
||||||
|
log.debug("sizeRecords==0");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (data.get(0).date < DateUtil.now() - 7 * 60 * 1000L && !allowOldData) {
|
if (data.get(0).date < DateUtil.now() - 7 * 60 * 1000L && !allowOldData) {
|
||||||
|
if (L.isEnabled(L.GLUCOSE))
|
||||||
|
log.debug("olddata");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,18 +93,24 @@ public class GlucoseStatus {
|
||||||
status.long_avgdelta = 0d;
|
status.long_avgdelta = 0d;
|
||||||
status.avgdelta = 0d; // for OpenAPS MA
|
status.avgdelta = 0d; // for OpenAPS MA
|
||||||
status.date = now_date;
|
status.date = now_date;
|
||||||
|
if (L.isEnabled(L.GLUCOSE))
|
||||||
|
log.debug("sizeRecords==1");
|
||||||
return status.round();
|
return status.round();
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<Double> last_deltas = new ArrayList<Double>();
|
ArrayList<Double> now_value_list = new ArrayList<>();
|
||||||
ArrayList<Double> short_deltas = new ArrayList<Double>();
|
ArrayList<Double> last_deltas = new ArrayList<>();
|
||||||
ArrayList<Double> long_deltas = new ArrayList<Double>();
|
ArrayList<Double> short_deltas = new ArrayList<>();
|
||||||
|
ArrayList<Double> long_deltas = new ArrayList<>();
|
||||||
|
|
||||||
|
// Use the latest sgv value in the now calculations
|
||||||
|
now_value_list.add(now.value);
|
||||||
|
|
||||||
for (int i = 1; i < sizeRecords; i++) {
|
for (int i = 1; i < sizeRecords; i++) {
|
||||||
if (data.get(i).value > 38) {
|
if (data.get(i).value > 38) {
|
||||||
BgReading then = data.get(i);
|
BgReading then = data.get(i);
|
||||||
long then_date = then.date;
|
long then_date = then.date;
|
||||||
double avgdelta = 0;
|
double avgdelta;
|
||||||
long minutesago;
|
long minutesago;
|
||||||
|
|
||||||
minutesago = Math.round((now_date - then_date) / (1000d * 60));
|
minutesago = Math.round((now_date - then_date) / (1000d * 60));
|
||||||
|
@ -109,10 +118,14 @@ public class GlucoseStatus {
|
||||||
change = now.value - then.value;
|
change = now.value - then.value;
|
||||||
avgdelta = change / minutesago * 5;
|
avgdelta = change / minutesago * 5;
|
||||||
|
|
||||||
|
if (L.isEnabled(L.GLUCOSE))
|
||||||
|
log.debug(then.toString() + " minutesago=" + minutesago + " avgdelta=" + avgdelta);
|
||||||
|
|
||||||
// use the average of all data points in the last 2.5m for all further "now" calculations
|
// use the average of all data points in the last 2.5m for all further "now" calculations
|
||||||
if (0 < minutesago && minutesago < 2.5) {
|
if (0 < minutesago && minutesago < 2.5) {
|
||||||
now.value = (now.value + then.value) / 2;
|
// Keep and average all values within the last 2.5 minutes
|
||||||
now_date = (now_date + then_date) / 2;
|
now_value_list.add(then.value);
|
||||||
|
now.value = average(now_value_list);
|
||||||
// short_deltas are calculated from everything ~5-15 minutes ago
|
// short_deltas are calculated from everything ~5-15 minutes ago
|
||||||
} else if (2.5 < minutesago && minutesago < 17.5) {
|
} else if (2.5 < minutesago && minutesago < 17.5) {
|
||||||
//console.error(minutesago, avgdelta);
|
//console.error(minutesago, avgdelta);
|
||||||
|
@ -124,6 +137,9 @@ public class GlucoseStatus {
|
||||||
// long_deltas are calculated from everything ~20-40 minutes ago
|
// long_deltas are calculated from everything ~20-40 minutes ago
|
||||||
} else if (17.5 < minutesago && minutesago < 42.5) {
|
} else if (17.5 < minutesago && minutesago < 42.5) {
|
||||||
long_deltas.add(avgdelta);
|
long_deltas.add(avgdelta);
|
||||||
|
} else {
|
||||||
|
// Do not process any more records after >= 42.5 minutes
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,6 +159,8 @@ public class GlucoseStatus {
|
||||||
status.long_avgdelta = average(long_deltas);
|
status.long_avgdelta = average(long_deltas);
|
||||||
status.avgdelta = status.short_avgdelta; // for OpenAPS MA
|
status.avgdelta = status.short_avgdelta; // for OpenAPS MA
|
||||||
|
|
||||||
|
if (L.isEnabled(L.GLUCOSE))
|
||||||
|
log.debug(status.log());
|
||||||
return status.round();
|
return status.round();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ import info.nightscout.androidaps.data.ProfileStore;
|
||||||
import info.nightscout.androidaps.events.EventCareportalEventChange;
|
import info.nightscout.androidaps.events.EventCareportalEventChange;
|
||||||
import info.nightscout.androidaps.events.EventExtendedBolusChange;
|
import info.nightscout.androidaps.events.EventExtendedBolusChange;
|
||||||
import info.nightscout.androidaps.events.EventNewBG;
|
import info.nightscout.androidaps.events.EventNewBG;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
import info.nightscout.androidaps.events.EventRefreshOverview;
|
import info.nightscout.androidaps.events.EventRefreshOverview;
|
||||||
import info.nightscout.androidaps.events.EventReloadProfileSwitchData;
|
import info.nightscout.androidaps.events.EventReloadProfileSwitchData;
|
||||||
import info.nightscout.androidaps.events.EventReloadTempBasalData;
|
import info.nightscout.androidaps.events.EventReloadTempBasalData;
|
||||||
|
@ -726,7 +726,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
String units = JsonHelper.safeGetString(trJson, "units", Constants.MGDL);
|
String units = JsonHelper.safeGetString(trJson, "units", Constants.MGDL);
|
||||||
TempTarget tempTarget = new TempTarget()
|
TempTarget tempTarget = new TempTarget()
|
||||||
.date(trJson.getLong("mills"))
|
.date(trJson.getLong("mills"))
|
||||||
.duration(trJson.getInt("duration"))
|
.duration(JsonHelper.safeGetInt(trJson, "duration"))
|
||||||
.low(Profile.toMgdl(trJson.getDouble("targetBottom"), units))
|
.low(Profile.toMgdl(trJson.getDouble("targetBottom"), units))
|
||||||
.high(Profile.toMgdl(trJson.getDouble("targetTop"), units))
|
.high(Profile.toMgdl(trJson.getDouble("targetTop"), units))
|
||||||
.reason(JsonHelper.safeGetString(trJson, "reason", ""))
|
.reason(JsonHelper.safeGetString(trJson, "reason", ""))
|
||||||
|
@ -1574,9 +1574,9 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
||||||
class PostRunnable implements Runnable {
|
class PostRunnable implements Runnable {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (L.isEnabled(L.DATABASE))
|
if (L.isEnabled(L.DATABASE))
|
||||||
log.debug("Firing EventProfileSwitchChange");
|
log.debug("Firing EventProfileNeedsUpdate");
|
||||||
MainApp.bus().post(new EventReloadProfileSwitchData());
|
MainApp.bus().post(new EventReloadProfileSwitchData());
|
||||||
MainApp.bus().post(new EventProfileSwitchChange());
|
MainApp.bus().post(new EventProfileNeedsUpdate());
|
||||||
scheduledProfileSwitchEventPost = null;
|
scheduledProfileSwitchEventPost = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,5 +4,5 @@ package info.nightscout.androidaps.events;
|
||||||
* Created by mike on 02.06.2017.
|
* Created by mike on 02.06.2017.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class EventProfileSwitchChange extends Event {
|
public class EventProfileNeedsUpdate extends Event {
|
||||||
}
|
}
|
|
@ -78,6 +78,7 @@ public class L {
|
||||||
public static final String CORE = "CORE";
|
public static final String CORE = "CORE";
|
||||||
public static final String AUTOSENS = "AUTOSENS";
|
public static final String AUTOSENS = "AUTOSENS";
|
||||||
public static final String EVENTS = "EVENTS";
|
public static final String EVENTS = "EVENTS";
|
||||||
|
public static final String GLUCOSE = "GLUCOSE";
|
||||||
public static final String BGSOURCE = "BGSOURCE";
|
public static final String BGSOURCE = "BGSOURCE";
|
||||||
public static final String OVERVIEW = "OVERVIEW";
|
public static final String OVERVIEW = "OVERVIEW";
|
||||||
public static final String NOTIFICATION = "NOTIFICATION";
|
public static final String NOTIFICATION = "NOTIFICATION";
|
||||||
|
@ -103,6 +104,7 @@ public class L {
|
||||||
logElements.add(new LogElement(APS, true));
|
logElements.add(new LogElement(APS, true));
|
||||||
logElements.add(new LogElement(AUTOSENS, false));
|
logElements.add(new LogElement(AUTOSENS, false));
|
||||||
logElements.add(new LogElement(BGSOURCE, true));
|
logElements.add(new LogElement(BGSOURCE, true));
|
||||||
|
logElements.add(new LogElement(GLUCOSE, false));
|
||||||
logElements.add(new LogElement(CONFIGBUILDER, false));
|
logElements.add(new LogElement(CONFIGBUILDER, false));
|
||||||
logElements.add(new LogElement(CONSTRAINTS, true));
|
logElements.add(new LogElement(CONSTRAINTS, true));
|
||||||
logElements.add(new LogElement(CORE, true));
|
logElements.add(new LogElement(CORE, true));
|
||||||
|
|
|
@ -10,7 +10,6 @@ import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
@ -19,9 +18,9 @@ import butterknife.OnClick;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.interfaces.Constraint;
|
import info.nightscout.androidaps.interfaces.Constraint;
|
||||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui;
|
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui;
|
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui;
|
||||||
|
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||||
|
|
||||||
public class LoopFragment extends SubscriberFragment {
|
public class LoopFragment extends SubscriberFragment {
|
||||||
|
@ -62,7 +61,6 @@ public class LoopFragment extends SubscriberFragment {
|
||||||
void onRunClick() {
|
void onRunClick() {
|
||||||
lastRunView.setText(MainApp.gs(R.string.executing));
|
lastRunView.setText(MainApp.gs(R.string.executing));
|
||||||
new Thread(() -> LoopPlugin.getPlugin().invoke("Loop button", true)).start();
|
new Thread(() -> LoopPlugin.getPlugin().invoke("Loop button", true)).start();
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("Loop_Run"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
@ -75,7 +73,11 @@ public class LoopFragment extends SubscriberFragment {
|
||||||
clearGUI();
|
clearGUI();
|
||||||
final Activity activity = getActivity();
|
final Activity activity = getActivity();
|
||||||
if (activity != null)
|
if (activity != null)
|
||||||
activity.runOnUiThread(() -> { synchronized (LoopFragment.this) { if (lastRunView != null) lastRunView.setText(ev.text); } });
|
activity.runOnUiThread(() -> {
|
||||||
|
synchronized (LoopFragment.this) {
|
||||||
|
if (lastRunView != null) lastRunView.setText(ev.text);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ import android.os.SystemClock;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.v4.app.NotificationCompat;
|
import android.support.v4.app.NotificationCompat;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -33,6 +32,7 @@ import info.nightscout.androidaps.db.CareportalEvent;
|
||||||
import info.nightscout.androidaps.db.DatabaseHelper;
|
import info.nightscout.androidaps.db.DatabaseHelper;
|
||||||
import info.nightscout.androidaps.db.Source;
|
import info.nightscout.androidaps.db.Source;
|
||||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||||
|
import info.nightscout.androidaps.events.EventAcceptOpenLoopChange;
|
||||||
import info.nightscout.androidaps.events.EventNewBG;
|
import info.nightscout.androidaps.events.EventNewBG;
|
||||||
import info.nightscout.androidaps.events.EventTempTargetChange;
|
import info.nightscout.androidaps.events.EventTempTargetChange;
|
||||||
import info.nightscout.androidaps.interfaces.APSInterface;
|
import info.nightscout.androidaps.interfaces.APSInterface;
|
||||||
|
@ -44,18 +44,17 @@ import info.nightscout.androidaps.interfaces.PumpDescription;
|
||||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
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.plugins.configBuilder.ConfigBuilderPlugin;
|
|
||||||
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
|
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui;
|
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui;
|
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.events.EventNewOpenLoopNotification;
|
import info.nightscout.androidaps.plugins.aps.loop.events.EventNewOpenLoopNotification;
|
||||||
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||||
|
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
|
import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
|
||||||
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||||
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
|
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
|
||||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
|
|
||||||
import info.nightscout.androidaps.events.EventAcceptOpenLoopChange;
|
|
||||||
import info.nightscout.androidaps.queue.Callback;
|
import info.nightscout.androidaps.queue.Callback;
|
||||||
import info.nightscout.androidaps.queue.commands.Command;
|
import info.nightscout.androidaps.queue.commands.Command;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||||
|
@ -179,11 +178,9 @@ public class LoopPlugin extends PluginBase {
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onStatusEvent(final EventTempTargetChange ev) {
|
public void onStatusEvent(final EventTempTargetChange ev) {
|
||||||
new Thread(() -> invoke("EventTempTargetChange", true)).start();
|
new Thread(() -> invoke("EventTempTargetChange", true)).start();
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("TT_Loop_Run"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void suspendTo(long endTime) {
|
public void suspendTo(long endTime) {
|
||||||
loopSuspendedTill = endTime;
|
loopSuspendedTill = endTime;
|
||||||
isSuperBolus = false;
|
isSuperBolus = false;
|
||||||
|
@ -376,7 +373,7 @@ public class LoopPlugin extends PluginBase {
|
||||||
if (resultAfterConstraints.bolusRequested)
|
if (resultAfterConstraints.bolusRequested)
|
||||||
lastRun.smbSetByPump = waiting;
|
lastRun.smbSetByPump = waiting;
|
||||||
MainApp.bus().post(new EventLoopUpdateGui());
|
MainApp.bus().post(new EventLoopUpdateGui());
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("APSRequest"));
|
FabricPrivacy.getInstance().logCustom("APSRequest");
|
||||||
applyTBRRequest(resultAfterConstraints, profile, new Callback() {
|
applyTBRRequest(resultAfterConstraints, profile, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -395,7 +392,6 @@ public class LoopPlugin extends PluginBase {
|
||||||
SystemClock.sleep(1000);
|
SystemClock.sleep(1000);
|
||||||
LoopPlugin.getPlugin().invoke("tempBasalFallback", allowNotification, true);
|
LoopPlugin.getPlugin().invoke("tempBasalFallback", allowNotification, true);
|
||||||
}).start();
|
}).start();
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("Loop_Run_TempBasalFallback"));
|
|
||||||
}
|
}
|
||||||
MainApp.bus().post(new EventLoopUpdateGui());
|
MainApp.bus().post(new EventLoopUpdateGui());
|
||||||
}
|
}
|
||||||
|
@ -482,7 +478,7 @@ public class LoopPlugin extends PluginBase {
|
||||||
MainApp.bus().post(new EventAcceptOpenLoopChange());
|
MainApp.bus().post(new EventAcceptOpenLoopChange());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("AcceptTemp"));
|
FabricPrivacy.getInstance().logCustom("AcceptTemp");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,7 +8,6 @@ import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
@ -19,11 +18,10 @@ 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.plugins.common.SubscriberFragment;
|
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
|
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateResultGui;
|
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateResultGui;
|
||||||
|
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.JSONFormatter;
|
import info.nightscout.androidaps.utils.JSONFormatter;
|
||||||
|
|
||||||
public class OpenAPSAMAFragment extends SubscriberFragment implements View.OnClickListener {
|
public class OpenAPSAMAFragment extends SubscriberFragment implements View.OnClickListener {
|
||||||
|
@ -68,7 +66,6 @@ public class OpenAPSAMAFragment extends SubscriberFragment implements View.OnCli
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.openapsma_run:
|
case R.id.openapsma_run:
|
||||||
OpenAPSAMAPlugin.getPlugin().invoke("OpenAPSAMA button", false);
|
OpenAPSAMAPlugin.getPlugin().invoke("OpenAPSAMA button", false);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("OpenAPS_AMA_Run"));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,12 @@ import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
|
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateResultGui;
|
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateResultGui;
|
||||||
|
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||||
import info.nightscout.androidaps.utils.JSONFormatter;
|
import info.nightscout.androidaps.utils.JSONFormatter;
|
||||||
|
@ -61,7 +60,6 @@ public class OpenAPSMAFragment extends SubscriberFragment implements View.OnClic
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.openapsma_run:
|
case R.id.openapsma_run:
|
||||||
OpenAPSMAPlugin.getPlugin().invoke("OpenAPSMA button", false);
|
OpenAPSMAPlugin.getPlugin().invoke("OpenAPSMA button", false);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("OpenAPS_MA_Run"));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,8 +232,13 @@ public class DetermineBasalAdapterSMBJS {
|
||||||
mProfile.put("max_daily_safety_multiplier", SP.getInt(R.string.key_openapsama_max_daily_safety_multiplier, 3));
|
mProfile.put("max_daily_safety_multiplier", SP.getInt(R.string.key_openapsama_max_daily_safety_multiplier, 3));
|
||||||
mProfile.put("current_basal_safety_multiplier", SP.getDouble(R.string.key_openapsama_current_basal_safety_multiplier, 4d));
|
mProfile.put("current_basal_safety_multiplier", SP.getDouble(R.string.key_openapsama_current_basal_safety_multiplier, 4d));
|
||||||
|
|
||||||
mProfile.put("high_temptarget_raises_sensitivity", SP.getBoolean(R.string.key_high_temptarget_raises_sensitivity, SMBDefaults.high_temptarget_raises_sensitivity));
|
// TODO AS-FIX
|
||||||
mProfile.put("low_temptarget_lowers_sensitivity", SP.getBoolean(R.string.key_low_temptarget_lowers_sensitivity, SMBDefaults.low_temptarget_lowers_sensitivity));
|
// mProfile.put("high_temptarget_raises_sensitivity", SP.getBoolean(R.string.key_high_temptarget_raises_sensitivity, SMBDefaults.high_temptarget_raises_sensitivity));
|
||||||
|
mProfile.put("high_temptarget_raises_sensitivity", false);
|
||||||
|
//mProfile.put("low_temptarget_lowers_sensitivity", SP.getBoolean(R.string.key_low_temptarget_lowers_sensitivity, SMBDefaults.low_temptarget_lowers_sensitivity));
|
||||||
|
mProfile.put("low_temptarget_lowers_sensitivity", false);
|
||||||
|
|
||||||
|
|
||||||
mProfile.put("sensitivity_raises_target", SMBDefaults.sensitivity_raises_target);
|
mProfile.put("sensitivity_raises_target", SMBDefaults.sensitivity_raises_target);
|
||||||
mProfile.put("resistance_lowers_target", SMBDefaults.resistance_lowers_target);
|
mProfile.put("resistance_lowers_target", SMBDefaults.resistance_lowers_target);
|
||||||
mProfile.put("adv_target_adjustments", SMBDefaults.adv_target_adjustments);
|
mProfile.put("adv_target_adjustments", SMBDefaults.adv_target_adjustments);
|
||||||
|
|
|
@ -8,7 +8,6 @@ import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
@ -22,11 +21,10 @@ import butterknife.OnClick;
|
||||||
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.plugins.common.SubscriberFragment;
|
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
|
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateResultGui;
|
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateResultGui;
|
||||||
|
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.JSONFormatter;
|
import info.nightscout.androidaps.utils.JSONFormatter;
|
||||||
|
|
||||||
public class OpenAPSSMBFragment extends SubscriberFragment {
|
public class OpenAPSSMBFragment extends SubscriberFragment {
|
||||||
|
@ -69,7 +67,6 @@ public class OpenAPSSMBFragment extends SubscriberFragment {
|
||||||
@OnClick(R.id.openapsma_run)
|
@OnClick(R.id.openapsma_run)
|
||||||
public void onRunClick() {
|
public void onRunClick() {
|
||||||
OpenAPSSMBPlugin.getPlugin().invoke("OpenAPSSMB button", false);
|
OpenAPSSMBPlugin.getPlugin().invoke("OpenAPSSMB button", false);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("OpenAPS_SMB_Run"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
|
|
@ -16,8 +16,6 @@ import android.widget.RadioButton;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -26,8 +24,8 @@ import butterknife.ButterKnife;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
import butterknife.Unbinder;
|
import butterknife.Unbinder;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.activities.PreferencesActivity;
|
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
import info.nightscout.androidaps.activities.PreferencesActivity;
|
||||||
import info.nightscout.androidaps.events.EventConfigBuilderChange;
|
import info.nightscout.androidaps.events.EventConfigBuilderChange;
|
||||||
import info.nightscout.androidaps.events.EventRefreshGui;
|
import info.nightscout.androidaps.events.EventRefreshGui;
|
||||||
import info.nightscout.androidaps.interfaces.APSInterface;
|
import info.nightscout.androidaps.interfaces.APSInterface;
|
||||||
|
@ -42,7 +40,6 @@ import info.nightscout.androidaps.interfaces.SensitivityInterface;
|
||||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||||
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin;
|
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin;
|
||||||
import info.nightscout.androidaps.plugins.profile.ns.NSProfilePlugin;
|
import info.nightscout.androidaps.plugins.profile.ns.NSProfilePlugin;
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
|
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
|
||||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref0Plugin;
|
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref0Plugin;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||||
|
@ -276,7 +273,6 @@ public class ConfigBuilderFragment extends SubscriberFragment {
|
||||||
MainApp.bus().post(new EventRefreshGui());
|
MainApp.bus().post(new EventRefreshGui());
|
||||||
MainApp.bus().post(new EventConfigBuilderChange());
|
MainApp.bus().post(new EventConfigBuilderChange());
|
||||||
ConfigBuilderPlugin.getPlugin().logPluginStatus();
|
ConfigBuilderPlugin.getPlugin().logPluginStatus();
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("ConfigurationChange"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancel(){
|
public void cancel(){
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package info.nightscout.androidaps.plugins.configBuilder;
|
package info.nightscout.androidaps.plugins.configBuilder;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -18,11 +19,11 @@ import info.nightscout.androidaps.data.ProfileStore;
|
||||||
import info.nightscout.androidaps.db.ProfileSwitch;
|
import info.nightscout.androidaps.db.ProfileSwitch;
|
||||||
import info.nightscout.androidaps.db.Source;
|
import info.nightscout.androidaps.db.Source;
|
||||||
import info.nightscout.androidaps.events.EventNewBasalProfile;
|
import info.nightscout.androidaps.events.EventNewBasalProfile;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
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.plugins.general.overview.Dialogs.ErrorHelperActivity;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
|
||||||
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;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||||
|
@ -47,7 +48,7 @@ public class ProfileFunctions {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onProfileSwitch(EventProfileSwitchChange ignored) {
|
public void onProfileSwitch(EventProfileNeedsUpdate ignored) {
|
||||||
if (L.isEnabled(L.PROFILE))
|
if (L.isEnabled(L.PROFILE))
|
||||||
log.debug("onProfileSwitch");
|
log.debug("onProfileSwitch");
|
||||||
ConfigBuilderPlugin.getPlugin().getCommandQueue().setProfile(getProfile(), new Callback() {
|
ConfigBuilderPlugin.getPlugin().getCommandQueue().setProfile(getProfile(), new Callback() {
|
||||||
|
@ -61,7 +62,8 @@ public class ProfileFunctions {
|
||||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
MainApp.instance().startActivity(i);
|
MainApp.instance().startActivity(i);
|
||||||
}
|
}
|
||||||
MainApp.bus().post(new EventNewBasalProfile());
|
if (result.enacted)
|
||||||
|
MainApp.bus().post(new EventNewBasalProfile());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -129,12 +131,12 @@ public class ProfileFunctions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (activeTreatments.getProfileSwitchesFromHistory().size() > 0) {
|
if (activeTreatments.getProfileSwitchesFromHistory().size() > 0) {
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("CatchedError")
|
Bundle bundle = new Bundle();
|
||||||
.putCustomAttribute("buildversion", BuildConfig.BUILDVERSION)
|
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "CatchedError");
|
||||||
.putCustomAttribute("version", BuildConfig.VERSION)
|
bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, BuildConfig.BUILDVERSION);
|
||||||
.putCustomAttribute("time", time)
|
bundle.putString(FirebaseAnalytics.Param.START_DATE, String.valueOf(time));
|
||||||
.putCustomAttribute("getProfileSwitchesFromHistory", activeTreatments.getProfileSwitchesFromHistory().toString())
|
bundle.putString(FirebaseAnalytics.Param.VALUE, activeTreatments.getProfileSwitchesFromHistory().toString());
|
||||||
);
|
FabricPrivacy.getInstance().logCustom(bundle);
|
||||||
}
|
}
|
||||||
log.error("getProfile at the end: returning null");
|
log.error("getProfile at the end: returning null");
|
||||||
return null;
|
return null;
|
||||||
|
@ -157,7 +159,6 @@ public class ProfileFunctions {
|
||||||
public static void doProfileSwitch(final ProfileStore profileStore, final String profileName, final int duration, final int percentage, final int timeshift) {
|
public static void doProfileSwitch(final ProfileStore profileStore, final String profileName, final int duration, final int percentage, final int timeshift) {
|
||||||
ProfileSwitch profileSwitch = prepareProfileSwitch(profileStore, profileName, duration, percentage, timeshift, System.currentTimeMillis());
|
ProfileSwitch profileSwitch = prepareProfileSwitch(profileStore, profileName, duration, percentage, timeshift, System.currentTimeMillis());
|
||||||
TreatmentsPlugin.getPlugin().addToHistoryProfileSwitch(profileSwitch);
|
TreatmentsPlugin.getPlugin().addToHistoryProfileSwitch(profileSwitch);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("ProfileSwitch"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void doProfileSwitch(final int duration, final int percentage, final int timeshift) {
|
public static void doProfileSwitch(final int duration, final int percentage, final int timeshift) {
|
||||||
|
@ -174,7 +175,6 @@ public class ProfileFunctions {
|
||||||
profileSwitch.timeshift = timeshift;
|
profileSwitch.timeshift = timeshift;
|
||||||
profileSwitch.percentage = percentage;
|
profileSwitch.percentage = percentage;
|
||||||
TreatmentsPlugin.getPlugin().addToHistoryProfileSwitch(profileSwitch);
|
TreatmentsPlugin.getPlugin().addToHistoryProfileSwitch(profileSwitch);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("ProfileSwitch"));
|
|
||||||
} else {
|
} else {
|
||||||
log.error("No profile switch existing");
|
log.error("No profile switch existing");
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -21,9 +20,9 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import info.nightscout.androidaps.Config;
|
import info.nightscout.androidaps.Config;
|
||||||
import info.nightscout.androidaps.activities.HistoryBrowseActivity;
|
|
||||||
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.HistoryBrowseActivity;
|
||||||
import info.nightscout.androidaps.activities.TDDStatsActivity;
|
import info.nightscout.androidaps.activities.TDDStatsActivity;
|
||||||
import info.nightscout.androidaps.db.ExtendedBolus;
|
import info.nightscout.androidaps.db.ExtendedBolus;
|
||||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||||
|
@ -35,7 +34,6 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||||
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.general.actions.ActionsPlugin;
|
|
||||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
|
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
|
||||||
import info.nightscout.androidaps.plugins.general.actions.dialogs.FillDialog;
|
import info.nightscout.androidaps.plugins.general.actions.dialogs.FillDialog;
|
||||||
import info.nightscout.androidaps.plugins.general.actions.dialogs.NewExtendedBolusDialog;
|
import info.nightscout.androidaps.plugins.general.actions.dialogs.NewExtendedBolusDialog;
|
||||||
|
@ -70,7 +68,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
||||||
SingleClickButton tddStats;
|
SingleClickButton tddStats;
|
||||||
SingleClickButton history;
|
SingleClickButton history;
|
||||||
|
|
||||||
private Map<String,CustomAction> pumpCustomActions = new HashMap<>();
|
private Map<String, CustomAction> pumpCustomActions = new HashMap<>();
|
||||||
private List<SingleClickButton> pumpCustomButtons = new ArrayList<>();
|
private List<SingleClickButton> pumpCustomButtons = new ArrayList<>();
|
||||||
|
|
||||||
public ActionsFragment() {
|
public ActionsFragment() {
|
||||||
|
@ -222,7 +220,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
||||||
|
|
||||||
View.OnClickListener pumpCustomActionsListener = v -> {
|
View.OnClickListener pumpCustomActionsListener = v -> {
|
||||||
|
|
||||||
SingleClickButton btn = (SingleClickButton)v;
|
SingleClickButton btn = (SingleClickButton) v;
|
||||||
|
|
||||||
CustomAction customAction = this.pumpCustomActions.get(btn.getText().toString());
|
CustomAction customAction = this.pumpCustomActions.get(btn.getText().toString());
|
||||||
|
|
||||||
|
@ -243,7 +241,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
||||||
|
|
||||||
List<CustomAction> customActions = activePump.getCustomActions();
|
List<CustomAction> customActions = activePump.getCustomActions();
|
||||||
|
|
||||||
if (customActions != null && customActions.size()>0) {
|
if (customActions != null && customActions.size() > 0) {
|
||||||
|
|
||||||
LinearLayout ll = actionsFragmentView.findViewById(R.id.action_buttons_layout);
|
LinearLayout ll = actionsFragmentView.findViewById(R.id.action_buttons_layout);
|
||||||
|
|
||||||
|
@ -275,7 +273,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
||||||
|
|
||||||
private void removePumpCustomActions() {
|
private void removePumpCustomActions() {
|
||||||
|
|
||||||
if (pumpCustomActions.size()==0)
|
if (pumpCustomActions.size() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LinearLayout ll = actionsFragmentView.findViewById(R.id.action_buttons_layout);
|
LinearLayout ll = actionsFragmentView.findViewById(R.id.action_buttons_layout);
|
||||||
|
@ -314,13 +312,11 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
||||||
case R.id.actions_extendedbolus_cancel:
|
case R.id.actions_extendedbolus_cancel:
|
||||||
if (TreatmentsPlugin.getPlugin().isInHistoryExtendedBoluslInProgress()) {
|
if (TreatmentsPlugin.getPlugin().isInHistoryExtendedBoluslInProgress()) {
|
||||||
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelExtended(null);
|
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelExtended(null);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("CancelExtended"));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.actions_canceltempbasal:
|
case R.id.actions_canceltempbasal:
|
||||||
if (TreatmentsPlugin.getPlugin().isTempBasalInProgress()) {
|
if (TreatmentsPlugin.getPlugin().isTempBasalInProgress()) {
|
||||||
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelTempBasal(true, null);
|
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelTempBasal(true, null);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("CancelTemp"));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.actions_settempbasal:
|
case R.id.actions_settempbasal:
|
||||||
|
|
|
@ -19,7 +19,6 @@ import android.widget.CheckBox;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -35,11 +34,10 @@ import info.nightscout.androidaps.db.CareportalEvent;
|
||||||
import info.nightscout.androidaps.db.Source;
|
import info.nightscout.androidaps.db.Source;
|
||||||
import info.nightscout.androidaps.interfaces.Constraint;
|
import info.nightscout.androidaps.interfaces.Constraint;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
|
||||||
import info.nightscout.androidaps.queue.Callback;
|
import info.nightscout.androidaps.queue.Callback;
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
import info.nightscout.androidaps.utils.DecimalFormatter;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
|
||||||
import info.nightscout.androidaps.utils.NumberPicker;
|
import info.nightscout.androidaps.utils.NumberPicker;
|
||||||
import info.nightscout.androidaps.utils.SP;
|
import info.nightscout.androidaps.utils.SP;
|
||||||
import info.nightscout.androidaps.utils.SafeParse;
|
import info.nightscout.androidaps.utils.SafeParse;
|
||||||
|
@ -190,7 +188,7 @@ public class FillDialog extends DialogFragment implements OnClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pumpSiteChangeCheckbox.isChecked())
|
if (pumpSiteChangeCheckbox.isChecked())
|
||||||
confirmMessage.add("" + "<font color='" + MainApp.gc(R.color.actionsConfirm) + "'>" + MainApp.gs(R.string.record_pump_site_change) + "</font>");
|
confirmMessage.add("" + "<font color='" + MainApp.gc(R.color.actionsConfirm) + "'>" + MainApp.gs(R.string.record_pump_site_change) + "</font>");
|
||||||
|
|
||||||
if (insulinCartridgeChangeCheckbox.isChecked())
|
if (insulinCartridgeChangeCheckbox.isChecked())
|
||||||
confirmMessage.add("" + "<font color='" + MainApp.gc(R.color.actionsConfirm) + "'>" + MainApp.gs(R.string.record_insulin_cartridge_change) + "</font>");
|
confirmMessage.add("" + "<font color='" + MainApp.gc(R.color.actionsConfirm) + "'>" + MainApp.gs(R.string.record_insulin_cartridge_change) + "</font>");
|
||||||
|
@ -236,7 +234,6 @@ public class FillDialog extends DialogFragment implements OnClickListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("Fill"));
|
|
||||||
}
|
}
|
||||||
if (pumpSiteChangeCheckbox.isChecked())
|
if (pumpSiteChangeCheckbox.isChecked())
|
||||||
NSUpload.uploadEvent(CareportalEvent.SITECHANGE, now(), notes);
|
NSUpload.uploadEvent(CareportalEvent.SITECHANGE, now(), notes);
|
||||||
|
|
|
@ -10,8 +10,6 @@ import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -21,9 +19,8 @@ import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.interfaces.Constraint;
|
import info.nightscout.androidaps.interfaces.Constraint;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
|
||||||
import info.nightscout.androidaps.queue.Callback;
|
import info.nightscout.androidaps.queue.Callback;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.NumberPicker;
|
import info.nightscout.androidaps.utils.NumberPicker;
|
||||||
import info.nightscout.androidaps.utils.SafeParse;
|
import info.nightscout.androidaps.utils.SafeParse;
|
||||||
|
|
||||||
|
@ -99,7 +96,6 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("ExtendedBolus"));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
||||||
|
|
|
@ -12,8 +12,6 @@ import android.widget.LinearLayout;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.RadioGroup;
|
import android.widget.RadioGroup;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -26,9 +24,8 @@ import info.nightscout.androidaps.interfaces.Constraint;
|
||||||
import info.nightscout.androidaps.interfaces.PumpDescription;
|
import info.nightscout.androidaps.interfaces.PumpDescription;
|
||||||
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.general.overview.Dialogs.ErrorHelperActivity;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
|
||||||
import info.nightscout.androidaps.queue.Callback;
|
import info.nightscout.androidaps.queue.Callback;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.NumberPicker;
|
import info.nightscout.androidaps.utils.NumberPicker;
|
||||||
import info.nightscout.androidaps.utils.SafeParse;
|
import info.nightscout.androidaps.utils.SafeParse;
|
||||||
|
|
||||||
|
@ -167,7 +164,6 @@ public class NewTempBasalDialog extends DialogFragment implements View.OnClickLi
|
||||||
} else {
|
} else {
|
||||||
ConfigBuilderPlugin.getPlugin().getCommandQueue().tempBasalAbsolute(finalBasal, finalDurationInMinutes, true, profile, callback);
|
ConfigBuilderPlugin.getPlugin().getCommandQueue().tempBasalAbsolute(finalBasal, finalDurationInMinutes, true, profile, callback);
|
||||||
}
|
}
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("TempBasal"));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
||||||
|
|
|
@ -20,7 +20,6 @@ import android.widget.RadioButton;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog;
|
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog;
|
||||||
import com.wdullaer.materialdatetimepicker.time.RadialPickerLayout;
|
import com.wdullaer.materialdatetimepicker.time.RadialPickerLayout;
|
||||||
|
@ -48,14 +47,13 @@ import info.nightscout.androidaps.db.CareportalEvent;
|
||||||
import info.nightscout.androidaps.db.ProfileSwitch;
|
import info.nightscout.androidaps.db.ProfileSwitch;
|
||||||
import info.nightscout.androidaps.db.Source;
|
import info.nightscout.androidaps.db.Source;
|
||||||
import info.nightscout.androidaps.db.TempTarget;
|
import info.nightscout.androidaps.db.TempTarget;
|
||||||
import info.nightscout.androidaps.plugins.general.careportal.OptionsToShow;
|
|
||||||
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.general.careportal.OptionsToShow;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
import info.nightscout.androidaps.utils.DefaultValueHelper;
|
import info.nightscout.androidaps.utils.DefaultValueHelper;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.HardLimits;
|
import info.nightscout.androidaps.utils.HardLimits;
|
||||||
import info.nightscout.androidaps.utils.JsonHelper;
|
import info.nightscout.androidaps.utils.JsonHelper;
|
||||||
import info.nightscout.androidaps.utils.NumberPicker;
|
import info.nightscout.androidaps.utils.NumberPicker;
|
||||||
|
@ -742,7 +740,6 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
||||||
tempTarget.low(0).high(0);
|
tempTarget.low(0).high(0);
|
||||||
}
|
}
|
||||||
TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget);
|
TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("TempTarget"));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (JsonHelper.safeGetString(data, "eventType").equals(CareportalEvent.PROFILESWITCH)) {
|
if (JsonHelper.safeGetString(data, "eventType").equals(CareportalEvent.PROFILESWITCH)) {
|
||||||
|
@ -758,7 +755,6 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
||||||
} else {
|
} else {
|
||||||
NSUpload.uploadCareportalEntryToNS(data);
|
NSUpload.uploadCareportalEntryToNS(data);
|
||||||
}
|
}
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("NSTreatment"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -222,6 +222,7 @@ public class MaintenancePlugin extends PluginBase {
|
||||||
builder.append("NSCLIENT" + System.lineSeparator());
|
builder.append("NSCLIENT" + System.lineSeparator());
|
||||||
|
|
||||||
builder.append("Build: " + BuildConfig.BUILDVERSION + System.lineSeparator());
|
builder.append("Build: " + BuildConfig.BUILDVERSION + System.lineSeparator());
|
||||||
|
builder.append("Remote: " + BuildConfig.REMOTE + System.lineSeparator());
|
||||||
builder.append("Flavor: " + BuildConfig.FLAVOR + BuildConfig.BUILD_TYPE + System.lineSeparator());
|
builder.append("Flavor: " + BuildConfig.FLAVOR + BuildConfig.BUILD_TYPE + System.lineSeparator());
|
||||||
builder.append(MainApp.gs(R.string.configbuilder_nightscoutversion_label) + " " + NSSettingsStatus.getInstance().nightscoutVersionName + System.lineSeparator());
|
builder.append(MainApp.gs(R.string.configbuilder_nightscoutversion_label) + " " + NSSettingsStatus.getInstance().nightscoutVersionName + System.lineSeparator());
|
||||||
if (MainApp.engineeringMode)
|
if (MainApp.engineeringMode)
|
||||||
|
|
|
@ -17,7 +17,6 @@ import android.widget.CompoundButton;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
|
@ -91,11 +90,11 @@ public class NSClientFragment extends SubscriberFragment implements View.OnClick
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.nsclientinternal_restart:
|
case R.id.nsclientinternal_restart:
|
||||||
MainApp.bus().post(new EventNSClientRestart());
|
MainApp.bus().post(new EventNSClientRestart());
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientRestart"));
|
FabricPrivacy.getInstance().logCustom("NSClientRestart");
|
||||||
break;
|
break;
|
||||||
case R.id.nsclientinternal_delivernow:
|
case R.id.nsclientinternal_delivernow:
|
||||||
NSClientPlugin.getPlugin().resend("GUI");
|
NSClientPlugin.getPlugin().resend("GUI");
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientDeliverNow"));
|
FabricPrivacy.getInstance().logCustom("NSClientDeliverNow");
|
||||||
break;
|
break;
|
||||||
case R.id.nsclientinternal_clearlog:
|
case R.id.nsclientinternal_clearlog:
|
||||||
NSClientPlugin.getPlugin().clearLog();
|
NSClientPlugin.getPlugin().clearLog();
|
||||||
|
@ -110,7 +109,7 @@ public class NSClientFragment extends SubscriberFragment implements View.OnClick
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
UploadQueue.clearQueue();
|
UploadQueue.clearQueue();
|
||||||
updateGUI();
|
updateGUI();
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientClearQueue"));
|
FabricPrivacy.getInstance().logCustom("NSClientClearQueue");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
||||||
|
@ -118,7 +117,6 @@ public class NSClientFragment extends SubscriberFragment implements View.OnClick
|
||||||
break;
|
break;
|
||||||
case R.id.nsclientinternal_showqueue:
|
case R.id.nsclientinternal_showqueue:
|
||||||
MainApp.bus().post(new EventNSClientNewLog("QUEUE", NSClientPlugin.getPlugin().queue().textList()));
|
MainApp.bus().post(new EventNSClientNewLog("QUEUE", NSClientPlugin.getPlugin().queue().textList()));
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientShowQueue"));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,7 +127,7 @@ public class NSClientFragment extends SubscriberFragment implements View.OnClick
|
||||||
case R.id.nsclientinternal_paused:
|
case R.id.nsclientinternal_paused:
|
||||||
NSClientPlugin.getPlugin().pause(isChecked);
|
NSClientPlugin.getPlugin().pause(isChecked);
|
||||||
updateGUI();
|
updateGUI();
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientPause"));
|
FabricPrivacy.getInstance().logCustom("NSClientPause");
|
||||||
break;
|
break;
|
||||||
case R.id.nsclientinternal_autoscroll:
|
case R.id.nsclientinternal_autoscroll:
|
||||||
SP.putBoolean(R.string.key_nsclientinternal_autoscroll, isChecked);
|
SP.putBoolean(R.string.key_nsclientinternal_autoscroll, isChecked);
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class NSClientService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
|
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
|
||||||
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "NSClientService");
|
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "AndroidAPS:NSClientService");
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ public class NSClientService extends Service {
|
||||||
public void run() {
|
public void run() {
|
||||||
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
|
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
|
||||||
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
|
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
|
||||||
"onDataUpdate");
|
"AndroidAPS:NSClientService_onDataUpdate");
|
||||||
wakeLock.acquire();
|
wakeLock.acquire();
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ import android.widget.ImageButton;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.jjoe64.graphview.GraphView;
|
import com.jjoe64.graphview.GraphView;
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
|
@ -46,6 +45,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.ScheduledFuture;
|
import java.util.concurrent.ScheduledFuture;
|
||||||
|
@ -72,7 +72,7 @@ import info.nightscout.androidaps.events.EventCareportalEventChange;
|
||||||
import info.nightscout.androidaps.events.EventExtendedBolusChange;
|
import info.nightscout.androidaps.events.EventExtendedBolusChange;
|
||||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||||
import info.nightscout.androidaps.events.EventRefreshOverview;
|
import info.nightscout.androidaps.events.EventRefreshOverview;
|
||||||
import info.nightscout.androidaps.events.EventTempBasalChange;
|
import info.nightscout.androidaps.events.EventTempBasalChange;
|
||||||
|
@ -83,44 +83,43 @@ import info.nightscout.androidaps.interfaces.PluginType;
|
||||||
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.plugins.aps.loop.APSResult;
|
||||||
|
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
||||||
|
import info.nightscout.androidaps.plugins.aps.loop.events.EventNewOpenLoopNotification;
|
||||||
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||||
import info.nightscout.androidaps.plugins.general.careportal.CareportalFragment;
|
import info.nightscout.androidaps.plugins.general.careportal.CareportalFragment;
|
||||||
import info.nightscout.androidaps.plugins.general.careportal.Dialogs.NewNSTreatmentDialog;
|
import info.nightscout.androidaps.plugins.general.careportal.Dialogs.NewNSTreatmentDialog;
|
||||||
import info.nightscout.androidaps.plugins.general.careportal.OptionsToShow;
|
import info.nightscout.androidaps.plugins.general.careportal.OptionsToShow;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus;
|
||||||
|
import info.nightscout.androidaps.plugins.general.nsclient.data.NSSettingsStatus;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.CalibrationDialog;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.NewCarbsDialog;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.NewInsulinDialog;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.NewTreatmentDialog;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.WizardDialog;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationRecyclerViewAdapter;
|
||||||
|
import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationStore;
|
||||||
|
import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData;
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData;
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.CobInfo;
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.CobInfo;
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.APSResult;
|
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
|
||||||
import info.nightscout.androidaps.plugins.aps.loop.events.EventNewOpenLoopNotification;
|
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus;
|
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.data.NSSettingsStatus;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.CalibrationDialog;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.NewCarbsDialog;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.NewInsulinDialog;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.NewTreatmentDialog;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.WizardDialog;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationRecyclerViewAdapter;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationStore;
|
|
||||||
import info.nightscout.androidaps.plugins.source.SourceDexcomG5Plugin;
|
import info.nightscout.androidaps.plugins.source.SourceDexcomG5Plugin;
|
||||||
import info.nightscout.androidaps.plugins.source.SourceDexcomG6Plugin;
|
import info.nightscout.androidaps.plugins.source.SourceDexcomG6Plugin;
|
||||||
import info.nightscout.androidaps.plugins.source.SourceXdripPlugin;
|
import info.nightscout.androidaps.plugins.source.SourceXdripPlugin;
|
||||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||||
import info.nightscout.androidaps.plugins.treatments.fragments.ProfileViewerDialog;
|
import info.nightscout.androidaps.plugins.treatments.fragments.ProfileViewerDialog;
|
||||||
import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
|
|
||||||
import info.nightscout.androidaps.queue.Callback;
|
import info.nightscout.androidaps.queue.Callback;
|
||||||
import info.nightscout.androidaps.utils.BolusWizard;
|
import info.nightscout.androidaps.utils.BolusWizard;
|
||||||
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.DefaultValueHelper;
|
import info.nightscout.androidaps.utils.DefaultValueHelper;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.OKDialog;
|
import info.nightscout.androidaps.utils.OKDialog;
|
||||||
import info.nightscout.androidaps.utils.Profiler;
|
import info.nightscout.androidaps.utils.Profiler;
|
||||||
import info.nightscout.androidaps.utils.SP;
|
import info.nightscout.androidaps.utils.SP;
|
||||||
|
@ -268,15 +267,15 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
sage = (TextView) view.findViewById(R.id.careportal_sensorage);
|
sage = (TextView) view.findViewById(R.id.careportal_sensorage);
|
||||||
pbage = (TextView) view.findViewById(R.id.careportal_pbage);
|
pbage = (TextView) view.findViewById(R.id.careportal_pbage);
|
||||||
|
|
||||||
iageView = (TextView) view.findViewById(R.id.overview_insulinage);
|
iageView = (TextView) view.findViewById(R.id.overview_insulinage);
|
||||||
cageView = (TextView) view.findViewById(R.id.overview_canulaage);
|
cageView = (TextView) view.findViewById(R.id.overview_canulaage);
|
||||||
reservoirView = (TextView) view.findViewById(R.id.overview_reservoirlevel);
|
reservoirView = (TextView) view.findViewById(R.id.overview_reservoirlevel);
|
||||||
sageView = (TextView) view.findViewById(R.id.overview_sensorage);
|
sageView = (TextView) view.findViewById(R.id.overview_sensorage);
|
||||||
batteryView = (TextView) view.findViewById(R.id.overview_batterylevel);
|
batteryView = (TextView) view.findViewById(R.id.overview_batterylevel);
|
||||||
statuslightsLayout = (LinearLayout) view.findViewById(R.id.overview_statuslights);
|
statuslightsLayout = (LinearLayout) view.findViewById(R.id.overview_statuslights);
|
||||||
|
|
||||||
bgGraph = (GraphView) view.findViewById(R.id.overview_bggraph);
|
bgGraph = (GraphView) view.findViewById(R.id.overview_bggraph);
|
||||||
iobGraph = (GraphView) view.findViewById(R.id.overview_iobgraph);
|
iobGraph = (GraphView) view.findViewById(R.id.overview_iobgraph);
|
||||||
|
|
||||||
treatmentButton = (SingleClickButton) view.findViewById(R.id.overview_treatmentbutton);
|
treatmentButton = (SingleClickButton) view.findViewById(R.id.overview_treatmentbutton);
|
||||||
treatmentButton.setOnClickListener(this);
|
treatmentButton.setOnClickListener(this);
|
||||||
|
@ -475,7 +474,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
menu.add(MainApp.gs(R.string.suspendloopfor2h));
|
menu.add(MainApp.gs(R.string.suspendloopfor2h));
|
||||||
menu.add(MainApp.gs(R.string.suspendloopfor3h));
|
menu.add(MainApp.gs(R.string.suspendloopfor3h));
|
||||||
menu.add(MainApp.gs(R.string.suspendloopfor10h));
|
menu.add(MainApp.gs(R.string.suspendloopfor10h));
|
||||||
} else {
|
} else {
|
||||||
if (!loopPlugin.isDisconnected()) {
|
if (!loopPlugin.isDisconnected()) {
|
||||||
menu.add(MainApp.gs(R.string.resume));
|
menu.add(MainApp.gs(R.string.resume));
|
||||||
}
|
}
|
||||||
|
@ -488,7 +487,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
|
|
||||||
if (!loopPlugin.isDisconnected()) {
|
if (!loopPlugin.isDisconnected()) {
|
||||||
showSuspendtPump(menu, pumpDescription);
|
showSuspendtPump(menu, pumpDescription);
|
||||||
} else {
|
} else {
|
||||||
menu.add(MainApp.gs(R.string.reconnect));
|
menu.add(MainApp.gs(R.string.reconnect));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -892,7 +891,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
} else {
|
} else {
|
||||||
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
|
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
|
||||||
}
|
}
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("QuickWizard"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -984,8 +982,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onStatusEvent(final EventProfileSwitchChange ev) {
|
public void onStatusEvent(final EventProfileNeedsUpdate ev) {
|
||||||
scheduleUpdateGUI("EventProfileSwitchChange");
|
scheduleUpdateGUI("EventProfileNeedsUpdate");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
|
@ -1461,7 +1459,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
if (sensitivityView != null) {
|
if (sensitivityView != null) {
|
||||||
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensData("Overview");
|
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensData("Overview");
|
||||||
if (autosensData != null)
|
if (autosensData != null)
|
||||||
sensitivityView.setText(String.format("%.0f%%", autosensData.autosensResult.ratio * 100));
|
sensitivityView.setText(String.format(Locale.ENGLISH, "%.0f%%", autosensData.autosensResult.ratio * 100));
|
||||||
else
|
else
|
||||||
sensitivityView.setText("");
|
sensitivityView.setText("");
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ import com.squareup.otto.Subscribe;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.QuickWizard;
|
import info.nightscout.androidaps.data.QuickWizard;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.EditQuickWizardDialog;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.EditQuickWizardDialog;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin;
|
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -11,8 +11,6 @@ import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -23,7 +21,6 @@ import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.GlucoseStatus;
|
import info.nightscout.androidaps.data.GlucoseStatus;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.NumberPicker;
|
import info.nightscout.androidaps.utils.NumberPicker;
|
||||||
import info.nightscout.androidaps.utils.SafeParse;
|
import info.nightscout.androidaps.utils.SafeParse;
|
||||||
import info.nightscout.androidaps.utils.XdripCalibrations;
|
import info.nightscout.androidaps.utils.XdripCalibrations;
|
||||||
|
@ -88,7 +85,6 @@ public class CalibrationDialog extends DialogFragment implements View.OnClickLis
|
||||||
final Double bg = SafeParse.stringToDouble(bgNumber.getText());
|
final Double bg = SafeParse.stringToDouble(bgNumber.getText());
|
||||||
XdripCalibrations.confirmAndSendCalibration(bg, context);
|
XdripCalibrations.confirmAndSendCalibration(bg, context);
|
||||||
dismiss();
|
dismiss();
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("Calibration"));
|
|
||||||
break;
|
break;
|
||||||
case R.id.cancel:
|
case R.id.cancel:
|
||||||
dismiss();
|
dismiss();
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.HandlerThread;
|
import android.os.HandlerThread;
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -20,7 +20,6 @@ import android.widget.CheckBox;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -46,7 +45,6 @@ import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||||
import info.nightscout.androidaps.queue.Callback;
|
import info.nightscout.androidaps.queue.Callback;
|
||||||
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.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.NumberPicker;
|
import info.nightscout.androidaps.utils.NumberPicker;
|
||||||
import info.nightscout.androidaps.utils.SP;
|
import info.nightscout.androidaps.utils.SP;
|
||||||
import info.nightscout.androidaps.utils.SafeParse;
|
import info.nightscout.androidaps.utils.SafeParse;
|
||||||
|
@ -170,8 +168,8 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener
|
||||||
insulinDialogState.putBoolean("recordOnlyCheckbox", recordOnlyCheckbox.isChecked());
|
insulinDialogState.putBoolean("recordOnlyCheckbox", recordOnlyCheckbox.isChecked());
|
||||||
insulinDialogState.putDouble("editTime", editTime.getValue());
|
insulinDialogState.putDouble("editTime", editTime.getValue());
|
||||||
insulinDialogState.putDouble("editInsulin", editInsulin.getValue());
|
insulinDialogState.putDouble("editInsulin", editInsulin.getValue());
|
||||||
insulinDialogState.putString("notesEdit",notesEdit.getText().toString());
|
insulinDialogState.putString("notesEdit", notesEdit.getText().toString());
|
||||||
log.debug("Instance state saved:"+insulinDialogState.toString());
|
log.debug("Instance state saved:" + insulinDialogState.toString());
|
||||||
super.onSaveInstanceState(insulinDialogState);
|
super.onSaveInstanceState(insulinDialogState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +225,7 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.abs(insulinAfterConstraints - insulin) > pump.getPumpDescription().pumpType.determineCorrectBolusSize(insulinAfterConstraints))
|
if (Math.abs(insulinAfterConstraints - insulin) > pump.getPumpDescription().pumpType.determineCorrectBolusSize(insulinAfterConstraints))
|
||||||
actions.add("<font color='" + MainApp.gc(R.color.warning) + "'>" + MainApp.gs(R.string.bolusconstraintapplied) + "</font>");
|
actions.add("<font color='" + MainApp.gc(R.color.warning) + "'>" + MainApp.gs(R.string.bolusconstraintapplied) + "</font>");
|
||||||
|
|
||||||
int eatingSoonTTDuration = SP.getInt(R.string.key_eatingsoon_duration, Constants.defaultEatingSoonTTDuration);
|
int eatingSoonTTDuration = SP.getInt(R.string.key_eatingsoon_duration, Constants.defaultEatingSoonTTDuration);
|
||||||
|
@ -306,7 +304,6 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("Bolus"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
@ -17,8 +17,6 @@ import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -36,7 +34,6 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
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;
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
import info.nightscout.androidaps.utils.DecimalFormatter;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.NumberPicker;
|
import info.nightscout.androidaps.utils.NumberPicker;
|
||||||
import info.nightscout.androidaps.utils.SafeParse;
|
import info.nightscout.androidaps.utils.SafeParse;
|
||||||
import info.nightscout.androidaps.utils.ToastUtils;
|
import info.nightscout.androidaps.utils.ToastUtils;
|
||||||
|
@ -194,7 +191,6 @@ public class NewTreatmentDialog extends DialogFragment implements OnClickListene
|
||||||
} else {
|
} else {
|
||||||
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
|
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
|
||||||
}
|
}
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("Bolus"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package info.nightscout.androidaps.plugins.general.overview.Dialogs;
|
package info.nightscout.androidaps.plugins.general.overview.dialogs;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -26,7 +26,6 @@ import android.widget.LinearLayout;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
@ -66,7 +65,6 @@ import info.nightscout.androidaps.queue.Callback;
|
||||||
import info.nightscout.androidaps.utils.BolusWizard;
|
import info.nightscout.androidaps.utils.BolusWizard;
|
||||||
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.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.NumberPicker;
|
import info.nightscout.androidaps.utils.NumberPicker;
|
||||||
import info.nightscout.androidaps.utils.SP;
|
import info.nightscout.androidaps.utils.SP;
|
||||||
import info.nightscout.androidaps.utils.SafeParse;
|
import info.nightscout.androidaps.utils.SafeParse;
|
||||||
|
@ -398,7 +396,6 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
|
||||||
} else {
|
} else {
|
||||||
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
|
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
|
||||||
}
|
}
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("Wizard"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -118,7 +118,7 @@ public class SmsCommunicatorPlugin extends PluginBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isCommand(String command, String number) {
|
boolean isCommand(String command, String number) {
|
||||||
switch(command.toUpperCase()) {
|
switch (command.toUpperCase()) {
|
||||||
case "BG":
|
case "BG":
|
||||||
case "LOOP":
|
case "LOOP":
|
||||||
case "TREATMENTS":
|
case "TREATMENTS":
|
||||||
|
@ -729,7 +729,7 @@ public class SmsCommunicatorPlugin extends PluginBase {
|
||||||
String passCode = generatePasscode();
|
String passCode = generatePasscode();
|
||||||
String reply = String.format(MainApp.gs(R.string.smscommunicator_calibrationreplywithcode), cal, passCode);
|
String reply = String.format(MainApp.gs(R.string.smscommunicator_calibrationreplywithcode), cal, passCode);
|
||||||
receivedSms.processed = true;
|
receivedSms.processed = true;
|
||||||
messageToConfirm = new AuthRequest(this, receivedSms, reply, passCode, new SmsAction() {
|
messageToConfirm = new AuthRequest(this, receivedSms, reply, passCode, new SmsAction(cal) {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
boolean result = XdripCalibrations.sendIntent(aDouble);
|
boolean result = XdripCalibrations.sendIntent(aDouble);
|
||||||
|
@ -760,11 +760,18 @@ public class SmsCommunicatorPlugin extends PluginBase {
|
||||||
void sendSMS(Sms sms) {
|
void sendSMS(Sms sms) {
|
||||||
SmsManager smsManager = SmsManager.getDefault();
|
SmsManager smsManager = SmsManager.getDefault();
|
||||||
sms.text = stripAccents(sms.text);
|
sms.text = stripAccents(sms.text);
|
||||||
if (sms.text.length() > 140) sms.text = sms.text.substring(0, 139);
|
|
||||||
try {
|
try {
|
||||||
if (L.isEnabled(L.SMS))
|
if (L.isEnabled(L.SMS))
|
||||||
log.debug("Sending SMS to " + sms.phoneNumber + ": " + sms.text);
|
log.debug("Sending SMS to " + sms.phoneNumber + ": " + sms.text);
|
||||||
smsManager.sendTextMessage(sms.phoneNumber, null, sms.text, null, null);
|
if (sms.text.getBytes().length <= 140)
|
||||||
|
smsManager.sendTextMessage(sms.phoneNumber, null, sms.text, null, null);
|
||||||
|
else {
|
||||||
|
ArrayList<String> parts = smsManager.divideMessage(sms.text);
|
||||||
|
smsManager.sendMultipartTextMessage(sms.phoneNumber, null, parts,
|
||||||
|
null, null);
|
||||||
|
}
|
||||||
|
|
||||||
messages.add(sms);
|
messages.add(sms);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
Notification notification = new Notification(Notification.INVALID_PHONE_NUMBER, MainApp.gs(R.string.smscommunicator_invalidphonennumber), Notification.NORMAL);
|
Notification notification = new Notification(Notification.INVALID_PHONE_NUMBER, MainApp.gs(R.string.smscommunicator_invalidphonennumber), Notification.NORMAL);
|
||||||
|
|
|
@ -625,10 +625,12 @@ public class ActionStringHandler {
|
||||||
}
|
}
|
||||||
generateTempTarget(duration, low, high);
|
generateTempTarget(duration, low, high);
|
||||||
} else if ("wizard2".equals(act[0])) {
|
} else if ("wizard2".equals(act[0])) {
|
||||||
//use last calculation as confirmed string matches
|
if (lastBolusWizard != null) {
|
||||||
|
//use last calculation as confirmed string matches
|
||||||
|
|
||||||
doBolus(lastBolusWizard.calculatedTotalInsulin, lastBolusWizard.carbs);
|
doBolus(lastBolusWizard.calculatedTotalInsulin, lastBolusWizard.carbs);
|
||||||
lastBolusWizard = null;
|
lastBolusWizard = null;
|
||||||
|
}
|
||||||
} else if ("bolus".equals(act[0])) {
|
} else if ("bolus".equals(act[0])) {
|
||||||
double insulin = SafeParse.stringToDouble(act[1]);
|
double insulin = SafeParse.stringToDouble(act[1]);
|
||||||
int carbs = SafeParse.stringToInt(act[2]);
|
int carbs = SafeParse.stringToInt(act[2]);
|
||||||
|
|
|
@ -482,6 +482,8 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
||||||
|
|
||||||
for (; runningTime < now; runningTime += 5 * 60 * 1000) {
|
for (; runningTime < now; runningTime += 5 * 60 * 1000) {
|
||||||
Profile profileTB = ProfileFunctions.getInstance().getProfile(runningTime);
|
Profile profileTB = ProfileFunctions.getInstance().getProfile(runningTime);
|
||||||
|
if (profileTB == null)
|
||||||
|
return;
|
||||||
//basal rate
|
//basal rate
|
||||||
endBasalValue = profile.getBasal(runningTime);
|
endBasalValue = profile.getBasal(runningTime);
|
||||||
if (endBasalValue != beginBasalValue) {
|
if (endBasalValue != beginBasalValue) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import info.nightscout.androidaps.Constants;
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
|
@ -66,7 +67,7 @@ public class AutosensData implements DataPointWithLabelInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("CarbsInPast: time: %s carbs: %.02f min5minCI: %.02f remaining: %.2f", new Date(time).toLocaleString(), carbs, min5minCarbImpact, remaining);
|
return String.format(Locale.ENGLISH, "CarbsInPast: time: %s carbs: %.02f min5minCI: %.02f remaining: %.2f", new Date(time).toLocaleString(), carbs, min5minCarbImpact, remaining);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +102,7 @@ public class AutosensData implements DataPointWithLabelInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("AutosensData: %s pastSensitivity=%s delta=%.02f avgDelta=%.02f bgi=%.02f deviation=%.02f avgDeviation=%.02f absorbed=%.02f carbsFromBolus=%.02f cob=%.02f autosensRatio=%.02f slopeFromMaxDeviation=%.02f slopeFromMinDeviation=%.02f activeCarbsList=%s",
|
return String.format(Locale.ENGLISH, "AutosensData: %s pastSensitivity=%s delta=%.02f avgDelta=%.02f bgi=%.02f deviation=%.02f avgDeviation=%.02f absorbed=%.02f carbsFromBolus=%.02f cob=%.02f autosensRatio=%.02f slopeFromMaxDeviation=%.02f slopeFromMinDeviation=%.02f activeCarbsList=%s",
|
||||||
new Date(time).toLocaleString(), pastSensitivity, delta, avgDelta, bgi, deviation, avgDeviation, absorbed, carbsFromBolus, cob, autosensResult.ratio, slopeFromMaxDeviation, slopeFromMinDeviation, activeCarbsList.toString());
|
new Date(time).toLocaleString(), pastSensitivity, delta, avgDelta, bgi, deviation, avgDeviation, absorbed, carbsFromBolus, cob, autosensResult.ratio, slopeFromMaxDeviation, slopeFromMinDeviation, activeCarbsList.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -496,6 +496,10 @@ public class IobCobCalculatorPlugin extends PluginBase {
|
||||||
log.debug("AUTOSENSDATA null: Exception catched (" + reason + ")");
|
log.debug("AUTOSENSDATA null: Exception catched (" + reason + ")");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if (data == null) {
|
||||||
|
log.debug("AUTOSENSDATA null: data==null");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (data.time < System.currentTimeMillis() - 11 * 60 * 1000) {
|
if (data.time < System.currentTimeMillis() - 11 * 60 * 1000) {
|
||||||
if (L.isEnabled(L.AUTOSENS))
|
if (L.isEnabled(L.AUTOSENS))
|
||||||
log.debug("AUTOSENSDATA null: data is old (" + reason + ") size()=" + autosensDataTable.size() + " lastdata=" + DateUtil.dateAndTimeString(data.time));
|
log.debug("AUTOSENSDATA null: data is old (" + reason + ") size()=" + autosensDataTable.size() + " lastdata=" + DateUtil.dateAndTimeString(data.time));
|
||||||
|
@ -626,6 +630,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
|
||||||
log.debug("Invalidating cached data because of new profile. IOB: " + iobTable.size() + " Autosens: " + autosensDataTable.size() + " records");
|
log.debug("Invalidating cached data because of new profile. IOB: " + iobTable.size() + " Autosens: " + autosensDataTable.size() + " records");
|
||||||
iobTable = new LongSparseArray<>();
|
iobTable = new LongSparseArray<>();
|
||||||
autosensDataTable = new LongSparseArray<>();
|
autosensDataTable = new LongSparseArray<>();
|
||||||
|
basalDataTable = new LongSparseArray<>();
|
||||||
}
|
}
|
||||||
runCalculation("onNewProfile", System.currentTimeMillis(), false, true, ev);
|
runCalculation("onNewProfile", System.currentTimeMillis(), false, true, ev);
|
||||||
}
|
}
|
||||||
|
@ -648,9 +653,10 @@ public class IobCobCalculatorPlugin extends PluginBase {
|
||||||
stopCalculation("onEventPreferenceChange");
|
stopCalculation("onEventPreferenceChange");
|
||||||
synchronized (dataLock) {
|
synchronized (dataLock) {
|
||||||
if (L.isEnabled(L.AUTOSENS))
|
if (L.isEnabled(L.AUTOSENS))
|
||||||
log.debug("Invalidating cached data because of preference change. IOB: " + iobTable.size() + " Autosens: " + autosensDataTable.size() + " records");
|
log.debug("Invalidating cached data because of preference change. IOB: " + iobTable.size() + " Autosens: " + autosensDataTable.size() + " records" + " BasalData: " + basalDataTable.size() + " records");
|
||||||
iobTable = new LongSparseArray<>();
|
iobTable = new LongSparseArray<>();
|
||||||
autosensDataTable = new LongSparseArray<>();
|
autosensDataTable = new LongSparseArray<>();
|
||||||
|
basalDataTable = new LongSparseArray<>();
|
||||||
}
|
}
|
||||||
runCalculation("onEventPreferenceChange", System.currentTimeMillis(), false, true, ev);
|
runCalculation("onEventPreferenceChange", System.currentTimeMillis(), false, true, ev);
|
||||||
}
|
}
|
||||||
|
@ -726,6 +732,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
|
||||||
log.debug("Clearing cached data.");
|
log.debug("Clearing cached data.");
|
||||||
iobTable = new LongSparseArray<>();
|
iobTable = new LongSparseArray<>();
|
||||||
autosensDataTable = new LongSparseArray<>();
|
autosensDataTable = new LongSparseArray<>();
|
||||||
|
basalDataTable = new LongSparseArray<>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@ import android.os.PowerManager;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.support.v4.util.LongSparseArray;
|
import android.support.v4.util.LongSparseArray;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -16,7 +14,6 @@ import java.util.Date;
|
||||||
import java.util.GregorianCalendar;
|
import java.util.GregorianCalendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.BuildConfig;
|
|
||||||
import info.nightscout.androidaps.Constants;
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
@ -26,13 +23,13 @@ import info.nightscout.androidaps.db.BgReading;
|
||||||
import info.nightscout.androidaps.db.TempTarget;
|
import info.nightscout.androidaps.db.TempTarget;
|
||||||
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.plugins.aps.openAPSSMB.SMBDefaults;
|
||||||
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.events.EventAutosensCalculationFinished;
|
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
|
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
|
|
||||||
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;
|
||||||
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||||
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
|
||||||
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
||||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
|
@ -224,13 +221,6 @@ public class IobCobOref1Thread extends Thread {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Unhandled exception", e);
|
log.error("Unhandled exception", e);
|
||||||
FabricPrivacy.logException(e);
|
FabricPrivacy.logException(e);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("CatchedError")
|
|
||||||
.putCustomAttribute("buildversion", BuildConfig.BUILDVERSION)
|
|
||||||
.putCustomAttribute("version", BuildConfig.VERSION)
|
|
||||||
.putCustomAttribute("autosensDataTable", iobCobCalculatorPlugin.getAutosensDataTable().toString())
|
|
||||||
.putCustomAttribute("for_data", ">>>>> bucketed_data.size()=" + bucketed_data.size() + " i=" + i + "hourAgoData=" + hourAgoData.toString())
|
|
||||||
.putCustomAttribute("past", past)
|
|
||||||
);
|
|
||||||
log.debug(autosensDataTable.toString());
|
log.debug(autosensDataTable.toString());
|
||||||
log.debug(bucketed_data.toString());
|
log.debug(bucketed_data.toString());
|
||||||
log.debug(IobCobCalculatorPlugin.getPlugin().getBgReadings().toString());
|
log.debug(IobCobCalculatorPlugin.getPlugin().getBgReadings().toString());
|
||||||
|
@ -364,7 +354,8 @@ public class IobCobOref1Thread extends Thread {
|
||||||
//log.debug("TIME: " + new Date(bgTime).toString() + " BG: " + bg + " SENS: " + sens + " DELTA: " + delta + " AVGDELTA: " + avgDelta + " IOB: " + iob.iob + " ACTIVITY: " + iob.activity + " BGI: " + bgi + " DEVIATION: " + deviation);
|
//log.debug("TIME: " + new Date(bgTime).toString() + " BG: " + bg + " SENS: " + sens + " DELTA: " + delta + " AVGDELTA: " + avgDelta + " IOB: " + iob.iob + " ACTIVITY: " + iob.activity + " BGI: " + bgi + " DEVIATION: " + deviation);
|
||||||
|
|
||||||
// add an extra negative deviation if a high temptarget is running and exercise mode is set
|
// add an extra negative deviation if a high temptarget is running and exercise mode is set
|
||||||
if (SP.getBoolean(R.string.key_high_temptarget_raises_sensitivity, SMBDefaults.high_temptarget_raises_sensitivity)) {
|
// TODO AS-FIX
|
||||||
|
if (false && SP.getBoolean(R.string.key_high_temptarget_raises_sensitivity, SMBDefaults.high_temptarget_raises_sensitivity)) {
|
||||||
TempTarget tempTarget = TreatmentsPlugin.getPlugin().getTempTargetFromHistory(bgTime);
|
TempTarget tempTarget = TreatmentsPlugin.getPlugin().getTempTargetFromHistory(bgTime);
|
||||||
if (tempTarget != null && tempTarget.target() >= 100) {
|
if (tempTarget != null && tempTarget.target() >= 100) {
|
||||||
autosensData.extraDeviation.add(-(tempTarget.target() - 100) / 20);
|
autosensData.extraDeviation.add(-(tempTarget.target() - 100) / 20);
|
||||||
|
|
|
@ -5,8 +5,6 @@ import android.os.PowerManager;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.support.v4.util.LongSparseArray;
|
import android.support.v4.util.LongSparseArray;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -14,7 +12,6 @@ import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.BuildConfig;
|
|
||||||
import info.nightscout.androidaps.Constants;
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
@ -24,13 +21,13 @@ import info.nightscout.androidaps.db.BgReading;
|
||||||
import info.nightscout.androidaps.events.Event;
|
import info.nightscout.androidaps.events.Event;
|
||||||
import info.nightscout.androidaps.interfaces.PluginType;
|
import info.nightscout.androidaps.interfaces.PluginType;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
|
import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
|
||||||
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.events.EventAutosensCalculationFinished;
|
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
|
|
||||||
import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
|
|
||||||
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;
|
||||||
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||||
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
|
||||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin;
|
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin;
|
||||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin;
|
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin;
|
||||||
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
||||||
|
@ -223,13 +220,6 @@ public class IobCobThread extends Thread {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Unhandled exception", e);
|
log.error("Unhandled exception", e);
|
||||||
FabricPrivacy.logException(e);
|
FabricPrivacy.logException(e);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("CatchedError")
|
|
||||||
.putCustomAttribute("buildversion", BuildConfig.BUILDVERSION)
|
|
||||||
.putCustomAttribute("version", BuildConfig.VERSION)
|
|
||||||
.putCustomAttribute("autosensDataTable", iobCobCalculatorPlugin.getAutosensDataTable().toString())
|
|
||||||
.putCustomAttribute("for_data", ">>>>> bucketed_data.size()=" + bucketed_data.size() + " i=" + i + "hourAgoData=" + hourAgoData.toString())
|
|
||||||
.putCustomAttribute("past", past)
|
|
||||||
);
|
|
||||||
log.debug(autosensDataTable.toString());
|
log.debug(autosensDataTable.toString());
|
||||||
log.debug(bucketed_data.toString());
|
log.debug(bucketed_data.toString());
|
||||||
log.debug(IobCobCalculatorPlugin.getPlugin().getBgReadings().toString());
|
log.debug(IobCobCalculatorPlugin.getPlugin().getBgReadings().toString());
|
||||||
|
|
|
@ -18,6 +18,10 @@ public enum DoseStepSize
|
||||||
new DoseStepSizeEntry(5f, 10f, 0.2f), //
|
new DoseStepSizeEntry(5f, 10f, 0.2f), //
|
||||||
new DoseStepSizeEntry(10f, Double.MAX_VALUE, 0.5f)),
|
new DoseStepSizeEntry(10f, Double.MAX_VALUE, 0.5f)),
|
||||||
|
|
||||||
|
InsightBasal(
|
||||||
|
new DoseStepSizeEntry(0f, 5f, 0.01f),
|
||||||
|
new DoseStepSizeEntry(5f, Double.MAX_VALUE, 0.1f)),
|
||||||
|
|
||||||
MedtronicVeoBasal( //
|
MedtronicVeoBasal( //
|
||||||
new DoseStepSizeEntry(0f, 1f, 0.025f), //
|
new DoseStepSizeEntry(0f, 1f, 0.025f), //
|
||||||
new DoseStepSizeEntry(1f, 10f, 0.05f), //
|
new DoseStepSizeEntry(1f, 10f, 0.05f), //
|
||||||
|
|
|
@ -49,9 +49,15 @@ public enum PumpType {
|
||||||
AccuChekInsight("Accu-Chek Insight", 0.05d, DoseStepSize.InsightBolus, //
|
AccuChekInsight("Accu-Chek Insight", 0.05d, DoseStepSize.InsightBolus, //
|
||||||
new DoseSettings(0.05d, 15, 24*60, 0.05d), //
|
new DoseSettings(0.05d, 15, 24*60, 0.05d), //
|
||||||
PumpTempBasalType.Percent,
|
PumpTempBasalType.Percent,
|
||||||
new DoseSettings(10, 15, 12*60,0d, 250d), PumpCapability.BasalRate_Duration15and30minAllowed, //
|
new DoseSettings(10, 15, 24*60,0d, 250d), PumpCapability.BasalRate_Duration15and30minAllowed, //
|
||||||
0.02d, 0.01d, null, PumpCapability.InsightCapabilities), //
|
0.02d, 0.01d, null, PumpCapability.InsightCapabilities), //
|
||||||
|
|
||||||
|
AccuChekInsightBluetooth("Accu-Chek Insight", 0.01d, null, //
|
||||||
|
new DoseSettings(0.01d, 15, 24*60, 0.05d), //
|
||||||
|
PumpTempBasalType.Percent,
|
||||||
|
new DoseSettings(10, 15, 24*60,0d, 250d), PumpCapability.BasalRate_Duration15and30minAllowed, //
|
||||||
|
0.02d, 0.01d, DoseStepSize.InsightBolus, PumpCapability.InsightCapabilities), //
|
||||||
|
|
||||||
// Animas
|
// Animas
|
||||||
AnimasVibe("Animas Vibe", 0.05d, null, // AnimasBolus?
|
AnimasVibe("Animas Vibe", 0.05d, null, // AnimasBolus?
|
||||||
new DoseSettings(0.05d, 30, 12*60, 0.05d), //
|
new DoseSettings(0.05d, 30, 12*60, 0.05d), //
|
||||||
|
|
|
@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
|
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||||
|
@ -31,7 +33,7 @@ public class MsgSettingBasal extends MessageBase {
|
||||||
|
|
||||||
if (L.isEnabled(L.PUMPCOMM))
|
if (L.isEnabled(L.PUMPCOMM))
|
||||||
for (int index = 0; index < 24; index++) {
|
for (int index = 0; index < 24; index++) {
|
||||||
log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||||
|
|
||||||
|
@ -55,7 +57,7 @@ public class MsgSettingBasalProfileAll extends MessageBase {
|
||||||
for (int profile = 0; profile < 4; profile++) {
|
for (int profile = 0; profile < 4; profile++) {
|
||||||
for (int index = 0; index < 48; index++) {
|
for (int index = 0; index < 48; index++) {
|
||||||
try {
|
try {
|
||||||
log.debug("Basal profile " + profile + ": " + String.format("%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
|
log.debug("Basal profile " + profile + ": " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
log.error("Unhandled exception" , e);
|
log.error("Unhandled exception" , e);
|
||||||
}
|
}
|
||||||
|
@ -67,8 +69,8 @@ public class MsgSettingBasalProfileAll extends MessageBase {
|
||||||
//this is absurd pump.pumpProfiles[profile][index] returns nullPointerException
|
//this is absurd pump.pumpProfiles[profile][index] returns nullPointerException
|
||||||
try {
|
try {
|
||||||
log.debug("Basal profile " + profile + ": " +
|
log.debug("Basal profile " + profile + ": " +
|
||||||
String.format("%02d", (index / 2)) +
|
String.format(Locale.ENGLISH, "%02d", (index / 2)) +
|
||||||
":" + String.format("%02d", (index % 2) * 30) + " : " +
|
":" + String.format(Locale.ENGLISH, "%02d", (index % 2) * 30) + " : " +
|
||||||
pump.pumpProfiles[profile][index]);
|
pump.pumpProfiles[profile][index]);
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
log.error("Unhandled exception" , e);
|
log.error("Unhandled exception" , e);
|
||||||
|
|
|
@ -18,14 +18,14 @@ import info.nightscout.androidaps.data.PumpEnactResult;
|
||||||
import info.nightscout.androidaps.events.EventAppExit;
|
import info.nightscout.androidaps.events.EventAppExit;
|
||||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||||
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.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.general.nsclient.NSUpload;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
|
||||||
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.events.EventOverviewBolusProgress;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
||||||
|
@ -166,7 +166,7 @@ public class DanaRExecutionService extends AbstractDanaRExecutionService {
|
||||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
|
||||||
mSerialIOThread.sendMessage(new MsgSettingBasal());
|
mSerialIOThread.sendMessage(new MsgSettingBasal());
|
||||||
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
||||||
MainApp.bus().post(new EventProfileSwitchChange());
|
MainApp.bus().post(new EventProfileNeedsUpdate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
|
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
|
||||||
|
@ -55,15 +57,15 @@ public class MsgSettingBasalProfileAll_k extends MessageBase {
|
||||||
if (pump.basal48Enable) {
|
if (pump.basal48Enable) {
|
||||||
for (int profile = 0; profile < 4; profile++) {
|
for (int profile = 0; profile < 4; profile++) {
|
||||||
for (int index = 0; index < 24; index++) {
|
for (int index = 0; index < 24; index++) {
|
||||||
log.debug("Basal profile " + profile + ": " + String.format("%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
|
log.debug("Basal profile " + profile + ": " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (int profile = 0; profile < 4; profile++) {
|
for (int profile = 0; profile < 4; profile++) {
|
||||||
for (int index = 0; index < 48; index++) {
|
for (int index = 0; index < 48; index++) {
|
||||||
log.debug("Basal profile " + profile + ": " +
|
log.debug("Basal profile " + profile + ": " +
|
||||||
String.format("%02d", (index / 2)) +
|
String.format(Locale.ENGLISH, "%02d", (index / 2)) +
|
||||||
":" + String.format("%02d", (index % 2) * 30) + " : " +
|
":" + String.format(Locale.ENGLISH, "%02d", (index % 2) * 30) + " : " +
|
||||||
pump.pumpProfiles[profile][index]);
|
pump.pumpProfiles[profile][index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
|
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
|
||||||
|
@ -32,7 +34,7 @@ public class MsgSettingBasal_k extends MessageBase {
|
||||||
|
|
||||||
if (L.isEnabled(L.PUMPCOMM))
|
if (L.isEnabled(L.PUMPCOMM))
|
||||||
for (int index = 0; index < 24; index++) {
|
for (int index = 0; index < 24; index++) {
|
||||||
log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,14 +18,14 @@ import info.nightscout.androidaps.data.PumpEnactResult;
|
||||||
import info.nightscout.androidaps.events.EventAppExit;
|
import info.nightscout.androidaps.events.EventAppExit;
|
||||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||||
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.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.general.nsclient.NSUpload;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
|
||||||
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;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||||
|
@ -171,7 +171,7 @@ public class DanaRKoreanExecutionService extends AbstractDanaRExecutionService {
|
||||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
|
||||||
mSerialIOThread.sendMessage(new MsgSettingBasal());
|
mSerialIOThread.sendMessage(new MsgSettingBasal());
|
||||||
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
||||||
MainApp.bus().post(new EventProfileSwitchChange());
|
MainApp.bus().post(new EventProfileNeedsUpdate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@ import com.cozmo.danar.util.BleCommandUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -49,7 +51,7 @@ public class DanaRS_Packet_Basal_Get_Basal_Rate extends DanaRS_Packet {
|
||||||
log.debug("Max basal: " + pump.maxBasal + " U");
|
log.debug("Max basal: " + pump.maxBasal + " U");
|
||||||
log.debug("Basal step: " + pump.basalStep + " U");
|
log.debug("Basal step: " + pump.basalStep + " U");
|
||||||
for (int index = 0; index < 24; index++)
|
for (int index = 0; index < 24; index++)
|
||||||
log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pump.basalStep != 0.01d) {
|
if (pump.basalStep != 0.01d) {
|
||||||
|
|
|
@ -5,6 +5,8 @@ import com.cozmo.danar.util.BleCommandUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||||
|
|
||||||
|
@ -51,7 +53,7 @@ public class DanaRS_Packet_Basal_Get_Profile_Basal_Rate extends DanaRS_Packet {
|
||||||
}
|
}
|
||||||
if (L.isEnabled(L.PUMPCOMM)) {
|
if (L.isEnabled(L.PUMPCOMM)) {
|
||||||
for (int index = 0; index < 24; index++)
|
for (int index = 0; index < 24; index++)
|
||||||
log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[profileNumber][index]);
|
log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[profileNumber][index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,14 @@ import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||||
import info.nightscout.androidaps.events.EventAppExit;
|
import info.nightscout.androidaps.events.EventAppExit;
|
||||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||||
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.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.general.overview.Dialogs.BolusProgressDialog;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
|
||||||
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.events.EventOverviewBolusProgress;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
||||||
|
@ -149,7 +149,7 @@ public class DanaRSService extends Service {
|
||||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
|
||||||
bleComm.sendMessage(new DanaRS_Packet_Basal_Get_Basal_Rate()); // basal profile, basalStep, maxBasal
|
bleComm.sendMessage(new DanaRS_Packet_Basal_Get_Basal_Rate()); // basal profile, basalStep, maxBasal
|
||||||
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
||||||
MainApp.bus().post(new EventProfileSwitchChange());
|
MainApp.bus().post(new EventProfileNeedsUpdate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,15 @@ import info.nightscout.androidaps.data.PumpEnactResult;
|
||||||
import info.nightscout.androidaps.events.EventAppExit;
|
import info.nightscout.androidaps.events.EventAppExit;
|
||||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||||
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.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.general.nsclient.NSUpload;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
|
||||||
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.events.EventOverviewBolusProgress;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
||||||
|
@ -188,7 +188,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
|
||||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
|
||||||
mSerialIOThread.sendMessage(new MsgSettingBasal());
|
mSerialIOThread.sendMessage(new MsgSettingBasal());
|
||||||
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
||||||
MainApp.bus().post(new EventProfileSwitchChange());
|
MainApp.bus().post(new EventProfileNeedsUpdate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
.preferencesId(R.xml.pref_insight_local));
|
.preferencesId(R.xml.pref_insight_local));
|
||||||
|
|
||||||
pumpDescription = new PumpDescription();
|
pumpDescription = new PumpDescription();
|
||||||
pumpDescription.setPumpDescription(PumpType.AccuChekInsight);
|
pumpDescription.setPumpDescription(PumpType.AccuChekInsightBluetooth);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TBROverNotificationBlock getTBROverNotificationBlock() {
|
public TBROverNotificationBlock getTBROverNotificationBlock() {
|
||||||
|
@ -315,7 +315,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
calendar.set(Calendar.HOUR_OF_DAY, pumpTime.getHour());
|
calendar.set(Calendar.HOUR_OF_DAY, pumpTime.getHour());
|
||||||
calendar.set(Calendar.MINUTE, pumpTime.getMinute());
|
calendar.set(Calendar.MINUTE, pumpTime.getMinute());
|
||||||
calendar.set(Calendar.SECOND, pumpTime.getSecond());
|
calendar.set(Calendar.SECOND, pumpTime.getSecond());
|
||||||
if (Math.abs(calendar.getTimeInMillis() - System.currentTimeMillis()) > 10000) {
|
if (calendar.get(Calendar.HOUR_OF_DAY) != pumpTime.getHour() || Math.abs(calendar.getTimeInMillis() - System.currentTimeMillis()) > 10000) {
|
||||||
calendar.setTime(new Date());
|
calendar.setTime(new Date());
|
||||||
pumpTime.setYear(calendar.get(Calendar.YEAR));
|
pumpTime.setYear(calendar.get(Calendar.YEAR));
|
||||||
pumpTime.setMonth(calendar.get(Calendar.MONTH) + 1);
|
pumpTime.setMonth(calendar.get(Calendar.MONTH) + 1);
|
||||||
|
@ -421,7 +421,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
if (profile.getBasalValues().length > i + 1)
|
if (profile.getBasalValues().length > i + 1)
|
||||||
nextValue = profile.getBasalValues()[i + 1];
|
nextValue = profile.getBasalValues()[i + 1];
|
||||||
BasalProfileBlock profileBlock = new BasalProfileBlock();
|
BasalProfileBlock profileBlock = new BasalProfileBlock();
|
||||||
profileBlock.setBasalAmount(basalValue.value);
|
profileBlock.setBasalAmount(basalValue.value > 5 ? Math.round(basalValue.value / 0.1) * 0.1 : Math.round(basalValue.value / 0.01) * 0.01);
|
||||||
profileBlock.setDuration((((nextValue != null ? nextValue.timeAsSeconds : 24 * 60 * 60) - basalValue.timeAsSeconds) / 60));
|
profileBlock.setDuration((((nextValue != null ? nextValue.timeAsSeconds : 24 * 60 * 60) - basalValue.timeAsSeconds) / 60));
|
||||||
profileBlocks.add(profileBlock);
|
profileBlocks.add(profileBlock);
|
||||||
}
|
}
|
||||||
|
@ -476,7 +476,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
nextValue = profile.getBasalValues()[i + 1];
|
nextValue = profile.getBasalValues()[i + 1];
|
||||||
if (profileBlock.getDuration() * 60 != (nextValue != null ? nextValue.timeAsSeconds : 24 * 60 * 60) - basalValue.timeAsSeconds)
|
if (profileBlock.getDuration() * 60 != (nextValue != null ? nextValue.timeAsSeconds : 24 * 60 * 60) - basalValue.timeAsSeconds)
|
||||||
return false;
|
return false;
|
||||||
if (Math.abs(profileBlock.getBasalAmount() - basalValue.value) > 0.01D)
|
if (Math.abs(profileBlock.getBasalAmount() - basalValue.value) > (basalValue.value > 5 ? 0.05 : 0.005))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -510,14 +510,15 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
@Override
|
@Override
|
||||||
public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) {
|
public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) {
|
||||||
PumpEnactResult result = new PumpEnactResult();
|
PumpEnactResult result = new PumpEnactResult();
|
||||||
if (detailedBolusInfo.insulin > 0) {
|
double insulin = Math.round(detailedBolusInfo.insulin / 0.01) * 0.01;
|
||||||
|
if (insulin > 0) {
|
||||||
try {
|
try {
|
||||||
synchronized ($bolusLock) {
|
synchronized ($bolusLock) {
|
||||||
DeliverBolusMessage bolusMessage = new DeliverBolusMessage();
|
DeliverBolusMessage bolusMessage = new DeliverBolusMessage();
|
||||||
bolusMessage.setBolusType(BolusType.STANDARD);
|
bolusMessage.setBolusType(BolusType.STANDARD);
|
||||||
bolusMessage.setDuration(0);
|
bolusMessage.setDuration(0);
|
||||||
bolusMessage.setExtendedAmount(0);
|
bolusMessage.setExtendedAmount(0);
|
||||||
bolusMessage.setImmediateAmount(detailedBolusInfo.insulin);
|
bolusMessage.setImmediateAmount(insulin);
|
||||||
bolusID = connectionService.requestMessage(bolusMessage).await().getBolusId();
|
bolusID = connectionService.requestMessage(bolusMessage).await().getBolusId();
|
||||||
bolusCancelled = false;
|
bolusCancelled = false;
|
||||||
}
|
}
|
||||||
|
@ -527,7 +528,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
t.isSMB = detailedBolusInfo.isSMB;
|
t.isSMB = detailedBolusInfo.isSMB;
|
||||||
final EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.getInstance();
|
final EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.getInstance();
|
||||||
bolusingEvent.t = t;
|
bolusingEvent.t = t;
|
||||||
bolusingEvent.status = MainApp.gs(R.string.insight_delivered, 0d, detailedBolusInfo.insulin);
|
bolusingEvent.status = MainApp.gs(R.string.insight_delivered, 0d, insulin);
|
||||||
bolusingEvent.percent = 0;
|
bolusingEvent.percent = 0;
|
||||||
MainApp.bus().post(bolusingEvent);
|
MainApp.bus().post(bolusingEvent);
|
||||||
int trials = 0;
|
int trials = 0;
|
||||||
|
@ -565,7 +566,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
synchronized ($bolusLock) {
|
synchronized ($bolusLock) {
|
||||||
if (bolusCancelled || trials == -1 || trials++ >= 5) {
|
if (bolusCancelled || trials == -1 || trials++ >= 5) {
|
||||||
if (!bolusCancelled) {
|
if (!bolusCancelled) {
|
||||||
bolusingEvent.status = MainApp.gs(R.string.insight_delivered, detailedBolusInfo.insulin, detailedBolusInfo.insulin);
|
bolusingEvent.status = MainApp.gs(R.string.insight_delivered, insulin, insulin);
|
||||||
bolusingEvent.percent = 100;
|
bolusingEvent.percent = 100;
|
||||||
MainApp.bus().post(bolusingEvent);
|
MainApp.bus().post(bolusingEvent);
|
||||||
}
|
}
|
||||||
|
@ -592,6 +593,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
result.enacted = true;
|
result.enacted = true;
|
||||||
}
|
}
|
||||||
result.carbsDelivered = detailedBolusInfo.carbs;
|
result.carbsDelivered = detailedBolusInfo.carbs;
|
||||||
|
result.bolusDelivered = insulin;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1187,6 +1189,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processCannulaFilledEvent(CannulaFilledEvent event) {
|
private void processCannulaFilledEvent(CannulaFilledEvent event) {
|
||||||
|
if (!SP.getBoolean("insight_log_site_changes", false)) return;
|
||||||
long timestamp = parseDate(event.getEventYear(), event.getEventMonth(), event.getEventDay(),
|
long timestamp = parseDate(event.getEventYear(), event.getEventMonth(), event.getEventDay(),
|
||||||
event.getEventHour(), event.getEventMinute(), event.getEventSecond()) + timeOffset;
|
event.getEventHour(), event.getEventMinute(), event.getEventSecond()) + timeOffset;
|
||||||
uploadCareportalEvent(timestamp, CareportalEvent.SITECHANGE);
|
uploadCareportalEvent(timestamp, CareportalEvent.SITECHANGE);
|
||||||
|
@ -1214,7 +1217,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processSniffingDoneEvent(SniffingDoneEvent event) {
|
private void processSniffingDoneEvent(SniffingDoneEvent event) {
|
||||||
if (!SP.getBoolean("insight_log_site_changes", false)) return;
|
if (!SP.getBoolean("insight_log_reservoir_changes", false)) return;
|
||||||
long timestamp = parseDate(event.getEventYear(), event.getEventMonth(), event.getEventDay(),
|
long timestamp = parseDate(event.getEventYear(), event.getEventMonth(), event.getEventDay(),
|
||||||
event.getEventHour(), event.getEventMinute(), event.getEventSecond()) + timeOffset;
|
event.getEventHour(), event.getEventMinute(), event.getEventSecond()) + timeOffset;
|
||||||
uploadCareportalEvent(timestamp, CareportalEvent.INSULINCHANGE);
|
uploadCareportalEvent(timestamp, CareportalEvent.INSULINCHANGE);
|
||||||
|
@ -1537,6 +1540,11 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
return insulin;
|
return insulin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Constraint<Double> applyExtendedBolusConstraints(Constraint<Double> insulin) {
|
||||||
|
return applyBolusConstraints(insulin);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStateChanged(InsightState state) {
|
public void onStateChanged(InsightState state) {
|
||||||
if (state == InsightState.CONNECTED) {
|
if (state == InsightState.CONNECTED) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import info.nightscout.androidaps.data.DetailedBolusInfo;
|
||||||
import info.nightscout.androidaps.db.CareportalEvent;
|
import info.nightscout.androidaps.db.CareportalEvent;
|
||||||
import info.nightscout.androidaps.db.Source;
|
import info.nightscout.androidaps.db.Source;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
|
||||||
import info.nightscout.androidaps.queue.Callback;
|
import info.nightscout.androidaps.queue.Callback;
|
||||||
import info.nightscout.androidaps.utils.T;
|
import info.nightscout.androidaps.utils.T;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package info.nightscout.androidaps.plugins.treatments;
|
package info.nightscout.androidaps.plugins.treatments;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -37,20 +38,21 @@ import info.nightscout.androidaps.interfaces.InsulinInterface;
|
||||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||||
import info.nightscout.androidaps.interfaces.PluginDescription;
|
import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||||
import info.nightscout.androidaps.interfaces.PluginType;
|
import info.nightscout.androidaps.interfaces.PluginType;
|
||||||
|
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
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.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.AutosensData;
|
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
|
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
||||||
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData;
|
||||||
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin;
|
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin;
|
||||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin;
|
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
|
||||||
import info.nightscout.androidaps.utils.SP;
|
import info.nightscout.androidaps.utils.SP;
|
||||||
import info.nightscout.androidaps.utils.T;
|
import info.nightscout.androidaps.utils.T;
|
||||||
|
|
||||||
|
@ -184,7 +186,11 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
|
|
||||||
InsulinInterface insulinInterface = ConfigBuilderPlugin.getPlugin().getActiveInsulin();
|
InsulinInterface insulinInterface = ConfigBuilderPlugin.getPlugin().getActiveInsulin();
|
||||||
if (insulinInterface == null)
|
if (insulinInterface == null)
|
||||||
return total;
|
return total;
|
||||||
|
|
||||||
|
PumpInterface pumpInterface = ConfigBuilderPlugin.getPlugin().getActivePump();
|
||||||
|
if (pumpInterface == null)
|
||||||
|
return total;
|
||||||
|
|
||||||
double dia = profile.getDia();
|
double dia = profile.getDia();
|
||||||
|
|
||||||
|
@ -209,7 +215,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ConfigBuilderPlugin.getPlugin().getActivePump().isFakingTempsByExtendedBoluses())
|
if (!pumpInterface.isFakingTempsByExtendedBoluses())
|
||||||
synchronized (extendedBoluses) {
|
synchronized (extendedBoluses) {
|
||||||
for (Integer pos = 0; pos < extendedBoluses.size(); pos++) {
|
for (Integer pos = 0; pos < extendedBoluses.size(); pos++) {
|
||||||
ExtendedBolus e = extendedBoluses.get(pos);
|
ExtendedBolus e = extendedBoluses.get(pos);
|
||||||
|
@ -259,7 +265,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
if (t > absorptionTime_ago && t <= now) {
|
if (t > absorptionTime_ago && t <= now) {
|
||||||
if (treatment.carbs >= 1) {
|
if (treatment.carbs >= 1) {
|
||||||
result.carbs += treatment.carbs;
|
result.carbs += treatment.carbs;
|
||||||
if(t > result.lastCarbTime)
|
if (t > result.lastCarbTime)
|
||||||
result.lastCarbTime = t;
|
result.lastCarbTime = t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -312,7 +318,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (L.isEnabled(L.DATATREATMENTS))
|
if (L.isEnabled(L.DATATREATMENTS))
|
||||||
log.debug("Last bolus time: " + new Date(last).toLocaleString());
|
log.debug("Last bolus time: " + new Date(last).toLocaleString());
|
||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,7 +347,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onStatusEvent(final EventReloadTreatmentData ev) {
|
public void onStatusEvent(final EventReloadTreatmentData ev) {
|
||||||
if (L.isEnabled(L.DATATREATMENTS))
|
if (L.isEnabled(L.DATATREATMENTS))
|
||||||
log.debug("EventReloadTreatmentData");
|
log.debug("EventReloadTreatmentData");
|
||||||
initializeTreatmentData();
|
initializeTreatmentData();
|
||||||
initializeExtendedBolusData();
|
initializeExtendedBolusData();
|
||||||
updateTotalIOBTreatments();
|
updateTotalIOBTreatments();
|
||||||
|
@ -352,7 +358,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public void onStatusEvent(final EventReloadTempBasalData ev) {
|
public void onStatusEvent(final EventReloadTempBasalData ev) {
|
||||||
if (L.isEnabled(L.DATATREATMENTS))
|
if (L.isEnabled(L.DATATREATMENTS))
|
||||||
log.debug("EventReloadTempBasalData");
|
log.debug("EventReloadTempBasalData");
|
||||||
initializeTempBasalData();
|
initializeTempBasalData();
|
||||||
updateTotalIOBTempBasals();
|
updateTotalIOBTempBasals();
|
||||||
}
|
}
|
||||||
|
@ -372,14 +378,14 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
|
|
||||||
InsulinInterface insulinInterface = ConfigBuilderPlugin.getPlugin().getActiveInsulin();
|
InsulinInterface insulinInterface = ConfigBuilderPlugin.getPlugin().getActiveInsulin();
|
||||||
if (insulinInterface == null)
|
if (insulinInterface == null)
|
||||||
return total;
|
return total;
|
||||||
|
|
||||||
synchronized (tempBasals) {
|
synchronized (tempBasals) {
|
||||||
for (Integer pos = 0; pos < tempBasals.size(); pos++) {
|
for (Integer pos = 0; pos < tempBasals.size(); pos++) {
|
||||||
TemporaryBasal t = tempBasals.get(pos);
|
TemporaryBasal t = tempBasals.get(pos);
|
||||||
if (t.date > time) continue;
|
if (t.date > time) continue;
|
||||||
IobTotal calc;
|
IobTotal calc;
|
||||||
if(truncate && t.end() > truncateTime){
|
if (truncate && t.end() > truncateTime) {
|
||||||
TemporaryBasal dummyTemp = new TemporaryBasal();
|
TemporaryBasal dummyTemp = new TemporaryBasal();
|
||||||
dummyTemp.copyFrom(t);
|
dummyTemp.copyFrom(t);
|
||||||
dummyTemp.cutEndTo(truncateTime);
|
dummyTemp.cutEndTo(truncateTime);
|
||||||
|
@ -398,7 +404,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
ExtendedBolus e = extendedBoluses.get(pos);
|
ExtendedBolus e = extendedBoluses.get(pos);
|
||||||
if (e.date > time) continue;
|
if (e.date > time) continue;
|
||||||
IobTotal calc;
|
IobTotal calc;
|
||||||
if(truncate && e.end() > truncateTime){
|
if (truncate && e.end() > truncateTime) {
|
||||||
ExtendedBolus dummyExt = new ExtendedBolus();
|
ExtendedBolus dummyExt = new ExtendedBolus();
|
||||||
dummyExt.copyFrom(e);
|
dummyExt.copyFrom(e);
|
||||||
dummyExt.cutEndTo(truncateTime);
|
dummyExt.cutEndTo(truncateTime);
|
||||||
|
@ -535,9 +541,10 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
|
||||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
MainApp.instance().startActivity(i);
|
MainApp.instance().startActivity(i);
|
||||||
|
|
||||||
CustomEvent customEvent = new CustomEvent("TreatmentClash");
|
Bundle bundle = new Bundle();
|
||||||
customEvent.putCustomAttribute("status", status);
|
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "TreatmentClash");
|
||||||
FabricPrivacy.getInstance().logCustom(customEvent);
|
bundle.putString(FirebaseAnalytics.Param.VALUE, status);
|
||||||
|
FabricPrivacy.getInstance().logCustom(bundle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return newRecordCreated;
|
return newRecordCreated;
|
||||||
|
|
|
@ -18,7 +18,6 @@ import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -40,7 +39,6 @@ import info.nightscout.androidaps.plugins.treatments.dialogs.WizardInfoDialog;
|
||||||
import info.nightscout.androidaps.services.Intents;
|
import info.nightscout.androidaps.services.Intents;
|
||||||
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.FabricPrivacy;
|
|
||||||
import info.nightscout.androidaps.utils.SP;
|
import info.nightscout.androidaps.utils.SP;
|
||||||
|
|
||||||
import static info.nightscout.androidaps.utils.DateUtil.now;
|
import static info.nightscout.androidaps.utils.DateUtil.now;
|
||||||
|
@ -165,7 +163,6 @@ public class TreatmentsBolusFragment extends SubscriberFragment implements View.
|
||||||
TreatmentsPlugin.getPlugin().getService().delete(treatment);
|
TreatmentsPlugin.getPlugin().getService().delete(treatment);
|
||||||
}
|
}
|
||||||
updateGUI();
|
updateGUI();
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("RemoveTreatment"));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
||||||
|
|
|
@ -15,7 +15,6 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
|
@ -32,7 +31,6 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutos
|
||||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||||
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.FabricPrivacy;
|
|
||||||
|
|
||||||
|
|
||||||
public class TreatmentsExtendedBolusesFragment extends SubscriberFragment {
|
public class TreatmentsExtendedBolusesFragment extends SubscriberFragment {
|
||||||
|
@ -150,7 +148,6 @@ public class TreatmentsExtendedBolusesFragment extends SubscriberFragment {
|
||||||
UploadQueue.removeID("dbAdd", _id);
|
UploadQueue.removeID("dbAdd", _id);
|
||||||
}
|
}
|
||||||
MainApp.getDbHelper().delete(extendedBolus);
|
MainApp.getDbHelper().delete(extendedBolus);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("RemoveExtendedBolus"));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
||||||
|
|
|
@ -27,13 +27,13 @@ import java.util.List;
|
||||||
|
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
|
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||||
import info.nightscout.androidaps.services.Intents;
|
import info.nightscout.androidaps.services.Intents;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.db.ProfileSwitch;
|
import info.nightscout.androidaps.db.ProfileSwitch;
|
||||||
import info.nightscout.androidaps.db.Source;
|
import info.nightscout.androidaps.db.Source;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
|
||||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue;
|
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue;
|
||||||
import info.nightscout.androidaps.utils.DateUtil;
|
import info.nightscout.androidaps.utils.DateUtil;
|
||||||
|
@ -216,7 +216,7 @@ public class TreatmentsProfileSwitchFragment extends SubscriberFragment implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onStatusEvent(final EventProfileSwitchChange ev) {
|
public void onStatusEvent(final EventProfileNeedsUpdate ev) {
|
||||||
updateGUI();
|
updateGUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
import com.squareup.otto.Subscribe;
|
import com.squareup.otto.Subscribe;
|
||||||
|
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
|
@ -34,7 +33,6 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutos
|
||||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||||
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.FabricPrivacy;
|
|
||||||
|
|
||||||
|
|
||||||
public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
|
public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
|
||||||
|
@ -175,7 +173,6 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
|
||||||
UploadQueue.removeID("dbAdd", _id);
|
UploadQueue.removeID("dbAdd", _id);
|
||||||
}
|
}
|
||||||
MainApp.getDbHelper().delete(tempBasal);
|
MainApp.getDbHelper().delete(tempBasal);
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("RemoveTempBasal"));
|
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
|
||||||
builder.show();
|
builder.show();
|
||||||
|
|
|
@ -23,8 +23,8 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
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.general.overview.Dialogs.BolusProgressDialog;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressHelperActivity;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressHelperActivity;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
|
||||||
|
@ -381,7 +381,7 @@ public class CommandQueue {
|
||||||
Notification notification = new Notification(Notification.NOT_ENG_MODE_OR_RELEASE, MainApp.gs(R.string.not_eng_mode_or_release), Notification.URGENT);
|
Notification notification = new Notification(Notification.NOT_ENG_MODE_OR_RELEASE, MainApp.gs(R.string.not_eng_mode_or_release), Notification.URGENT);
|
||||||
MainApp.bus().post(new EventNewNotification(notification));
|
MainApp.bus().post(new EventNewNotification(notification));
|
||||||
if (callback != null)
|
if (callback != null)
|
||||||
callback.result(new PumpEnactResult().success(false).comment(MainApp.gs(R.string.not_eng_mode_or_release))).run();
|
callback.result(new PumpEnactResult().success(false).enacted(false).comment(MainApp.gs(R.string.not_eng_mode_or_release))).run();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ public class CommandQueue {
|
||||||
Notification notification = new Notification(Notification.BASAL_VALUE_BELOW_MINIMUM, MainApp.gs(R.string.basalvaluebelowminimum), Notification.URGENT);
|
Notification notification = new Notification(Notification.BASAL_VALUE_BELOW_MINIMUM, MainApp.gs(R.string.basalvaluebelowminimum), Notification.URGENT);
|
||||||
MainApp.bus().post(new EventNewNotification(notification));
|
MainApp.bus().post(new EventNewNotification(notification));
|
||||||
if (callback != null)
|
if (callback != null)
|
||||||
callback.result(new PumpEnactResult().success(false).comment(MainApp.gs(R.string.basalvaluebelowminimum))).run();
|
callback.result(new PumpEnactResult().success(false).enacted(false).comment(MainApp.gs(R.string.basalvaluebelowminimum))).run();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
|
||||||
import info.nightscout.androidaps.queue.events.EventQueueChanged;
|
import info.nightscout.androidaps.queue.events.EventQueueChanged;
|
||||||
import info.nightscout.androidaps.utils.SP;
|
import info.nightscout.androidaps.utils.SP;
|
||||||
|
import info.nightscout.androidaps.utils.T;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 09.11.2017.
|
* Created by mike on 09.11.2017.
|
||||||
|
@ -28,9 +29,8 @@ public class QueueThread extends Thread {
|
||||||
|
|
||||||
private CommandQueue queue;
|
private CommandQueue queue;
|
||||||
|
|
||||||
private long lastCommandTime = 0;
|
|
||||||
private boolean connectLogged = false;
|
private boolean connectLogged = false;
|
||||||
public boolean waitingForDisconnect = false;
|
boolean waitingForDisconnect = false;
|
||||||
|
|
||||||
private PowerManager.WakeLock mWakeLock;
|
private PowerManager.WakeLock mWakeLock;
|
||||||
|
|
||||||
|
@ -41,14 +41,17 @@ public class QueueThread extends Thread {
|
||||||
Context context = MainApp.instance().getApplicationContext();
|
Context context = MainApp.instance().getApplicationContext();
|
||||||
if (context != null) {
|
if (context != null) {
|
||||||
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||||
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "QueueThread");
|
if (powerManager != null)
|
||||||
|
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "AndroidAPS:QueueThread");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void run() {
|
public final void run() {
|
||||||
mWakeLock.acquire();
|
if (mWakeLock != null)
|
||||||
|
mWakeLock.acquire(T.mins(10).msecs());
|
||||||
MainApp.bus().post(new EventQueueChanged());
|
MainApp.bus().post(new EventQueueChanged());
|
||||||
|
long lastCommandTime;
|
||||||
long connectionStartTime = lastCommandTime = System.currentTimeMillis();
|
long connectionStartTime = lastCommandTime = System.currentTimeMillis();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -72,7 +75,7 @@ public class QueueThread extends Thread {
|
||||||
|
|
||||||
//BLUETOOTH-WATCHDOG
|
//BLUETOOTH-WATCHDOG
|
||||||
boolean watchdog = SP.getBoolean(R.string.key_btwatchdog, false);
|
boolean watchdog = SP.getBoolean(R.string.key_btwatchdog, false);
|
||||||
long last_watchdog = SP.getLong(R.string.key_btwatchdog_lastbark, 0l);
|
long last_watchdog = SP.getLong(R.string.key_btwatchdog_lastbark, 0L);
|
||||||
watchdog = watchdog && System.currentTimeMillis() - last_watchdog > (Constants.MIN_WATCHDOG_INTERVAL_IN_SECONDS * 1000);
|
watchdog = watchdog && System.currentTimeMillis() - last_watchdog > (Constants.MIN_WATCHDOG_INTERVAL_IN_SECONDS * 1000);
|
||||||
if (watchdog) {
|
if (watchdog) {
|
||||||
if (L.isEnabled(L.PUMPQUEUE))
|
if (L.isEnabled(L.PUMPQUEUE))
|
||||||
|
@ -170,7 +173,8 @@ public class QueueThread extends Thread {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
mWakeLock.release();
|
if (mWakeLock != null)
|
||||||
|
mWakeLock.release();
|
||||||
if (L.isEnabled(L.PUMPQUEUE))
|
if (L.isEnabled(L.PUMPQUEUE))
|
||||||
log.debug("thread end");
|
log.debug("thread end");
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import info.nightscout.androidaps.data.DetailedBolusInfo;
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||||
import info.nightscout.androidaps.logging.L;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
|
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
|
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
|
||||||
import info.nightscout.androidaps.queue.Callback;
|
import info.nightscout.androidaps.queue.Callback;
|
||||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
import info.nightscout.androidaps.utils.DecimalFormatter;
|
||||||
|
|
|
@ -7,15 +7,13 @@ import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
|
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.Constants;
|
import info.nightscout.androidaps.Constants;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
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.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
|
@ -46,13 +44,12 @@ public class KeepAliveReceiver extends BroadcastReceiver {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent rIntent) {
|
public void onReceive(Context context, Intent rIntent) {
|
||||||
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||||
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "");
|
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "AndroidAPS:KeepAliveReciever");
|
||||||
wl.acquire();
|
wl.acquire();
|
||||||
|
|
||||||
LocalAlertUtils.shortenSnoozeInterval();
|
LocalAlertUtils.shortenSnoozeInterval();
|
||||||
LocalAlertUtils.checkStaleBGAlert();
|
LocalAlertUtils.checkStaleBGAlert();
|
||||||
checkPump();
|
checkPump();
|
||||||
FabricPrivacy.uploadDailyStats();
|
|
||||||
|
|
||||||
if (L.isEnabled(L.CORE))
|
if (L.isEnabled(L.CORE))
|
||||||
log.debug("KeepAlive received");
|
log.debug("KeepAlive received");
|
||||||
|
@ -76,7 +73,7 @@ public class KeepAliveReceiver extends BroadcastReceiver {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
|
||||||
MainApp.bus().post(new EventProfileSwitchChange());
|
MainApp.bus().post(new EventProfileNeedsUpdate());
|
||||||
} else if (isStatusOutdated && !pump.isBusy()) {
|
} else if (isStatusOutdated && !pump.isBusy()) {
|
||||||
lastReadStatus = System.currentTimeMillis();
|
lastReadStatus = System.currentTimeMillis();
|
||||||
ConfigBuilderPlugin.getPlugin().getCommandQueue().readStatus("KeepAlive. Status outdated.", null);
|
ConfigBuilderPlugin.getPlugin().getCommandQueue().readStatus("KeepAlive. Status outdated.", null);
|
||||||
|
@ -87,7 +84,7 @@ public class KeepAliveReceiver extends BroadcastReceiver {
|
||||||
}
|
}
|
||||||
if (lastRun != 0 && System.currentTimeMillis() - lastRun > T.mins(10).msecs()) {
|
if (lastRun != 0 && System.currentTimeMillis() - lastRun > T.mins(10).msecs()) {
|
||||||
log.error("KeepAlive fail");
|
log.error("KeepAlive fail");
|
||||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("KeepAliveFail"));
|
FabricPrivacy.getInstance().logCustom("KeepAliveFail");
|
||||||
}
|
}
|
||||||
lastRun = System.currentTimeMillis();
|
lastRun = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
package info.nightscout.androidaps.receivers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Forward received SMS intents. This is a separate class, because unlike local broadcasts handled by DataReceiver,
|
||||||
|
* receiving SMS requires a special permission in the manifest, which necessitates a separate receiver.
|
||||||
|
*/
|
||||||
|
public class SmsReceiver extends DataReceiver {}
|
|
@ -75,8 +75,11 @@ public class AlarmSoundService extends Service {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
player.stop();
|
if (player != null) {
|
||||||
player.release();
|
player.stop();
|
||||||
|
player.release();
|
||||||
|
}
|
||||||
|
|
||||||
if (L.isEnabled(L.CORE))
|
if (L.isEnabled(L.CORE))
|
||||||
log.debug("onDestroy");
|
log.debug("onDestroy");
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import info.nightscout.androidaps.MainActivity;
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.events.EventProfileStoreChanged;
|
import info.nightscout.androidaps.events.EventProfileStoreChanged;
|
||||||
import info.nightscout.androidaps.events.EventProfileSwitchChange;
|
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
|
||||||
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
import info.nightscout.androidaps.events.EventPumpStatusChanged;
|
||||||
import info.nightscout.androidaps.plugins.constraints.objectives.events.EventObjectivesSaved;
|
import info.nightscout.androidaps.plugins.constraints.objectives.events.EventObjectivesSaved;
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus;
|
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus;
|
||||||
|
@ -115,7 +115,7 @@ public class SetupWizardActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onEventProfileSwitchChange(EventProfileSwitchChange ignored) {
|
public void onEventProfileSwitchChange(EventProfileNeedsUpdate ignored) {
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
package info.nightscout.androidaps.utils;
|
package info.nightscout.androidaps.utils;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
import com.crashlytics.android.Crashlytics;
|
import com.crashlytics.android.Crashlytics;
|
||||||
import com.crashlytics.android.answers.Answers;
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
import com.crashlytics.android.answers.CustomEvent;
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import info.nightscout.androidaps.BuildConfig;
|
import info.nightscout.androidaps.BuildConfig;
|
||||||
import info.nightscout.androidaps.Config;
|
|
||||||
import info.nightscout.androidaps.MainApp;
|
import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.logging.L;
|
||||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by jamorham on 21/02/2018.
|
* Created by jamorham on 21/02/2018.
|
||||||
|
@ -21,8 +22,8 @@ import java.util.Date;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class FabricPrivacy {
|
public class FabricPrivacy {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(L.CORE);
|
||||||
|
|
||||||
private static final String TAG = "FabricPrivacy";
|
|
||||||
private static volatile FabricPrivacy instance;
|
private static volatile FabricPrivacy instance;
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +46,8 @@ public class FabricPrivacy {
|
||||||
final Crashlytics crashlytics = Crashlytics.getInstance();
|
final Crashlytics crashlytics = Crashlytics.getInstance();
|
||||||
crashlytics.core.logException(throwable);
|
crashlytics.core.logException(throwable);
|
||||||
} catch (NullPointerException | IllegalStateException e) {
|
} catch (NullPointerException | IllegalStateException e) {
|
||||||
android.util.Log.d(TAG, "Ignoring opted out non-initialized log: " + throwable);
|
if (L.isEnabled(L.CORE))
|
||||||
|
log.debug("Ignoring opted out non-initialized log: " + throwable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +57,8 @@ public class FabricPrivacy {
|
||||||
final Crashlytics crashlytics = Crashlytics.getInstance();
|
final Crashlytics crashlytics = Crashlytics.getInstance();
|
||||||
crashlytics.core.log(msg);
|
crashlytics.core.log(msg);
|
||||||
} catch (NullPointerException | IllegalStateException e) {
|
} catch (NullPointerException | IllegalStateException e) {
|
||||||
android.util.Log.d(TAG, "Ignoring opted out non-initialized log: " + msg);
|
if (L.isEnabled(L.CORE))
|
||||||
|
log.debug("Ignoring opted out non-initialized log: " + msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +68,8 @@ public class FabricPrivacy {
|
||||||
final Crashlytics crashlytics = Crashlytics.getInstance();
|
final Crashlytics crashlytics = Crashlytics.getInstance();
|
||||||
crashlytics.core.log(priority, tag, msg);
|
crashlytics.core.log(priority, tag, msg);
|
||||||
} catch (NullPointerException | IllegalStateException e) {
|
} catch (NullPointerException | IllegalStateException e) {
|
||||||
android.util.Log.d(TAG, "Ignoring opted out non-initialized log: " + msg);
|
if (L.isEnabled(L.CORE))
|
||||||
|
log.debug("Ignoring opted out non-initialized log: " + msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,68 +77,67 @@ public class FabricPrivacy {
|
||||||
return SP.getBoolean("enable_fabric", true);
|
return SP.getBoolean("enable_fabric", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Answers logCustom
|
// Analytics logCustom
|
||||||
public void logCustom(CustomEvent event) {
|
public void logCustom(Bundle event) {
|
||||||
try {
|
try {
|
||||||
final Answers answers = Answers.getInstance();
|
|
||||||
if (fabricEnabled()) {
|
if (fabricEnabled()) {
|
||||||
answers.logCustom(event);
|
MainApp.getFirebaseAnalytics().logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, event);
|
||||||
} else {
|
} else {
|
||||||
android.util.Log.d(TAG, "Ignoring recently opted-out event: " + event.toString());
|
if (L.isEnabled(L.CORE))
|
||||||
|
log.debug("Ignoring recently opted-out event: " + event.toString());
|
||||||
}
|
}
|
||||||
} catch (NullPointerException | IllegalStateException e) {
|
} catch (NullPointerException | IllegalStateException e) {
|
||||||
android.util.Log.d(TAG, "Ignoring opted-out non-initialized event: " + event.toString());
|
if (L.isEnabled(L.CORE))
|
||||||
|
log.debug("Ignoring opted-out non-initialized event: " + event.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void uploadDailyStats() {
|
// Analytics logCustom
|
||||||
|
public void logCustom(String event) {
|
||||||
|
try {
|
||||||
|
if (fabricEnabled()) {
|
||||||
|
MainApp.getFirebaseAnalytics().logEvent(event, new Bundle());
|
||||||
|
} else {
|
||||||
|
if (L.isEnabled(L.CORE))
|
||||||
|
log.debug("Ignoring recently opted-out event: " + event);
|
||||||
|
}
|
||||||
|
} catch (NullPointerException | IllegalStateException e) {
|
||||||
|
if (L.isEnabled(L.CORE))
|
||||||
|
log.debug("Ignoring opted-out non-initialized event: " + event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setUserStats() {
|
||||||
if (!fabricEnabled()) return;
|
if (!fabricEnabled()) return;
|
||||||
|
|
||||||
long lastUploadDay = SP.getLong(MainApp.gs(R.string.key_plugin_stats_report_timestamp), 0L);
|
String closedLoopEnabled = MainApp.getConstraintChecker().isClosedLoopAllowed().value() ? "CLOSED_LOOP_ENABLED" : "CLOSED_LOOP_DISABLED";
|
||||||
|
// Size is limited to 36 chars
|
||||||
|
String remote = BuildConfig.REMOTE
|
||||||
|
.replace("https://","")
|
||||||
|
.replace("http://","")
|
||||||
|
.replace(".git", "")
|
||||||
|
.replace(".com/", ":")
|
||||||
|
.replace(".org/", ":")
|
||||||
|
.replace(".net/", ":");
|
||||||
|
|
||||||
Date date = new Date();
|
MainApp.getFirebaseAnalytics().setUserProperty("Mode", BuildConfig.APPLICATION_ID + "-" + closedLoopEnabled);
|
||||||
date.setHours(0);
|
MainApp.getFirebaseAnalytics().setUserProperty("Language", LocaleHelper.getLanguage(MainApp.instance()));
|
||||||
date.setMinutes(0);
|
MainApp.getFirebaseAnalytics().setUserProperty("Version", BuildConfig.VERSION);
|
||||||
date.setSeconds(0);
|
MainApp.getFirebaseAnalytics().setUserProperty("HEAD", BuildConfig.HEAD);
|
||||||
long today = date.getTime() - date.getTime() % 1000;
|
MainApp.getFirebaseAnalytics().setUserProperty("Remote", remote);
|
||||||
|
if (ConfigBuilderPlugin.getPlugin().getActivePump() != null)
|
||||||
|
MainApp.getFirebaseAnalytics().setUserProperty("Pump", ConfigBuilderPlugin.getPlugin().getActivePump().getClass().getSimpleName());
|
||||||
|
if (ConfigBuilderPlugin.getPlugin().getActiveAPS() != null)
|
||||||
|
MainApp.getFirebaseAnalytics().setUserProperty("Aps", ConfigBuilderPlugin.getPlugin().getActiveAPS().getClass().getSimpleName());
|
||||||
|
if (ConfigBuilderPlugin.getPlugin().getActiveBgSource() != null)
|
||||||
|
MainApp.getFirebaseAnalytics().setUserProperty("BgSource", ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().getSimpleName());
|
||||||
|
if (ConfigBuilderPlugin.getPlugin().getActiveProfileInterface() != null)
|
||||||
|
MainApp.getFirebaseAnalytics().setUserProperty("Profile", ConfigBuilderPlugin.getPlugin().getActiveProfileInterface().getClass().getSimpleName());
|
||||||
|
if (ConfigBuilderPlugin.getPlugin().getActiveSensitivity() != null)
|
||||||
|
MainApp.getFirebaseAnalytics().setUserProperty("Sensitivity", ConfigBuilderPlugin.getPlugin().getActiveSensitivity().getClass().getSimpleName());
|
||||||
|
if (ConfigBuilderPlugin.getPlugin().getActiveInsulin() != null)
|
||||||
|
MainApp.getFirebaseAnalytics().setUserProperty("Insulin", ConfigBuilderPlugin.getPlugin().getActiveInsulin().getClass().getSimpleName());
|
||||||
|
|
||||||
if (today > lastUploadDay) {
|
|
||||||
uploadAppUsageType();
|
|
||||||
uploadPluginStats();
|
|
||||||
|
|
||||||
SP.putLong(MainApp.gs(R.string.key_plugin_stats_report_timestamp), today);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void uploadPluginStats() {
|
|
||||||
CustomEvent pluginStats = new CustomEvent("PluginStats");
|
|
||||||
pluginStats.putCustomAttribute("version", BuildConfig.VERSION);
|
|
||||||
pluginStats.putCustomAttribute("HEAD", BuildConfig.HEAD);
|
|
||||||
pluginStats.putCustomAttribute("language", SP.getString(R.string.key_language,"default"));
|
|
||||||
for (PluginBase plugin : MainApp.getPluginsList()) {
|
|
||||||
if (plugin.isEnabled(plugin.getType()) && !plugin.pluginDescription.alwaysEnabled) {
|
|
||||||
// Fabric allows no more than 20 attributes attached to an event. By reporting disabled plugins as
|
|
||||||
// well, we would exceed that threshold, so only report what is enabled
|
|
||||||
// TODO >2.0: consider reworking this to upload an event per enabled plugin instead.
|
|
||||||
pluginStats.putCustomAttribute(plugin.getClass().getSimpleName(), "enabled");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getInstance().logCustom(pluginStats);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void uploadAppUsageType() {
|
|
||||||
CustomEvent type = new CustomEvent("AppUsageType");
|
|
||||||
if (Config.NSCLIENT)
|
|
||||||
type.putCustomAttribute("type", "NSClient");
|
|
||||||
else if (Config.PUMPCONTROL)
|
|
||||||
type.putCustomAttribute("type", "PumpControl");
|
|
||||||
else if (MainApp.getConstraintChecker().isClosedLoopAllowed().value())
|
|
||||||
type.putCustomAttribute("type", "ClosedLoop");
|
|
||||||
else
|
|
||||||
type.putCustomAttribute("type", "OpenLoop");
|
|
||||||
|
|
||||||
getInstance().logCustom(type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,13 @@ import android.util.LongSparseArray;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
public class MidnightTime {
|
public class MidnightTime {
|
||||||
private static final LongSparseArray<Long> times = new LongSparseArray<>();
|
static final LongSparseArray<Long> times = new LongSparseArray<>();
|
||||||
|
|
||||||
private static long hits = 0;
|
private static long hits = 0;
|
||||||
private static long misses = 0;
|
private static long misses = 0;
|
||||||
|
|
||||||
|
private static final int THRESHOLD = 100000;
|
||||||
|
|
||||||
public static long calc() {
|
public static long calc() {
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
c.set(Calendar.HOUR_OF_DAY, 0);
|
c.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
@ -36,10 +38,17 @@ public class MidnightTime {
|
||||||
m = c.getTimeInMillis();
|
m = c.getTimeInMillis();
|
||||||
times.append(time, m);
|
times.append(time, m);
|
||||||
++misses;
|
++misses;
|
||||||
|
if (times.size() > THRESHOLD) resetCache();
|
||||||
}
|
}
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void resetCache() {
|
||||||
|
hits = 0;
|
||||||
|
misses = 0;
|
||||||
|
times.clear();
|
||||||
|
}
|
||||||
|
|
||||||
public static String log() {
|
public static String log() {
|
||||||
return "Hits: " + hits + " misses: " + misses + " stored: " + times.size();
|
return "Hits: " + hits + " misses: " + misses + " stored: " + times.size();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package org.monkey.d.ruffy.ruffy.driver.display.menu;
|
package org.monkey.d.ruffy.ruffy.driver.display.menu;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by fishermen21 on 24.05.17.
|
* Created by fishermen21 on 24.05.17.
|
||||||
*/
|
*/
|
||||||
|
@ -30,6 +32,6 @@ public class MenuDate {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return day+"."+String.format("%02d",month)+".";
|
return day+"."+String.format(Locale.ENGLISH, "%02d",month)+".";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package org.monkey.d.ruffy.ruffy.driver.display.menu;
|
package org.monkey.d.ruffy.ruffy.driver.display.menu;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by fishermen21 on 22.05.17.
|
* Created by fishermen21 on 22.05.17.
|
||||||
*/
|
*/
|
||||||
|
@ -31,6 +33,6 @@ public class MenuTime {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return hour+":"+String.format("%02d",minute);
|
return hour+":"+String.format(Locale.ENGLISH, "%02d",minute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
android:id="@+id/logsettings_placeholder"
|
android:id="@+id/logsettings_placeholder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"></LinearLayout>
|
android:orientation="vertical" />
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
|
@ -529,7 +528,8 @@
|
||||||
android:id="@+id/careportal_newnstreatment_notes"
|
android:id="@+id/careportal_newnstreatment_notes"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:width="180dp" />
|
android:width="180dp"
|
||||||
|
android:inputType="text" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="info.nightscout.androidaps.plugins.PumpInsight.InsightFragment">
|
tools:context="info.nightscout.androidaps.plugins.pump.insight.LocalInsightFragment">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".plugins.general.overview.Dialogs.BolusProgressDialog"
|
tools:context=".plugins.general.overview.dialogs.BolusProgressDialog"
|
||||||
android:paddingTop="15dp"
|
android:paddingTop="15dp"
|
||||||
android:paddingBottom="15dp">
|
android:paddingBottom="15dp">
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".plugins.general.overview.Dialogs.CalibrationDialog">
|
tools:context=".plugins.general.overview.dialogs.CalibrationDialog">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".plugins.general.overview.Dialogs.EditQuickWizardDialog">
|
tools:context=".plugins.general.overview.dialogs.EditQuickWizardDialog">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context=".plugins.general.overview.Dialogs.ErrorDialog"
|
tools:context=".plugins.general.overview.dialogs.ErrorDialog"
|
||||||
android:paddingTop="15dp"
|
android:paddingTop="15dp"
|
||||||
android:paddingBottom="15dp">
|
android:paddingBottom="15dp">
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".plugins.general.overview.Dialogs.NewCarbsDialog">
|
tools:context=".plugins.general.overview.dialogs.NewCarbsDialog">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".plugins.general.overview.Dialogs.NewInsulinDialog">
|
tools:context=".plugins.general.overview.dialogs.NewInsulinDialog">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -52,12 +51,14 @@
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/overview_newtempbasal_percent_radio"
|
android:id="@+id/overview_newtempbasal_percent_radio"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:checked="true"
|
android:checked="true"
|
||||||
android:text="@string/overview_newtempbasal_percent_label" />
|
android:text="@string/overview_newtempbasal_percent_label" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/overview_newtempbasal_absolute_radio"
|
android:id="@+id/overview_newtempbasal_absolute_radio"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="U/h" />
|
android:text="U/h" />
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".plugins.general.overview.Dialogs.NewTreatmentDialog">
|
tools:context=".plugins.general.overview.dialogs.NewTreatmentDialog">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/overview_quickwizard_cardview"
|
android:id="@+id/overview_quickwizard_cardview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
android:textColor="#FFFFFF"></TextView>
|
android:textColor="#FFFFFF" />
|
|
@ -1,5 +1,4 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<string name="nav_resetdb">Herstel databasis</string>
|
<string name="nav_resetdb">Herstel databasis</string>
|
||||||
<string name="reset_db_confirm">Wil jy regtig die databasis herstel?</string>
|
<string name="reset_db_confirm">Wil jy regtig die databasis herstel?</string>
|
||||||
<string name="nav_exit">Gaan uit</string>
|
<string name="nav_exit">Gaan uit</string>
|
||||||
<string name="danar_useextended_title">Gebruik verlengde boluses vir >200%</string>
|
<string name="danar_useextended_title">Gebruik verlengde boluses vir >200%%</string>
|
||||||
<string name="danar_bt_name_title">DanaR Bluetooth-toestel</string>
|
<string name="danar_bt_name_title">DanaR Bluetooth-toestel</string>
|
||||||
<string name="ns_sync_use_absolute_title">Gebruik altyd absolute basale aardes</string>
|
<string name="ns_sync_use_absolute_title">Gebruik altyd absolute basale aardes</string>
|
||||||
<string name="alert_dialog_storage_permission_text">Herlaai jou foon of herlaai AndroidAPS met die stelsel instellings \nanders sal AndroidAPS nie geskiedenis hê nie! (Belangrik om te spoor en te verifieer dat die algoritmes korrek werk)!</string>
|
<string name="alert_dialog_storage_permission_text">Herlaai jou foon of herlaai AndroidAPS met die stelsel instellings \nanders sal AndroidAPS nie geskiedenis hê nie! (Belangrik om te spoor en te verifieer dat die algoritmes korrek werk)!</string>
|
||||||
|
@ -54,6 +54,7 @@
|
||||||
<string name="description_wear">Monitor en beheer AndroidAPS met jou WearOS horlosie.</string>
|
<string name="description_wear">Monitor en beheer AndroidAPS met jou WearOS horlosie.</string>
|
||||||
<string name="description_xdrip_status_line">Wys informasie van jou loop op jou xDrip+ horlosie-gesig.</string>
|
<string name="description_xdrip_status_line">Wys informasie van jou loop op jou xDrip+ horlosie-gesig.</string>
|
||||||
<string name="description_sms_communicator">Afstandbeheer AndroidAPS met SMS kodes.</string>
|
<string name="description_sms_communicator">Afstandbeheer AndroidAPS met SMS kodes.</string>
|
||||||
|
<string name="objectives_button_back">Terug</string>
|
||||||
<string name="objectives_button_start">Begin</string>
|
<string name="objectives_button_start">Begin</string>
|
||||||
<string name="objectives_button_verify">Verifieer</string>
|
<string name="objectives_button_verify">Verifieer</string>
|
||||||
<string name="nsprofileview_units_label">Eenhede</string>
|
<string name="nsprofileview_units_label">Eenhede</string>
|
||||||
|
@ -265,6 +266,10 @@
|
||||||
<string name="smscommunicator_bolusreplywithcode">Om %1$.2fU bolus te lewer antwoord met kode %2$s</string>
|
<string name="smscommunicator_bolusreplywithcode">Om %1$.2fU bolus te lewer antwoord met kode %2$s</string>
|
||||||
<string name="smscommunicator_calibrationreplywithcode">Om kalibrasie %1$.2f te stuur antwoord met kode %2$s</string>
|
<string name="smscommunicator_calibrationreplywithcode">Om kalibrasie %1$.2f te stuur antwoord met kode %2$s</string>
|
||||||
<string name="smscommunicator_bolusfailed">Bolus het misluk</string>
|
<string name="smscommunicator_bolusfailed">Bolus het misluk</string>
|
||||||
|
<string name="bolusdelivered">Bolus %1$.2fU suksesvol afgelewer</string>
|
||||||
|
<string name="bolusrequested">Gaan %1$.2fU lewer</string>
|
||||||
|
<string name="smscommunicator_bolusdelivered">Bolus %1$.2fU suksesvol afgelewer</string>
|
||||||
|
<string name="bolusdelivering">Lewering van %1$.2fU</string>
|
||||||
<string name="smscommunicator_remotecommandsallowed">Laat afstandbeheerde bevele toe via SMS</string>
|
<string name="smscommunicator_remotecommandsallowed">Laat afstandbeheerde bevele toe via SMS</string>
|
||||||
<string name="glucosetype_finger">Vinger</string>
|
<string name="glucosetype_finger">Vinger</string>
|
||||||
<string name="glucosetype_sensor">Sensor</string>
|
<string name="glucosetype_sensor">Sensor</string>
|
||||||
|
@ -309,7 +314,7 @@
|
||||||
<string name="overview_bolusprogress_stop">Staak</string>
|
<string name="overview_bolusprogress_stop">Staak</string>
|
||||||
<string name="overview_bolusprogress_stoppressed">STAAK GEDRUK</string>
|
<string name="overview_bolusprogress_stoppressed">STAAK GEDRUK</string>
|
||||||
<string name="waitingforpump">Wag vir pomp</string>
|
<string name="waitingforpump">Wag vir pomp</string>
|
||||||
<string name="overview_bolusprogress_goingtodeliver" formatted="false">Gaan %.2fU lewer</string>
|
<string name="overview_bolusprogress_goingtodeliver">Gaan %1$.2fU lewer</string>
|
||||||
<string name="objectives_0_objective">Opstel van visualisering en monitering, en ontleed basale en verhoudings</string>
|
<string name="objectives_0_objective">Opstel van visualisering en monitering, en ontleed basale en verhoudings</string>
|
||||||
<string name="objectives_0_gate">Verifieer dat BG beskikbaar is in Nightscout, en dat pomp insulien data opgelaai word</string>
|
<string name="objectives_0_gate">Verifieer dat BG beskikbaar is in Nightscout, en dat pomp insulien data opgelaai word</string>
|
||||||
<string name="objectives_1_objective">Begin op \'n oop lus</string>
|
<string name="objectives_1_objective">Begin op \'n oop lus</string>
|
||||||
|
@ -332,13 +337,26 @@
|
||||||
<string name="smscommunicator_loopisdisabled">Loop is gedeaktiveer</string>
|
<string name="smscommunicator_loopisdisabled">Loop is gedeaktiveer</string>
|
||||||
<string name="smscommunicator_loopisenabled">Lus geaktiveer</string>
|
<string name="smscommunicator_loopisenabled">Lus geaktiveer</string>
|
||||||
<string name="valuelimitedto">%1$.2f beperk tot %2$.2f</string>
|
<string name="valuelimitedto">%1$.2f beperk tot %2$.2f</string>
|
||||||
<string name="valueoutofrange" formatted="false">Waarde %s is uit harde perke</string>
|
<string name="valueoutofrange">Waarde %1$s is uit harde perke</string>
|
||||||
<string name="smscommunicator_remotecommandnotallowed">Afstandbeheerde bevel word nie toegelaat nie</string>
|
<string name="smscommunicator_remotecommandnotallowed">Afstandbeheerde bevel word nie toegelaat nie</string>
|
||||||
|
<string name="smscommunicator_remotebolusnotallowed">Afstandbeheerde bolus nie beskikbaar nie. Probeer later weer.</string>
|
||||||
|
<string name="smscommunicator_basalreplywithcode">Om %1$.2fU basale vir %2$d min te aktiveer antwoord met kode %3$s</string>
|
||||||
|
<string name="smscommunicator_profilereplywithcode">Om profiel te verander na %1$s %2$d%% antwoord met %3$s</string>
|
||||||
|
<string name="smscommunicator_extendedreplywithcode">Om bolus %1$.2fU vir %2$d min te verleng kies %3$s</string>
|
||||||
|
<string name="smscommunicator_basalpctreplywithcode">Om basal e %1$d%% vir %2$d min te begin kies %3$s</string>
|
||||||
<string name="smscommunicator_suspendreplywithcode">Om lus op te skort vir %1$d minute antwoord met kode %2$s</string>
|
<string name="smscommunicator_suspendreplywithcode">Om lus op te skort vir %1$d minute antwoord met kode %2$s</string>
|
||||||
<string name="smscommunicator_tempbasalset">Temp basale %1$.2fU/h vir %2$d min suksesvol geaktiveerd</string>
|
<string name="smscommunicator_tempbasalset">Temp basale %1$.2fU/h vir %2$d min suksesvol geaktiveerd</string>
|
||||||
|
<string name="smscommunicator_extendedset">Verlengde bolus %1$.2fU vir %2$d min is begin</string>
|
||||||
|
<string name="smscommunicator_tempbasalset_percent">Tydelike basale %1$d%% vir %2$d min hardloop</string>
|
||||||
<string name="smscommunicator_tempbasalfailed">Tydelike basale aktivering het gefaal</string>
|
<string name="smscommunicator_tempbasalfailed">Tydelike basale aktivering het gefaal</string>
|
||||||
|
<string name="smscommunicator_extendedfailed">Verlengde bolus het misluk</string>
|
||||||
|
<string name="smscommunicator_basalstopreplywithcode">Stop tydelike basale antwoord met kode %1$s</string>
|
||||||
|
<string name="smscommunicator_extendedstopreplywithcode">Stop tydelike basale antwoord met kode %1$s</string>
|
||||||
<string name="smscommunicator_tempbasalcanceled">Tydelike basale gekanselleer</string>
|
<string name="smscommunicator_tempbasalcanceled">Tydelike basale gekanselleer</string>
|
||||||
|
<string name="smscommunicator_extendedcanceled">Verlengde bolus gekanselleer</string>
|
||||||
<string name="smscommunicator_tempbasalcancelfailed">Kansellassie van tydelike basale het gefaal</string>
|
<string name="smscommunicator_tempbasalcancelfailed">Kansellassie van tydelike basale het gefaal</string>
|
||||||
|
<string name="smscommunicator_extendedcancelfailed">Kansellasie van verlengde bolus het misluk</string>
|
||||||
|
<string name="smscommunicator_unknowncommand">Onbekende opdrag of verkeerde opsie</string>
|
||||||
<string name="quickwizard">SlimNutsman</string>
|
<string name="quickwizard">SlimNutsman</string>
|
||||||
<string name="quickwizardsettings">SlimNutsman instellings</string>
|
<string name="quickwizardsettings">SlimNutsman instellings</string>
|
||||||
<string name="overview_editquickwizard_buttontext">Knoppie teks:</string>
|
<string name="overview_editquickwizard_buttontext">Knoppie teks:</string>
|
||||||
|
@ -446,7 +464,7 @@
|
||||||
<string name="profile">Profiel</string>
|
<string name="profile">Profiel</string>
|
||||||
<string name="openapsama_max_daily_safety_multiplier_summary">Verstek waarde: 3 dit is \'n sleutel OpenAPS veiligheidsdrumpels. Wat dit doen is om jou basale te berk tot 3 x (in hierdie mense) jou grootste basale koers. Jy sal waarskynlik nooit dit hoef te verander, maar jy moet bewus wees wat bespreek is oor \"3 x max daaglikse; 4 x huidige\"vir veiligheidsdrumpels.</string>
|
<string name="openapsama_max_daily_safety_multiplier_summary">Verstek waarde: 3 dit is \'n sleutel OpenAPS veiligheidsdrumpels. Wat dit doen is om jou basale te berk tot 3 x (in hierdie mense) jou grootste basale koers. Jy sal waarskynlik nooit dit hoef te verander, maar jy moet bewus wees wat bespreek is oor \"3 x max daaglikse; 4 x huidige\"vir veiligheidsdrumpels.</string>
|
||||||
<string name="openapsama_current_basal_safety_multiplier_summary">Verstek waarde: 4 dit is die helfte van die sleutel OpenAPS veiligheid limiete, en die ander helfte van \"3 x maks daaglikse; 4 x huidige\"van die veiligheid limiet. Dit beteken jou basale, ongeag max basale stel op jou pomp, kan enige hoër wees as hierdie nommer tye die huidige vlak van jou basale. Dit is om te verhoed dat mense in gevaarlike gebied deur instelling buitensporig hoë max basals voor om te verstaan hoe die algoritme werk. Weer, die verstek is 4 x; die meeste mense sal nooit moet dit aanpas en is eerder meer geneig om te moet aanpas ander instellings as hulle voel hulle \"loop in\" hierdie veiligheid limiet.</string>
|
<string name="openapsama_current_basal_safety_multiplier_summary">Verstek waarde: 4 dit is die helfte van die sleutel OpenAPS veiligheid limiete, en die ander helfte van \"3 x maks daaglikse; 4 x huidige\"van die veiligheid limiet. Dit beteken jou basale, ongeag max basale stel op jou pomp, kan enige hoër wees as hierdie nommer tye die huidige vlak van jou basale. Dit is om te verhoed dat mense in gevaarlike gebied deur instelling buitensporig hoë max basals voor om te verstaan hoe die algoritme werk. Weer, die verstek is 4 x; die meeste mense sal nooit moet dit aanpas en is eerder meer geneig om te moet aanpas ander instellings as hulle voel hulle \"loop in\" hierdie veiligheid limiet.</string>
|
||||||
<string name="openapsama_autosens_max_summary">Verstek waarde: 1.2\nThis is \'n vermenigvuldiger cap vir autosens (en gou autotune) stel \'n 20% max limiet op hoe hoog die autosens verhouding kan wees, wat op sy beurt bepaal hoe hoog autosens basale kan aanpas, hoe laag dit ISF kan aanpas, en hoe laag dit die BG teiken kan stel.</string>
|
<string name="openapsama_autosens_max_summary">Verstek waarde: 1.2\nThis is \'n vermenigvuldiger plafon vir autosens (en gou autotune) stel \'n 20%% max limiet op hoe hoog die autosens verhouding kan wees, wat op sy beurt bepaal hoe hoog autosens basale kan aanpas, hoe laag dit ISF kan aanpas, en hoe laag dit die BG teiken kan stel.</string>
|
||||||
<string name="openapsama_autosens_min_summary">Verstek waarde: 0.7\nDie ander kant van die autosens veiligheidsperke, sit \'n limiet op hoe laag autosens basals kan aanpas, en hoe hoog dit ISF en BG teikens kan verstel.</string>
|
<string name="openapsama_autosens_min_summary">Verstek waarde: 0.7\nDie ander kant van die autosens veiligheidsperke, sit \'n limiet op hoe laag autosens basals kan aanpas, en hoe hoog dit ISF en BG teikens kan verstel.</string>
|
||||||
<string name="openapsama_autosens_adjusttargets">Autosens Verstel doelwitte ook</string>
|
<string name="openapsama_autosens_adjusttargets">Autosens Verstel doelwitte ook</string>
|
||||||
<string name="openapsama_autosens_adjusttargets_summary">Verstek waarde: waar\nDit word gebruik om autosens toe te laat om BG teikens aan te pas, benewens ISF en basale.</string>
|
<string name="openapsama_autosens_adjusttargets_summary">Verstek waarde: waar\nDit word gebruik om autosens toe te laat om BG teikens aan te pas, benewens ISF en basale.</string>
|
||||||
|
@ -459,7 +477,7 @@
|
||||||
<string name="error_phone_not_valid">Telefoonnommer ongeldig</string>
|
<string name="error_phone_not_valid">Telefoonnommer ongeldig</string>
|
||||||
<string name="smscommunicator_invalidphonennumber">Ongeldige SMS selfoon nommer</string>
|
<string name="smscommunicator_invalidphonennumber">Ongeldige SMS selfoon nommer</string>
|
||||||
<string name="overview_calibration">Kalibrasie</string>
|
<string name="overview_calibration">Kalibrasie</string>
|
||||||
<string name="send_calibration" formatted="false">Stuur kalibrasie %.1f to xDrip?</string>
|
<string name="send_calibration">Stuur kalibrasie %1$.1f na xDrip?</string>
|
||||||
<string name="xdripnotinstalled">xDrip + nie geïnstalleerd nie</string>
|
<string name="xdripnotinstalled">xDrip + nie geïnstalleerd nie</string>
|
||||||
<string name="calibrationsent">Kalibrasie gestuur na xDrip</string>
|
<string name="calibrationsent">Kalibrasie gestuur na xDrip</string>
|
||||||
<string name="smscommunicator_calibrationsent">Kalibrasie gestuur. Ontvang moet geaktiveer word in xDrip.</string>
|
<string name="smscommunicator_calibrationsent">Kalibrasie gestuur. Ontvang moet geaktiveer word in xDrip.</string>
|
||||||
|
@ -600,7 +618,7 @@
|
||||||
<string name="absorptionsettings_title">Absorpsie instellings</string>
|
<string name="absorptionsettings_title">Absorpsie instellings</string>
|
||||||
<string name="absorption_maxtime_title">Maaltyd max\ks absorpsie tyd [h]</string>
|
<string name="absorption_maxtime_title">Maaltyd max\ks absorpsie tyd [h]</string>
|
||||||
<string name="absorption_maxtime_summary">Tyd in ure waarna verwag word dat alle koolhidrate uit maaltyd geabsorbeer sal wees</string>
|
<string name="absorption_maxtime_summary">Tyd in ure waarna verwag word dat alle koolhidrate uit maaltyd geabsorbeer sal wees</string>
|
||||||
<string name="danar_visualizeextendedaspercentage_title">Visualiseer verlengde bolus as %</string>
|
<string name="danar_visualizeextendedaspercentage_title">Visualiseer verlengde bolus as %%</string>
|
||||||
<string name="careportal_sensorage_label_short">SAGE</string>
|
<string name="careportal_sensorage_label_short">SAGE</string>
|
||||||
<string name="careportal_insulinage_label_short">IAGE</string>
|
<string name="careportal_insulinage_label_short">IAGE</string>
|
||||||
<string name="careportal_canulaage_label_short">CAGE</string>
|
<string name="careportal_canulaage_label_short">CAGE</string>
|
||||||
|
@ -713,8 +731,8 @@
|
||||||
<string name="dexcomg5_xdripupload_title">Stuur BG data na xDrip+</string>
|
<string name="dexcomg5_xdripupload_title">Stuur BG data na xDrip+</string>
|
||||||
<string name="dexcomg5_xdripupload_summary">Xdrip+ kies 640g/Eversense data bron</string>
|
<string name="dexcomg5_xdripupload_summary">Xdrip+ kies 640g/Eversense data bron</string>
|
||||||
<string name="nsclientbg">NSClient BG</string>
|
<string name="nsclientbg">NSClient BG</string>
|
||||||
<string name="minimalbasalvaluereplaced">Basale waarde vervang deur minimum ondersteunde waarde: %s</string>
|
<string name="minimalbasalvaluereplaced">Basale waarde vervang deur minimum ondersteunde waarde: %1$s</string>
|
||||||
<string name="maximumbasalvaluereplaced">Basale waarde vervang deur maksimum ondersteunde waarde: %s</string>
|
<string name="maximumbasalvaluereplaced">Basale waarde vervang deur maksimum ondersteunde waarde: %1$s</string>
|
||||||
<string name="overview_editquickwizard_usebg">BG berekening</string>
|
<string name="overview_editquickwizard_usebg">BG berekening</string>
|
||||||
<string name="overview_editquickwizard_usebolusiob">Bolus IAB berekening</string>
|
<string name="overview_editquickwizard_usebolusiob">Bolus IAB berekening</string>
|
||||||
<string name="overview_editquickwizard_usebasaliob">Basale IAB berekening</string>
|
<string name="overview_editquickwizard_usebasaliob">Basale IAB berekening</string>
|
||||||
|
@ -732,8 +750,8 @@
|
||||||
<string name="closedmodeenabled">Geslote modus geaktiveer</string>
|
<string name="closedmodeenabled">Geslote modus geaktiveer</string>
|
||||||
<string name="maxiobset">Maksimum IAB behoorlik gestel</string>
|
<string name="maxiobset">Maksimum IAB behoorlik gestel</string>
|
||||||
<string name="hasbgdata">BG beskikbaar vanaf geselekteerde bron</string>
|
<string name="hasbgdata">BG beskikbaar vanaf geselekteerde bron</string>
|
||||||
<string name="basalprofilenotaligned" formatted="false">Basale waardes nie in lyn met ure: %s</string>
|
<string name="basalprofilenotaligned">Basale waardes nie in lyn met ure: %1$s</string>
|
||||||
<string name="zerovalueinprofile" formatted="false">Ongeldige profiel: %s</string>
|
<string name="zerovalueinprofile">Ongeldige profiel: %1$s</string>
|
||||||
<string name="combo_programming_bolus">Programmeer pomp vir bolusing</string>
|
<string name="combo_programming_bolus">Programmeer pomp vir bolusing</string>
|
||||||
<string name="combo_refresh">Verfris</string>
|
<string name="combo_refresh">Verfris</string>
|
||||||
<string name="combo_pump_state_label">Staat</string>
|
<string name="combo_pump_state_label">Staat</string>
|
||||||
|
@ -1069,12 +1087,13 @@
|
||||||
<string name="mute_alert">Demp</string>
|
<string name="mute_alert">Demp</string>
|
||||||
<string name="pump_alert">Pomp alarm</string>
|
<string name="pump_alert">Pomp alarm</string>
|
||||||
<string name="log_site_changes">Log ligging veranderings</string>
|
<string name="log_site_changes">Log ligging veranderings</string>
|
||||||
|
<string name="log_reservoir_changes">Log stoor veranderinge</string>
|
||||||
<string name="log_tube_changes">Log voerpyp verandering</string>
|
<string name="log_tube_changes">Log voerpyp verandering</string>
|
||||||
<string name="log_battery_changes">Log battery verandering</string>
|
<string name="log_battery_changes">Log battery verandering</string>
|
||||||
<string name="log_operating_mode_changes">Log bedryf modus veranderinge</string>
|
<string name="log_operating_mode_changes">Log bedryf modus veranderinge</string>
|
||||||
<string name="log_alerts">Log alarms</string>
|
<string name="log_alerts">Log alarms</string>
|
||||||
<string name="enable_tbr_emulation">Skakel TBR emulasie aan</string>
|
<string name="enable_tbr_emulation">Skakel TBR emulasie aan</string>
|
||||||
<string name="enable_tbr_emulation_summary">Gebruik uitgebreide boluses in plaas van TBRs om die 250% perk te omseil</string>
|
<string name="enable_tbr_emulation_summary">Gebruik verlengde boluses in plaas van TBRs om die 250%% perk te omseil</string>
|
||||||
<string name="disconnect_delay">Ontkoppel vertraging [s]</string>
|
<string name="disconnect_delay">Ontkoppel vertraging [s]</string>
|
||||||
<string name="serial_number">Reeksnommer</string>
|
<string name="serial_number">Reeksnommer</string>
|
||||||
<string name="release_software_version">Vrygestelde sagteware weergawe</string>
|
<string name="release_software_version">Vrygestelde sagteware weergawe</string>
|
||||||
|
@ -1130,8 +1149,13 @@
|
||||||
<string name="tomato">Tomato (MiaoMiao)</string>
|
<string name="tomato">Tomato (MiaoMiao)</string>
|
||||||
<string name="tomato_short">Tomato</string>
|
<string name="tomato_short">Tomato</string>
|
||||||
<string name="dst_in_24h_warning">Daglig spaar tyd verandering in 24 h of minder</string>
|
<string name="dst_in_24h_warning">Daglig spaar tyd verandering in 24 h of minder</string>
|
||||||
|
<string name="dst_loop_disabled_warning">Daglig spaar tyd het verander minder as 3 ure terug - Geslote lus afgeskakel</string>
|
||||||
<string name="storage">interne berging beperking</string>
|
<string name="storage">interne berging beperking</string>
|
||||||
<string name="diskfull">Bevry ten minste %1$d MB van intene stoorspasie! Lus gedeaktiveer!</string>
|
<string name="diskfull">Bevry ten minste %1$d MB van intene stoorspasie! Lus gedeaktiveer!</string>
|
||||||
|
<string name="wrongformat">Verkeerde formaat</string>
|
||||||
|
<string name="sms_wrongcode">Verkeerde kode. Opdrag gekanselleer.</string>
|
||||||
|
<string name="notconfigured">Nie gekonfigureer nie</string>
|
||||||
|
<string name="profileswitchcreated">Profiel skakelaar geskep</string>
|
||||||
<plurals name="objective_days">
|
<plurals name="objective_days">
|
||||||
<item quantity="one">%1$d dae</item>
|
<item quantity="one">%1$d dae</item>
|
||||||
<item quantity="other">%1$d dae</item>
|
<item quantity="other">%1$d dae</item>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue