OpenSeizureDetector / Android_Pebble_SD

The main OpenSeizureDetector Android App, that is published on the Android Play Store.
http://openseizuredetector.org.uk
GNU General Public License v3.0
9 stars 11 forks source link

Adaptive HR and average HR active if simple HR is active. #153

Closed pmithrandir closed 3 months ago

pmithrandir commented 3 months ago

When I enable simple HR alarm, I was getting strange alarms.

Checking the code, I think I found why. If you look here: https://github.com/OpenSeizureDetector/Android_Pebble_SD/blob/V4.2.x_3dData/app/src/main/java/uk/org/openseizuredetector/SdAlgHr.java

the method checkSimpleHr() has a if to validate if the alarm is active.

But methods checkAdaptiveHr() and checkAverageHr() don't.

That would explain why I'm getting adaptive alarms even if it's not activated. I believe one if per method should do the job.

pmithrandir commented 3 months ago

PS: I cannot do the change PR, no access on that project yet ;)

jones139 commented 3 months ago

I have given you access so you should be able to create branches and PRs now. Please note that the current development branch is V4.2.x, so make any PRs relative to that branch (Maybe I should name the branches rather than use version numbers?)

jones139 commented 3 months ago

I think you are right about not checking - we set mAdaptiveHrAlarmActive, but don't seem to actually use it for some reason. I am thinking I must have lost a commit somewhere.....