V3.1.2 - Made fall alarms latch, irrespective of the latch alarm setting - this is because falls are transitory so to be useful the alarm has to latch so the user can tell what caused the beep.

This commit is contained in:
Graham Jones
2019-04-22 21:43:19 +01:00
parent 8013b5d56a
commit 111812300e
6 changed files with 15 additions and 6 deletions

View File

@@ -4,7 +4,11 @@
V3.2.0 - (NEXT VERSION!)
- Added neural network based data analysis.
V3.1.1 - 22apr2019
V3.1.2 - 22apr2019
- Made fall alarms latch irrespective of the 'latch alarms' setting
because they are transitory alarms they have to latch to be useful.
V3.1.1 - 22apr2019
- Added heart rate to data log.
- Added Timer to give user opportunity to cancel SMS alarm before it is sent.

Binary file not shown.

View File

@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":55,"versionName":"3.1.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":56,"versionName":"3.1.2","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="uk.org.openseizuredetector"
android:versionCode="55"
android:versionName="3.1.1"
android:versionCode="56"
android:versionName="3.1.2"
>
<!--android:allowBackup="false"-->

View File

@@ -626,7 +626,8 @@ public class MainActivity extends AppCompatActivity {
acceptAlarmButton.setText("Accept Alarm");
acceptAlarmButton.setBackgroundColor(Color.DKGRAY);
if (mConnection.mBound)
if (mConnection.mSdServer.isLatchAlarms()) {
if ((mConnection.mSdServer.isLatchAlarms())
|| mConnection.mSdServer.mSdData.mFallActive) {
acceptAlarmButton.setEnabled(true);
} else {
acceptAlarmButton.setEnabled(false);

View File

@@ -520,8 +520,11 @@ public class SdDataSourceGarmin extends SdDataSource {
long fallWindowSamp = (mFallWindow*mSdData.mSampleFreq)/1000; // Convert ms to samples.
Log.v(TAG, "check_fall() - fallWindowSamp=" +fallWindowSamp);
// Move window through sample buffer, checking for fall.
mSdData.fallAlarmStanding = false;
// Note - not resetting fallAlarmStanding means that fall alarms will always latch until the 'Accept Alarm' button
// is pressed.
//mSdData.fallAlarmStanding = false;
if (mFallActive) {
mSdData.mFallActive = true;
for (i = 0; i < mSdData.mNsamp - fallWindowSamp; i++) { // i = window start point
// Find max and min acceleration within window.
minAcc = mSdData.rawData[i];
@@ -538,6 +541,7 @@ public class SdDataSourceGarmin extends SdDataSource {
}
}
} else {
mSdData.mFallActive = false;
Log.v(TAG,"check_fall - mFallActive is false - doing nothing");
}
//if (debug) APP_LOG(APP_LOG_LEVEL_DEBUG,"check_fall() - minAcc=%d, maxAcc=%d",