1
0
Fork 0

Merge pull request #2121 from splch/patch-1

Use 10-minute acceleration and charging for isWorn()
master
Gordon Williams 2022-09-12 08:25:40 +01:00 committed by GitHub
commit 674ef0aa13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -11,9 +11,7 @@ exports.isWorn = function() {
return new Promise(resolve => {
if (Bangle.isCharging())
return resolve(false);
if (E.getTemperature() > 24.625)
return resolve(true);
if (Bangle.getAccel().mag > 1.045)
if (Bangle.getHealthStatus().movement > 124)
return resolve(true);
return resolve(false);
});