Merge branch 'V4.2.x' into V4.2.x_3dData

This commit is contained in:
Graham Jones
2024-03-22 16:13:53 +00:00
3 changed files with 14 additions and 8 deletions

View File

@@ -1,6 +1,8 @@
OpenSeizureDetector Android App - Change Log OpenSeizureDetector Android App - Change Log
============================================ ============================================
V4.2.3c - Uses 3d accelerometer data to calculate magnitude if vector magnitude is not sent from data source. V4.2.3c - Uses 3d accelerometer data to calculate magnitude if vector magnitude is not sent from data source.
V4.2.3b - fixed latched alarms (Issue #146)
V4.2.2 - Added support for PineTime OSD Status reporting. V4.2.2 - Added support for PineTime OSD Status reporting.
V4.2.1 - Added support for PineTime wathes using the Bluetooth Data Source V4.2.1 - Added support for PineTime wathes using the Bluetooth Data Source
V4.1.0 - Added experimental support for neural network based seizure detector. V4.1.0 - Added experimental support for neural network based seizure detector.

Binary file not shown.

View File

@@ -675,7 +675,7 @@ public class SdServer extends Service implements SdDataReceiver {
mUtil.showToast(getString(R.string.SMSAlarmDisabledNotSendingMsg)); mUtil.showToast(getString(R.string.SMSAlarmDisabledNotSendingMsg));
Log.v(TAG, "mSMSAlarm is false - not sending"); Log.v(TAG, "mSMSAlarm is false - not sending");
} }
Log.v(TAG,"calling startLatchTimer()");
startLatchTimer(); startLatchTimer();
} }
// Handle fall alarm // Handle fall alarm
@@ -782,7 +782,6 @@ public class SdServer extends Service implements SdDataReceiver {
} }
} }
// Fault // Fault
if ((sdData.alarmState) == 4 || (sdData.alarmState == 7) || (sdData.mHRFaultStanding) || (sdData.mHrFrozenFaultStanding)) { if ((sdData.alarmState) == 4 || (sdData.alarmState == 7) || (sdData.mHRFaultStanding) || (sdData.mHrFrozenFaultStanding)) {
sdData.alarmPhrase = "FAULT"; sdData.alarmPhrase = "FAULT";
@@ -1007,15 +1006,20 @@ public class SdServer extends Service implements SdDataReceiver {
private void startLatchTimer() { private void startLatchTimer() {
if (mLatchAlarms) { if (mLatchAlarms) {
if (mLatchAlarmTimer != null) { if (mLatchAlarmTimer != null) {
Log.v(TAG, "startLatchTimer -timer already running - cancelling it"); Log.i(TAG, "startLatchTimer -timer already running - cancelling it");
mLatchAlarmTimer.cancel(); mLatchAlarmTimer.cancel();
mLatchAlarmTimer = null; mLatchAlarmTimer = null;
} }
Log.v(TAG, "startLatchTimer() - starting alarm latch release timer to time out in " + mLatchAlarmPeriod + " sec"); Log.i(TAG, "startLatchTimer() - starting alarm latch release timer to time out in " + mLatchAlarmPeriod + " sec");
// set timer to timeout after mLatchAlarmPeriod, and Tick() function to be called every second. // set timer to timeout after mLatchAlarmPeriod, and Tick() function to be called every second.
// We need to start the timer on the UI thread to get it to work for some reason - I don't know why!
runOnUiThread(new Runnable() {
public void run() {
mLatchAlarmTimer = mLatchAlarmTimer =
new LatchAlarmTimer(mLatchAlarmPeriod * 1000, 1000); new LatchAlarmTimer(mLatchAlarmPeriod * 1000, 1000);
mLatchAlarmTimer.start(); mLatchAlarmTimer.start();
}
});
} else { } else {
Log.v(TAG, "startLatchTimer() - Latch Alarms disabled - not doing anything"); Log.v(TAG, "startLatchTimer() - Latch Alarms disabled - not doing anything");
} }
@@ -1457,7 +1461,7 @@ public class SdServer extends Service implements SdDataReceiver {
// called after startTime ms. // called after startTime ms.
@Override @Override
public void onFinish() { public void onFinish() {
Log.v(TAG, "LatchAlarmTimer.onFinish()"); Log.i(TAG, "LatchAlarmTimer.onFinish()");
// Do the equivalent of accept alarm push button. // Do the equivalent of accept alarm push button.
acceptAlarm(); acceptAlarm();
} }