Disabled data source re-start on FAULT because it was resulting in multiple notifications to the accelerometer characteristic which meant it was receiving duplicate values which was breaking the analysis - it is better to have a FAULT than bad analysis!

This commit is contained in:
Graham Jones
2024-04-13 20:15:26 +01:00
parent 2c58f0130f
commit 1308e6cbef
2 changed files with 14 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="139"
android:versionName="4.2.6c">
android:versionName="4.2.6d">
<!-- android:allowBackup="false" -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

View File

@@ -821,15 +821,19 @@ public class SdServer extends Service implements SdDataReceiver {
// flag.
if (mFaultTimerCompleted) {
faultWarningBeep();
// Re-start the data source to see if that fixes it
Log.w(TAG,"FAULT - stopping data source");
mSdDataSource.stop();
mHandler.postDelayed(new Runnable() {
public void run() {
Log.w(TAG,"FAULT - restarting data source");
mSdDataSource.start();
}
}, 10000);
// Disable the data-source re-start for now because it was messing up BLE2 data source by ending up with multiple
// notifications for the same data when it reconnects.
if (false) {
// Re-start the data source to see if that fixes it
Log.w(TAG, "FAULT - stopping data source");
mSdDataSource.stop();
mHandler.postDelayed(new Runnable() {
public void run() {
Log.w(TAG, "FAULT - restarting data source");
mSdDataSource.start();
}
}, 10000);
}
} else {
startFaultTimer();
Log.v(TAG, "onSdDataFault() - starting Fault Timer");