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" <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="139" android:versionCode="139"
android:versionName="4.2.6c"> android:versionName="4.2.6d">
<!-- android:allowBackup="false" --> <!-- android:allowBackup="false" -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/> <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

View File

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