V3.1.10 - Added user option to treat null heart rate as an alarm condition rather than a fault.
This commit is contained in:
@@ -62,6 +62,7 @@ public class SdData implements Parcelable {
|
||||
|
||||
/* Heart Rate Alarm Settings */
|
||||
public boolean mHRAlarmActive = false;
|
||||
public boolean mHRNullAsAlarm = false;
|
||||
public double mHRThreshMin = 40.0;
|
||||
public double mHRTreshMax = 150.0;
|
||||
public double rawData[];
|
||||
|
||||
@@ -322,6 +322,9 @@ public class SdDataSourceGarmin extends SdDataSource {
|
||||
mSdData.mHRAlarmActive = SP.getBoolean("HRAlarmActive", false);
|
||||
Log.v(TAG, "updatePrefs() HRAlarmActive = " + mSdData.mHRAlarmActive);
|
||||
|
||||
mSdData.mHRNullAsAlarm = SP.getBoolean("HRNullAsAlarm", false);
|
||||
Log.v(TAG, "updatePrefs() HRNullAsAlarm = " + mSdData.mHRNullAsAlarm);
|
||||
|
||||
prefStr = SP.getString("HRThreshMin", "SET_FROM_XML");
|
||||
mSdData.mHRThreshMin = (short) Integer.parseInt(prefStr);
|
||||
Log.v(TAG, "updatePrefs() HRThreshMin = " + mSdData.mHRThreshMin);
|
||||
@@ -577,9 +580,15 @@ public class SdDataSourceGarmin extends SdDataSource {
|
||||
/* Check Heart Rate against alarm settings */
|
||||
if (mSdData.mHRAlarmActive) {
|
||||
if (mSdData.mHR < 0) {
|
||||
Log.i(TAG,"Heart Rate Fault (HR<0)");
|
||||
mSdData.mHRFaultStanding = true;
|
||||
mSdData.mHRAlarmStanding = false;
|
||||
if (mSdData.mHRNullAsAlarm) {
|
||||
Log.i(TAG, "Heart Rate Null - Alarming");
|
||||
mSdData.mHRFaultStanding = false;
|
||||
mSdData.mHRAlarmStanding = true;
|
||||
} else {
|
||||
Log.i(TAG, "Heart Rate Fault (HR<0)");
|
||||
mSdData.mHRFaultStanding = true;
|
||||
mSdData.mHRAlarmStanding = false;
|
||||
}
|
||||
}
|
||||
else if ((mSdData.mHR > mSdData.mHRTreshMax) || (mSdData.mHR < mSdData.mHRThreshMin)) {
|
||||
Log.i(TAG, "Heart Rate Abnormal - " + mSdData.mHR + " bpm");
|
||||
|
||||
@@ -413,7 +413,8 @@ public class StartupActivity extends Activity {
|
||||
+ "\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.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.10 - Provided a user option to treat a null heart rate as a fault or an alarm condition"
|
||||
);
|
||||
// This makes the links display as links, but they do not respond to clicks for some reason...
|
||||
Linkify.addLinks(s, Linkify.ALL);
|
||||
@@ -449,6 +450,7 @@ public class StartupActivity extends Activity {
|
||||
+ "\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.10 - Provided a user option to treat a null heart rate as a fault or an alarm condition"
|
||||
+ "\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