From 67236ca53d7d386d219d089515cf35b98d1c6c2f Mon Sep 17 00:00:00 2001 From: Jay Boehm Date: Thu, 26 May 2016 23:02:36 -0400 Subject: [PATCH 1/3] Create README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..eeedd04 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +A small webapp to read the sensors provided on modern mobile devices. + +On Android use the Firefox broswer. From 5fcf323c3e8ec85b1b6552d481ce539e93fedc40 Mon Sep 17 00:00:00 2001 From: Jay Boehm Date: Sat, 28 May 2016 21:57:37 -0400 Subject: [PATCH 2/3] fix light not showing brightened, only dimmed fixes the issue because the percent diff could be a negative value and -1000% isn't larger than the default 45 threshold. making the percent diff an absolute number means -1000% diff becomes 1000% diff and that is clearly larger than the 45 threshold. --- sources/ambientLight.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/ambientLight.js b/sources/ambientLight.js index 6c86f1e..bd1e9d4 100644 --- a/sources/ambientLight.js +++ b/sources/ambientLight.js @@ -26,7 +26,7 @@ var ambientLightSource = (function(window) { lastVal = e.value; if (eventCounter == 5) { - var percentDiff = percentDifference(lastVal, e.value); + var percentDiff = Math.abs(percentDifference(lastVal, e.value)); //console.log('devicelight', lastVal, e.value, percentDiff) From f95d26eec23321a6231102f2ba5fdf80eaac5146 Mon Sep 17 00:00:00 2001 From: Jay Boehm Date: Sat, 28 May 2016 22:00:08 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eeedd04..8eebf63 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ A small webapp to read the sensors provided on modern mobile devices. -On Android use the Firefox broswer. +On Android use the Firefox browser.