diff --git a/SleepLib/calcs.cpp b/SleepLib/calcs.cpp index 78761bb1..91d991ef 100644 --- a/SleepLib/calcs.cpp +++ b/SleepLib/calcs.cpp @@ -132,6 +132,7 @@ int CalcRespRate::filterFlow(EventList *in, EventList *out, EventList *tv, Event QVector TV; QVector breaths_start; int lasti=0; + long tmp32; for (i=0;i0) { z2=i; - len=abs(u2-u1); + tmp32=u2-u1; + len=abs(tmp32); if (tv) { // && z1>0) { // Tidal Volume Calculations EventDataType t=0; for (int g=z1;g0) { z1=i; - len=abs(l2-l1); + tmp32=l2-l1; + len=abs(tmp32); if (tv) { // Average the other half of the breath to increase accuracy. EventDataType t=0;