Merge branch 'V4.1.x'
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:versionCode="127"
|
android:versionCode="131"
|
||||||
android:versionName="4.1.12">
|
android:versionName="4.1.13">
|
||||||
<!-- android:allowBackup="false" -->
|
<!-- android:allowBackup="false" -->
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
|
|||||||
@@ -757,6 +757,7 @@ public abstract class SdDataSource {
|
|||||||
* and sets class variables for use by other functions.
|
* and sets class variables for use by other functions.
|
||||||
*/
|
*/
|
||||||
public void getStatus() {
|
public void getStatus() {
|
||||||
|
try {
|
||||||
Time tnow = new Time(Time.getCurrentTimezone());
|
Time tnow = new Time(Time.getCurrentTimezone());
|
||||||
long tdiff;
|
long tdiff;
|
||||||
tnow.setToNow();
|
tnow.setToNow();
|
||||||
@@ -790,7 +791,8 @@ public abstract class SdDataSource {
|
|||||||
|
|
||||||
// Check we have seen a fidget within the required period, or else assume a fault because watch is not being worn
|
// Check we have seen a fidget within the required period, or else assume a fault because watch is not being worn
|
||||||
if (mFidgetDetectorEnabled) {
|
if (mFidgetDetectorEnabled) {
|
||||||
if (mLastFidget == null) mLastFidget = tnow; // Initialise last fidget time on startup.
|
if (mLastFidget == null)
|
||||||
|
mLastFidget = tnow; // Initialise last fidget time on startup.
|
||||||
|
|
||||||
double accStd = calcRawDataStd(mSdData);
|
double accStd = calcRawDataStd(mSdData);
|
||||||
if (accStd > mFidgetThreshold) {
|
if (accStd > mFidgetThreshold) {
|
||||||
@@ -816,12 +818,22 @@ public abstract class SdDataSource {
|
|||||||
if (!mSdData.haveSettings) {
|
if (!mSdData.haveSettings) {
|
||||||
Log.v(TAG, "getStatus() - no settings received yet");
|
Log.v(TAG, "getStatus() - no settings received yet");
|
||||||
}
|
}
|
||||||
|
} catch(Exception e) {
|
||||||
|
Log.e(TAG,"getStatus - Exception: "+e.toString());
|
||||||
|
Log.e(TAG,e.getMessage());
|
||||||
|
mSdData.watchAppRunning = false;
|
||||||
|
mSdData.roiPower = -1;
|
||||||
|
mSdData.specPower = -1;
|
||||||
|
mSdDataReceiver.onSdDataFault(mSdData);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* faultCheck - determines alarm state based on seizure detector data SdData. Called every second.
|
* faultCheck - determines alarm state based on seizure detector data SdData. Called every second.
|
||||||
*/
|
*/
|
||||||
private void faultCheck() {
|
private void faultCheck() {
|
||||||
|
try {
|
||||||
Time tnow = new Time(Time.getCurrentTimezone());
|
Time tnow = new Time(Time.getCurrentTimezone());
|
||||||
long tdiff;
|
long tdiff;
|
||||||
tnow.setToNow();
|
tnow.setToNow();
|
||||||
@@ -850,6 +862,14 @@ public abstract class SdDataSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch(Exception e) {
|
||||||
|
Log.e(TAG,"faultCheck - Exception: "+e.toString());
|
||||||
|
Log.e(TAG,e.getMessage());
|
||||||
|
mSdData.watchAppRunning = false;
|
||||||
|
mSdData.roiPower = -1;
|
||||||
|
mSdData.specPower = -1;
|
||||||
|
mSdDataReceiver.onSdDataFault(mSdData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nnAnalysis() {
|
void nnAnalysis() {
|
||||||
|
|||||||
Reference in New Issue
Block a user