V4.1.2b - V0.23 of CNN
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="uk.org.openseizuredetector"
|
package="uk.org.openseizuredetector"
|
||||||
android:versionCode="114"
|
android:versionCode="114"
|
||||||
android:versionName="4.1.2a">
|
android:versionName="4.1.2b">
|
||||||
<!-- 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" />
|
||||||
|
|||||||
BIN
app/src/main/assets/cnn_v0.23.tflite
Normal file
BIN
app/src/main/assets/cnn_v0.23.tflite
Normal file
Binary file not shown.
@@ -231,7 +231,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (actionStr.equals("showDataSharingDialog")) {
|
if (actionStr.equals("showDataSharingDialog")) {
|
||||||
showDataSharingDialog();
|
showDataSharingDialog();
|
||||||
}
|
}
|
||||||
Log.i(TAG, "onNewIntent - extra actionstr is "+actionStr);
|
Log.i(TAG, "onNewIntent - extra actionstr is " + actionStr);
|
||||||
} else {
|
} else {
|
||||||
Log.i(TAG, "onNewIntent - extra actionstr is null - starting normally");
|
Log.i(TAG, "onNewIntent - extra actionstr is null - starting normally");
|
||||||
}
|
}
|
||||||
@@ -517,14 +517,14 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
if (mConnection.mBound) {
|
if (mConnection.mBound) {
|
||||||
if (mConnection.mSdServer.mSdDataSourceName.equals("Phone")) {
|
if (mConnection.mSdServer.mSdDataSourceName.equals("Phone")) {
|
||||||
if (mConnection.mSdServer.mLogNDA)
|
if (mConnection.mSdServer.mLogNDA)
|
||||||
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + "Phone" + "\n" + "(Demo Mode)"+"\nNDA Logging");
|
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + "Phone" + "\n" + "(Demo Mode)" + "\nNDA Logging");
|
||||||
else
|
else
|
||||||
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + "Phone" + "\n" + "(Demo Mode)");
|
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + "Phone" + "\n" + "(Demo Mode)");
|
||||||
tv.setBackgroundColor(warnColour);
|
tv.setBackgroundColor(warnColour);
|
||||||
tv.setTextColor(warnTextColour);
|
tv.setTextColor(warnTextColour);
|
||||||
} else {
|
} else {
|
||||||
if (mConnection.mSdServer.mLogNDA)
|
if (mConnection.mSdServer.mLogNDA)
|
||||||
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + mConnection.mSdServer.mSdDataSourceName+"\nNDA Logging");
|
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + mConnection.mSdServer.mSdDataSourceName + "\nNDA Logging");
|
||||||
else
|
else
|
||||||
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + mConnection.mSdServer.mSdDataSourceName);
|
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + mConnection.mSdServer.mSdDataSourceName);
|
||||||
tv.setBackgroundColor(okColour);
|
tv.setBackgroundColor(okColour);
|
||||||
@@ -645,23 +645,23 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
// Pebble Connected Phrase - use for HR if active instead.
|
// Pebble Connected Phrase - use for HR if active instead.
|
||||||
tv = (TextView) findViewById(R.id.pebbleTv);
|
tv = (TextView) findViewById(R.id.pebbleTv);
|
||||||
//if (mConnection.mSdServer.mSdData.mHRAlarmActive) {
|
//if (mConnection.mSdServer.mSdData.mHRAlarmActive) {
|
||||||
if (mConnection.mSdServer.mSdData.mO2Sat>0) {
|
if (mConnection.mSdServer.mSdData.mO2Sat > 0) {
|
||||||
tv.setText(getString(R.string.HR_Equals) + mConnection.mSdServer.mSdData.mHR + " bpm\n"
|
tv.setText(getString(R.string.HR_Equals) + mConnection.mSdServer.mSdData.mHR + " bpm\n"
|
||||||
+ "O2 Sat = " + mConnection.mSdServer.mSdData.mO2Sat + "%");
|
+ "O2 Sat = " + mConnection.mSdServer.mSdData.mO2Sat + "%");
|
||||||
} else {
|
} else {
|
||||||
tv.setText(getString(R.string.HR_Equals) + mConnection.mSdServer.mSdData.mHR + " bpm\n"
|
tv.setText(getString(R.string.HR_Equals) + mConnection.mSdServer.mSdData.mHR + " bpm\n"
|
||||||
+ "O2 Sat = ---%");
|
+ "O2 Sat = ---%");
|
||||||
}
|
}
|
||||||
if (mConnection.mSdServer.mSdData.mHRAlarmStanding || mConnection.mSdServer.mSdData.mO2SatAlarmStanding) {
|
if (mConnection.mSdServer.mSdData.mHRAlarmStanding || mConnection.mSdServer.mSdData.mO2SatAlarmStanding) {
|
||||||
tv.setBackgroundColor(alarmColour);
|
tv.setBackgroundColor(alarmColour);
|
||||||
tv.setTextColor(alarmTextColour);
|
tv.setTextColor(alarmTextColour);
|
||||||
} else if (mConnection.mSdServer.mSdData.mHRFaultStanding || mConnection.mSdServer.mSdData.mO2SatFaultStanding) {
|
} else if (mConnection.mSdServer.mSdData.mHRFaultStanding || mConnection.mSdServer.mSdData.mO2SatFaultStanding) {
|
||||||
tv.setBackgroundColor(warnColour);
|
tv.setBackgroundColor(warnColour);
|
||||||
tv.setTextColor(warnTextColour);
|
tv.setTextColor(warnTextColour);
|
||||||
} else {
|
} else {
|
||||||
tv.setBackgroundColor(okColour);
|
tv.setBackgroundColor(okColour);
|
||||||
tv.setTextColor(okTextColour);
|
tv.setTextColor(okTextColour);
|
||||||
}
|
}
|
||||||
/*} else {
|
/*} else {
|
||||||
if (mConnection.mSdServer.mSdData.watchConnected) {
|
if (mConnection.mSdServer.mSdData.watchConnected) {
|
||||||
tv.setText(R.string.HRAlarmOff);
|
tv.setText(R.string.HRAlarmOff);
|
||||||
@@ -706,9 +706,15 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
// We start off with it set to OK, then check for several different abnormal conditions
|
// We start off with it set to OK, then check for several different abnormal conditions
|
||||||
// in turn - the last one that is active is the one that is displayed.
|
// in turn - the last one that is active is the one that is displayed.
|
||||||
tv = (TextView) findViewById(R.id.remoteDbTv);
|
tv = (TextView) findViewById(R.id.remoteDbTv);
|
||||||
tv.setText(getString(R.string.data_sharing_status)
|
if (mConnection.mSdServer.mLogNDA)
|
||||||
+ ": "
|
tv.setText(getString(R.string.data_sharing_status)
|
||||||
+ getString(R.string.data_sharing_setup_ok));
|
+ ": "
|
||||||
|
+ getString(R.string.data_sharing_setup_ok)
|
||||||
|
+ ": " + "NDA Logging");
|
||||||
|
else
|
||||||
|
tv.setText(getString(R.string.data_sharing_status)
|
||||||
|
+ ": "
|
||||||
|
+ getString(R.string.data_sharing_setup_ok));
|
||||||
tv.setBackgroundColor(okColour);
|
tv.setBackgroundColor(okColour);
|
||||||
tv.setTextColor(okTextColour);
|
tv.setTextColor(okTextColour);
|
||||||
|
|
||||||
@@ -784,13 +790,13 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
specRatio = 0;
|
specRatio = 0;
|
||||||
|
|
||||||
long pSeizurePc;
|
long pSeizurePc;
|
||||||
pSeizurePc = (long)(mConnection.mSdServer.mSdData.mPseizure * 100);
|
pSeizurePc = (long) (mConnection.mSdServer.mSdData.mPseizure * 100);
|
||||||
Log.d(TAG,"pSeizurePc="+pSeizurePc+", mPseizure="+mConnection.mSdServer.mSdData.mPseizure);
|
Log.d(TAG, "pSeizurePc=" + pSeizurePc + ", mPseizure=" + mConnection.mSdServer.mSdData.mPseizure);
|
||||||
((TextView) findViewById(R.id.powerTv)).setText(getString(R.string.PowerEquals) + mConnection.mSdServer.mSdData.roiPower +
|
((TextView) findViewById(R.id.powerTv)).setText(getString(R.string.PowerEquals) + mConnection.mSdServer.mSdData.roiPower +
|
||||||
" (" + getString(R.string.Threshold) + "=" + mConnection.mSdServer.mSdData.alarmThresh + ")");
|
" (" + getString(R.string.Threshold) + "=" + mConnection.mSdServer.mSdData.alarmThresh + ")");
|
||||||
((TextView) findViewById(R.id.spectrumTv)).setText(getString(R.string.SpectrumRatioEquals) + specRatio +
|
((TextView) findViewById(R.id.spectrumTv)).setText(getString(R.string.SpectrumRatioEquals) + specRatio +
|
||||||
" (" + getString(R.string.Threshold) + "=" + mConnection.mSdServer.mSdData.alarmRatioThresh + ")");
|
" (" + getString(R.string.Threshold) + "=" + mConnection.mSdServer.mSdData.alarmRatioThresh + ")");
|
||||||
((TextView) findViewById(R.id.pSeizureTv)).setText("Seizure Probability = "+pSeizurePc+"%");
|
((TextView) findViewById(R.id.pSeizureTv)).setText("Seizure Probability = " + pSeizurePc + "%");
|
||||||
|
|
||||||
ProgressBar pb;
|
ProgressBar pb;
|
||||||
Drawable pbDrawable;
|
Drawable pbDrawable;
|
||||||
@@ -830,7 +836,6 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
pb.setProgressDrawable(pbDrawable);
|
pb.setProgressDrawable(pbDrawable);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Fault Conditions - We override the values in the UI because we do not know
|
// Fault Conditions - We override the values in the UI because we do not know
|
||||||
// if the stored ones are correct or not with a fault present.
|
// if the stored ones are correct or not with a fault present.
|
||||||
if ((mConnection.mSdServer.mSdData.alarmState == 4) ||
|
if ((mConnection.mSdServer.mSdData.alarmState == 4) ||
|
||||||
@@ -1074,24 +1079,24 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setPositiveButton("Privacy Policy", new DialogInterface.OnClickListener() {
|
builder.setPositiveButton("Privacy Policy", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
String url = OsdUtil.PRIVACY_POLICY_URL;
|
String url = OsdUtil.PRIVACY_POLICY_URL;
|
||||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||||
i.setData(Uri.parse(url));
|
i.setData(Uri.parse(url));
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton("Data Sharing", new DialogInterface.OnClickListener() {
|
builder.setNegativeButton("Data Sharing", new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
String url = OsdUtil.DATA_SHARING_URL;
|
String url = OsdUtil.DATA_SHARING_URL;
|
||||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||||
i.setData(Uri.parse(url));
|
i.setData(Uri.parse(url));
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
dialog.cancel();
|
dialog.cancel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setView(aboutView);
|
builder.setView(aboutView);
|
||||||
builder.create();
|
builder.create();
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class SdAlgNn {
|
public class SdAlgNn {
|
||||||
private final static String TAG = "SdAlgNn";
|
private final static String TAG = "SdAlgNn";
|
||||||
private final static String MODEL_PATH = "cnn_v0.22.tflite";
|
private final static String MODEL_PATH = "cnn_v0.23.tflite";
|
||||||
private String mUrlBase = "https://osdApi.ddns.net";
|
private String mUrlBase = "https://osdApi.ddns.net";
|
||||||
private InterpreterApi interpreter;
|
private InterpreterApi interpreter;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<string name="app_name">OpenSeizureDetector</string>
|
<string name="app_name">OpenSeizureDetector</string>
|
||||||
<string name="changelog">
|
<string name="changelog">
|
||||||
"\n
|
"\n
|
||||||
\nV4.1.0 - Added Machine Learning (Artificial Intelligence) Detection Algorithm Option (CNN V0.12)
|
\nV4.1.2 - Added Machine Learning (Artificial Intelligence) Detection Algorithm Option (CNN V0.23) and 'Normal Daily Activity (NDA) logging function
|
||||||
\nV4.0.7 - Improvements to Data Sharing data log manager screen.
|
\nV4.0.7 - Improvements to Data Sharing data log manager screen.
|
||||||
- Introduced the <b>Data Sharing</b> feature to allow users to share their seizure and false alarm data
|
- Introduced the <b>Data Sharing</b> feature to allow users to share their seizure and false alarm data
|
||||||
with researchers to help improve the system.<br/>
|
with researchers to help improve the system.<br/>
|
||||||
|
|||||||
Reference in New Issue
Block a user