Merge pull request #190 from OpenSeizureDetector/178-v427-banglejs2-does-not-work-with-new-ble2-data-source

178 v427 banglejs2 does not work with new ble2 data source
This commit is contained in:
Graham Jones
2024-05-09 21:27:24 +01:00
committed by GitHub
5 changed files with 14 additions and 10 deletions

View File

@@ -1,6 +1,8 @@
OpenSeizureDetector Android App - Change Log
============================================
V4.2.8 - Fixed crash in export data function when using european style comma based decimal separator.
V4.2.8 - Fixed BLE2 data source to work with BangleJS2 watches
- Fixed crash in export data function when using european style comma based decimal separator.
V4.2.7 - BLE2 data source re-start fixed??
V4.2.6 - Fixed problem with notifications in Android 13
- Improved start-up checks for permissions

View File

@@ -74,16 +74,16 @@ public class FragmentSystem extends FragmentOsdBaseClass {
if (mConnection.mBound) {
if (mConnection.mSdServer.mSdDataSourceName.equals("Phone")) {
if (mConnection.mSdServer.mLogNDA)
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + "Phone" + " " + "(Demo Mode)" + "\nNDA Logging");
tv.setText(getString(R.string.ServerRunningOK) + " " + getString(R.string.DataSource) + " = " + "Phone" + " " + "(Demo Mode)" + "\nNDA Logging");
else
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + "Phone" + " " + "(Demo Mode)");
tv.setText(getString(R.string.ServerRunningOK) + " " + getString(R.string.DataSource) + " = " + "Phone" + " " + "(Demo Mode)");
tv.setBackgroundColor(warnColour);
tv.setTextColor(warnTextColour);
} else {
if (mConnection.mSdServer.mLogNDA)
tv.setText(getString(R.string.ServerRunningOK) + getString(R.string.DataSource) + " = " + mConnection.mSdServer.mSdDataSourceName + ": NDA Logging");
tv.setText(getString(R.string.ServerRunningOK) + " " + getString(R.string.DataSource) + " = " + mConnection.mSdServer.mSdDataSourceName + ": NDA Logging");
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.setTextColor(okTextColour);
}

View File

@@ -265,14 +265,14 @@ public class SdDataSourceBLE2 extends SdDataSource {
mHrChar = gattCharacteristic;
peripheral.setNotify(service.getUuid(), gattCharacteristic.getUuid(), true);
} else if (charUuidStr.equals(CHAR_OSD_ACC_DATA)) {
Log.i(TAG, "Subscribing to Acceleration Data Change Notifications");
Log.i(TAG, "Subscribing to OSD Acceleration Data Change Notifications");
peripheral.setNotify(service.getUuid(), gattCharacteristic.getUuid(), true);
mOsdChar = gattCharacteristic;
} else if (charUuidStr.equals(CHAR_OSD_STATUS)) {
Log.i(TAG, "Found OSD Status Characteristic");
mStatusChar = gattCharacteristic;
} else if (charUuidStr.equals(CHAR_OSD_BATT_DATA)) {
Log.i(TAG, "Subscribing to battery change Notifications");
Log.i(TAG, "Subscribing to OSD battery change Notifications");
peripheral.readCharacteristic(service.getUuid(), gattCharacteristic.getUuid());
peripheral.setNotify(service.getUuid(), gattCharacteristic.getUuid(), true);
mBattChar = gattCharacteristic;
@@ -360,6 +360,8 @@ public class SdDataSourceBLE2 extends SdDataSource {
BluetoothBytesParser parser = new BluetoothBytesParser(value);
String charUuidStr = characteristicUUID.toString();
Log.v(TAG,"onCharacteristicUpdate() - Characteristic "+charUuidStr+" updated");
if (charUuidStr.equals(CHAR_HEART_RATE_MEASUREMENT)) {
Log.v(TAG, String.format("%s", "HR Measurement"));
// Parse the flags

View File

@@ -2,8 +2,8 @@
<resources>
<string-array name="datasource_list">
<item>"Garmin Watch"</item>
<item>"Bluetooth Device"</item>
<item>"BLE2"</item>
<item>"BangleJS (BLE)"</item>
<item>"PineTime (BLE2)"</item>
<item>"Pebble Watch"</item>
<item>"Phone Sensor (for testing)"</item>
<item>"Network (for Wifi Alerts)"</item>

View File

@@ -3,7 +3,7 @@
<string name="app_name">OpenSeizureDetector</string>
<string name="changelog">
"\n
\nV4.2.8 - fixed crash in export data function.
\nV4.2.8 - Fixed problem with BangleJS2 not working with new BLE2 data, fixed crash in export data function, fixed (rare) crash when re-opening app from background)
\nV4.2.7 - Finally fixed BLE2 data source re-start after dropping connection?
\nV4.2.6 - Fixed issues with Android 13 notifications and BLE data source shutdown. Added support for V2.x of Garmin watch app, Added new BLE2 data source, signal strength and battery level graphs.
\nV4.2.4 - Fault alarm rather than crash if bluetooth system crashes.