diff --git a/CHANGELOG.md b/CHANGELOG.md index 3569995..14ce5ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/app/release/app-release-3.1.2.apk b/app/release/app-release-3.1.2.apk new file mode 100644 index 0000000..d095c84 Binary files /dev/null and b/app/release/app-release-3.1.2.apk differ diff --git a/app/release/output.json b/app/release/output.json index 6ff5729..177fcd9 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -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":{}}] \ No newline at end of file +[{"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":{}}] \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6005d2c..96a7a5d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ diff --git a/app/src/main/java/uk/org/openseizuredetector/MainActivity.java b/app/src/main/java/uk/org/openseizuredetector/MainActivity.java index ee2c75d..e02e793 100644 --- a/app/src/main/java/uk/org/openseizuredetector/MainActivity.java +++ b/app/src/main/java/uk/org/openseizuredetector/MainActivity.java @@ -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); diff --git a/app/src/main/java/uk/org/openseizuredetector/SdDataSourceGarmin.java b/app/src/main/java/uk/org/openseizuredetector/SdDataSourceGarmin.java index 3e628f7..95a22ea 100644 --- a/app/src/main/java/uk/org/openseizuredetector/SdDataSourceGarmin.java +++ b/app/src/main/java/uk/org/openseizuredetector/SdDataSourceGarmin.java @@ -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",