audio test
parent
4b2d7d853c
commit
6bb8b9e5a0
|
|
@ -267,7 +267,7 @@
|
||||||
{ "id": "stetho",
|
{ "id": "stetho",
|
||||||
"name": "Stethoscope",
|
"name": "Stethoscope",
|
||||||
"icon": "stetho.png",
|
"icon": "stetho.png",
|
||||||
"version":"0.015",
|
"version":"0.016",
|
||||||
"description": "Hear your heart rate",
|
"description": "Hear your heart rate",
|
||||||
"tags": "health",
|
"tags": "health",
|
||||||
"storage": [
|
"storage": [
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ function readHRM() {
|
||||||
g.setColor(1,1,1);
|
g.setColor(1,1,1);
|
||||||
g.lineTo(x,y);
|
g.lineTo(x,y);
|
||||||
freq((parseFloat(y) * 1000.0) + 500.0);
|
freq((parseFloat(y) * 1000.0) + 500.0);
|
||||||
console.log("frequency " + (parseFloat(y) * 1000.0) + 500.0);
|
console.log("frequency " + ((parseFloat(y) * 1000.0) + 500.0));
|
||||||
;
|
|
||||||
if ((max-min)>0.005) {
|
if ((max-min)>0.005) {
|
||||||
if (4*a > (min+3*max)) { // high
|
if (4*a > (min+3*max)) { // high
|
||||||
g.setColor(1,0,0);
|
g.setColor(1,0,0);
|
||||||
|
|
@ -79,4 +79,4 @@ function readHRM() {
|
||||||
if (x>239)x=0;
|
if (x>239)x=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval(readHRM,100);
|
setInterval(readHRM,50);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue