Update app.js

Heart rate event console logging reduced
master
Andy Smy 2025-05-11 16:04:29 +01:00 committed by GitHub
parent 9aae7d472f
commit ec1e97774c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -49,13 +49,14 @@ function updateHeartRate(h) {
//console.log("HRM", heartRate, (new Date()));
if(heartRate >= heartRateLimit) {
heartRateEventSeconds++;
console.log("Heart Event", heartRate, heartRateEventSeconds);
//console.log("Heart Over", heartRate, heartRateEventSeconds);
if(heartRateEventSeconds==10) console.log("Heart Event", heartRate, heartRateEventSeconds);
}
if(heartRateEventSeconds>10) {
if(heartRate < heartRateLimit) {
console.log("Heart Under (+10s allowed)", heartRate, heartRateEventSeconds);
heartRateEventSeconds = -10;
}
}
}
}