V3.11 - Fixed heart rate reporting in network datasource
This commit is contained in:
@@ -64,7 +64,7 @@ public class SdData implements Parcelable {
|
||||
public boolean mHRAlarmActive = false;
|
||||
public boolean mHRNullAsAlarm = false;
|
||||
public double mHRThreshMin = 40.0;
|
||||
public double mHRTreshMax = 150.0;
|
||||
public double mHRThreshMax = 150.0;
|
||||
public double rawData[];
|
||||
int mNsamp = 0;
|
||||
|
||||
@@ -120,7 +120,13 @@ public class SdData implements Parcelable {
|
||||
alarmPhrase = jo.optString("alarmPhrase");
|
||||
alarmThresh = jo.optInt("alarmThresh");
|
||||
alarmRatioThresh = jo.optInt("alarmRatioThresh");
|
||||
mHRAlarmActive=jo.optBoolean("hrAlarmActive");
|
||||
mHRThreshMin = jo.optDouble("hrThreshMin");
|
||||
mHRThreshMax = jo.optDouble("hrThreshMax");
|
||||
mHR = jo.optDouble("hr");
|
||||
if (mHR>=0.0) {
|
||||
mHRAlarmActive = true;
|
||||
}
|
||||
JSONArray specArr = jo.optJSONArray("simpleSpec");
|
||||
for (int i = 0; i < specArr.length(); i++) {
|
||||
simpleSpec[i] = specArr.optInt(i);
|
||||
@@ -169,6 +175,9 @@ public class SdData implements Parcelable {
|
||||
jsonObj.put("alarmFreqMax",alarmFreqMax);
|
||||
jsonObj.put("alarmThresh", alarmThresh);
|
||||
jsonObj.put("alarmRatioThresh", alarmRatioThresh);
|
||||
jsonObj.put("hrAlarmActive", mHRAlarmActive);
|
||||
jsonObj.put("hrThreshMin",mHRThreshMin);
|
||||
jsonObj.put("hrThreshMax", mHRThreshMax);
|
||||
jsonObj.put("hr",mHR);
|
||||
JSONArray arr = new JSONArray();
|
||||
for (int i = 0; i < simpleSpec.length; i++) {
|
||||
|
||||
@@ -330,8 +330,8 @@ public class SdDataSourceGarmin extends SdDataSource {
|
||||
Log.v(TAG, "updatePrefs() HRThreshMin = " + mSdData.mHRThreshMin);
|
||||
|
||||
prefStr = SP.getString("HRThreshMax", "SET_FROM_XML");
|
||||
mSdData.mHRTreshMax = (short) Integer.parseInt(prefStr);
|
||||
Log.v(TAG, "updatePrefs() HRThreshMax = " + mSdData.mHRTreshMax);
|
||||
mSdData.mHRThreshMax = (short) Integer.parseInt(prefStr);
|
||||
Log.v(TAG, "updatePrefs() HRThreshMax = " + mSdData.mHRThreshMax);
|
||||
|
||||
} else {
|
||||
Log.v(TAG, "updatePrefs() - prefStr is null - WHY????");
|
||||
@@ -590,7 +590,7 @@ public class SdDataSourceGarmin extends SdDataSource {
|
||||
mSdData.mHRAlarmStanding = false;
|
||||
}
|
||||
}
|
||||
else if ((mSdData.mHR > mSdData.mHRTreshMax) || (mSdData.mHR < mSdData.mHRThreshMin)) {
|
||||
else if ((mSdData.mHR > mSdData.mHRThreshMax) || (mSdData.mHR < mSdData.mHRThreshMin)) {
|
||||
Log.i(TAG, "Heart Rate Abnormal - " + mSdData.mHR + " bpm");
|
||||
mSdData.mHRFaultStanding = false;
|
||||
mSdData.mHRAlarmStanding = true;
|
||||
|
||||
@@ -408,13 +408,9 @@ public class StartupActivity extends Activity {
|
||||
+ "http://openseizuredetector.org.uk, or the app Facebook page at https://www.facebook.com/openseizuredetector. "
|
||||
+ "so I can get in touch if necessary.\nThank you! Graham \ngraham@openseizuredetector.org.uk "
|
||||
+ "\n\nChanges in this version:"
|
||||
+ "\n- V3.1.0 - Added fall detection algorithm into Garmin/Fitbit Data Source "
|
||||
+ "\n V3.1.3 - Added delay to SMS sending to give the user chance to cancel a false alarm."
|
||||
+ "\n V3.1.5 - Added repeat alarm beeps during SMS delay to alert user.."
|
||||
+ "\n V3.1.6 - Made Cancel Audible button inhibit sending SMS alarms as well as audible beeps"
|
||||
+ "\n V3.1.8 - Added READ_PHONE_STATE permission, which seems to be needed for some phones"
|
||||
+ "\n V3.1.9 - Fixed issue with Garmin Seizure Detector not producing warnings. Added fault pips for missing heart rate data if heart rate alarm active"
|
||||
+ "\n V3.1.11 - Fixed issue that Nework data source did not display heart rate data"
|
||||
+ "\n V3.1.10 - Provided a user option to treat a null heart rate as a fault or an alarm condition"
|
||||
+ "\n V3.1.9 - Fixed issue with Garmin Seizure Detector not producing warnings. Added fault pips for missing heart rate data if heart rate alarm active"
|
||||
);
|
||||
// This makes the links display as links, but they do not respond to clicks for some reason...
|
||||
Linkify.addLinks(s, Linkify.ALL);
|
||||
@@ -444,13 +440,9 @@ public class StartupActivity extends Activity {
|
||||
+ "http://openseizuredetector.org.uk, or the app Facebook page at https://www.facebook.com/openseizuredetector. "
|
||||
+ "so I can get in touch if necessary.\nThank you! Graham \ngraham@openseizuredetector.org.uk "
|
||||
+ "\n\nChanges in this version:"
|
||||
+ "\n- V3.1.0 - Added fall detection algorithm into Garmin/Fitbit Data Source "
|
||||
+ "\n V3.1.3 - Added delay to SMS sending to give the user chance to cancel a false alarm."
|
||||
+ "\n V3.1.5 - Added repeat alarm beeps during SMS delay to alert user.."
|
||||
+ "\n V3.1.6 - Made Cancel Audible button inhibit sending SMS alarms as well as audible beeps"
|
||||
+ "\n V3.1.8 - Added READ_PHONE_STATE permission, which seems to be needed for some phones"
|
||||
+ "\n V3.1.9 - Fixed issue with Garmin Seizure Detector not producing warnings. Added faut pips for missing heart rate data if heart rate alarm active"
|
||||
+ "\n V3.1.11 - Fixed issue that Nework data source did not display heart rate data"
|
||||
+ "\n V3.1.10 - Provided a user option to treat a null heart rate as a fault or an alarm condition"
|
||||
+ "\n V3.1.9 - Fixed issue with Garmin Seizure Detector not producing warnings. Added fault pips for missing heart rate data if heart rate alarm active"
|
||||
+ "\n "
|
||||
);
|
||||
// This makes the links display as links, but they do not respond to clicks for some reason...
|
||||
|
||||
Reference in New Issue
Block a user