merging
This commit is contained in:
@@ -80,7 +80,7 @@ public class BLEScanActivity extends ListActivity {
|
||||
// Stops scanning after 10 seconds.
|
||||
private static final long SCAN_PERIOD = 10000;
|
||||
|
||||
private int okColour = Color.BLUE;
|
||||
private int okColour = Color.parseColor("#9B59B6");
|
||||
private int warnColour = Color.MAGENTA;
|
||||
private int alarmColour = Color.RED;
|
||||
private int okTextColour = Color.WHITE;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class FragmentOsdBaseClass extends Fragment {
|
||||
Timer mUiTimer;
|
||||
protected View mRootView;
|
||||
|
||||
protected int okColour = Color.BLUE;
|
||||
protected int okColour = Color.parseColor("#9B59B6");
|
||||
protected int warnColour = Color.MAGENTA;
|
||||
protected int alarmColour = Color.RED;
|
||||
protected int okTextColour = Color.WHITE;
|
||||
|
||||
@@ -73,7 +73,7 @@ import java.util.TimerTask;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
static final String TAG = "MainActivity";
|
||||
private int okColour = Color.BLUE;
|
||||
private int okColour = Color.parseColor("#9B59B6");
|
||||
private int warnColour = Color.MAGENTA;
|
||||
private int alarmColour = Color.RED;
|
||||
private int okTextColour = Color.WHITE;
|
||||
|
||||
@@ -37,7 +37,7 @@ import java.util.TimerTask;
|
||||
|
||||
public class MainActivity2 extends AppCompatActivity {
|
||||
private String TAG = "MainActivity2";
|
||||
private int okColour = Color.BLUE;
|
||||
private int okColour = Color.parseColor("#9B59B6");
|
||||
private int warnColour = Color.MAGENTA;
|
||||
private int alarmColour = Color.RED;
|
||||
private int okTextColour = Color.WHITE;
|
||||
|
||||
@@ -146,6 +146,7 @@ public class SdData implements Parcelable {
|
||||
// 2 = contact detected
|
||||
// 3 = reserved/unknown
|
||||
public int mHrSensorContactStatus = -1;
|
||||
public long mHRTimestamp = System.currentTimeMillis();
|
||||
|
||||
public boolean mO2SatAlarmStanding = false;
|
||||
public boolean mO2SatFaultStanding = false;
|
||||
|
||||
@@ -363,6 +363,7 @@ public class SdDataSourceBLE2 extends SdDataSource {
|
||||
Log.v(TAG,"onCharacteristicUpdate() - Characteristic "+charUuidStr+" updated");
|
||||
|
||||
if (charUuidStr.equals(CHAR_HEART_RATE_MEASUREMENT)) {
|
||||
|
||||
Log.v(TAG, "HR Measurement");
|
||||
|
||||
int flags = parser.getUInt8();
|
||||
@@ -395,6 +396,17 @@ public class SdDataSourceBLE2 extends SdDataSource {
|
||||
+ ", stored=" + mSdData.mHR
|
||||
+ ", contactStatus=" + sensorContactStatus
|
||||
+ ", notificationCount=" + mSdData.mHrNotificationCount);
|
||||
Log.v(TAG, String.format("%s", "HR Measurement"));
|
||||
// Parse the flags
|
||||
int flags = parser.getUInt8();
|
||||
final int unit = flags & 0x01;
|
||||
final int sensorContactStatus = (flags & 0x06) >> 1;
|
||||
final boolean energyExpenditurePresent = (flags & 0x08) > 0;
|
||||
final boolean rrIntervalPresent = (flags & 0x10) > 0;
|
||||
// Parse heart rate
|
||||
mSdData.mHR = (unit == 0) ? parser.getUInt8() : parser.getUInt16();
|
||||
mSdData.mHRTimestamp = System.currentTimeMillis();
|
||||
Log.d(TAG,"Received HR="+mSdData.mHR);
|
||||
|
||||
} else if (charUuidStr.equals(CHAR_OSD_ACC_DATA)
|
||||
|| charUuidStr.equals(CHAR_INFINITIME_ACC_DATA)) {
|
||||
|
||||
@@ -95,6 +95,8 @@ public class SensorValidationActivity extends AppCompatActivity {
|
||||
private long currentHrLastUpdateMillisInSecond = 0;
|
||||
private int currentHrRawValue = -1;
|
||||
private int currentHrSensorContactStatus = -1;
|
||||
private long lastHrTimestamp = 0;
|
||||
private final ArrayList<HeartRatePoint> hrPoints = new ArrayList<>();
|
||||
|
||||
private long hrStartNotificationCount = 0;
|
||||
private long hrLastSeenNotificationCount = -1;
|
||||
@@ -558,7 +560,18 @@ private final ArrayList<HeartRatePoint> hrPoints = new ArrayList<>();
|
||||
currentHrLastSeenNotificationCount = hrLastSeenNotificationCount;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
SdData sdData = mConnection.mSdServer.mSdData;
|
||||
=======
|
||||
long hrTs = mConnection.mSdServer.mSdData.mHRTimestamp;
|
||||
double hr = mConnection.mSdServer.mSdData.mHR;
|
||||
currentHrReadCount++;
|
||||
if (hr >= 0.0 && hrTs != lastHrTimestamp) {
|
||||
lastHrTimestamp = hrTs;
|
||||
currentHrSum += hr;
|
||||
currentHrValidCount++;
|
||||
}
|
||||
>>>>>>> c175730 (Cosmetic changes)
|
||||
|
||||
currentHrReadCount++;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ import java.util.TimerTask;
|
||||
*/
|
||||
public class StartupActivity extends AppCompatActivity {
|
||||
private static String TAG = "StartupActivity";
|
||||
private int okColour = Color.BLUE;
|
||||
private int okColour = Color.parseColor("#9B59B6");
|
||||
private int warnColour = Color.MAGENTA;
|
||||
private int alarmColour = Color.RED;
|
||||
private int okTextColour = Color.WHITE;
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
<shape>
|
||||
<corners android:radius="10dp"/>
|
||||
<gradient
|
||||
android:startColor="#0000ff"
|
||||
android:startColor="#9B59B6"
|
||||
android:centerColor="#8080ff"
|
||||
android:centerY="0.5"
|
||||
android:endColor="#0000ff"
|
||||
android:endColor="#9B59B6"
|
||||
android:angle="270"
|
||||
/>
|
||||
</shape>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -139,7 +139,7 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorPrimary">#9B59B6</color>
|
||||
<color name="colorPrimaryDark">#9B59B6</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
<color name="okBackgroundColor">#0000ff</color>
|
||||
<color name="okBackgroundColor">#9B59B6</color>
|
||||
<color name="okTextColor">#ffffff</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">OpenSeizureDetector</string>
|
||||
<string name="app_name">FLOGA</string>
|
||||
<string name="changelog">
|
||||
"\n
|
||||
\nV4.3.1 - Fixed user interface issues on Android-15 and Android-16
|
||||
|
||||
Reference in New Issue
Block a user