Skip to content

Commit 44ca6ca

Browse files
committed
Merge branch 'master' into DEV-569
2 parents db798cc + 859ad4a commit 44ca6ca

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ShimmerDriver/src/main/java/com/shimmerresearch/driver/ShimmerDevice.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3087,9 +3087,14 @@ public void disableAllAlgorithms(){
30873087
public boolean isECGAlgoEnabled(AbstractAlgorithm abstractAlgorithm){
30883088
SensorDetails ecgSensorDetails = getSensorDetails(Configuration.Shimmer3.SENSOR_ID.HOST_ECG);
30893089
SensorDetails respSensorDetails = getSensorDetails(Configuration.Shimmer3.SENSOR_ID.HOST_EXG_RESPIRATION);
3090-
if((ecgSensorDetails.isEnabled() || respSensorDetails.isEnabled()) && abstractAlgorithm.mAlgorithmName.contains("ECGtoHR")){
3090+
3091+
if (ecgSensorDetails!=null && ecgSensorDetails.isEnabled() && abstractAlgorithm.mAlgorithmName.contains("ECGtoHR")) {
3092+
return true;
3093+
}
3094+
if (respSensorDetails!=null && ecgSensorDetails.isEnabled() && abstractAlgorithm.mAlgorithmName.contains("ECGtoHR")) {
30913095
return true;
30923096
}
3097+
30933098
return false;
30943099
}
30953100

0 commit comments

Comments
 (0)