checkQrs method
Implementation
int checkQrs(double diffEcg, int index, double thres1, double thres2) {
width = 0;
if (diffEcg > thres1 || diffEcg < thres2) {
if (ind > 0) {
if (ind - index < qrsWindow) {
cnt += ind - index;
ind = index;
if (cnt > 0.04 * fs) {
if (qrsBool == true) {
width = ind - index;
} else {
width = cnt;
qrsBool = true;
}
}
} else {
cnt = 0;
ind = 0;
qrsBool = false;
}
}
ind = index;
}
return width;
}