diff --git a/apps/run/app.js b/apps/run/app.js index fa1d41729..2f4c44f17 100644 --- a/apps/run/app.js +++ b/apps/run/app.js @@ -25,15 +25,15 @@ let settings = Object.assign({ notify: { dist: { value: 0, - notification: [], + notifications: [], }, step: { value: 0, - notification: [], + notifications: [], }, time: { value: 0, - notification: [], + notifications: [], }, }, }, require("Storage").readJSON("run.json", 1) || {}); diff --git a/apps/run/settings.js b/apps/run/settings.js index 67f5e3d83..e0b03256c 100644 --- a/apps/run/settings.js +++ b/apps/run/settings.js @@ -20,15 +20,15 @@ notify: { dist: { increment: 0, - notification: [], + notifications: [], }, step: { increment: 0, - notification: [], + notifications: [], }, time: { increment: 0, - notification: [], + notifications: [], }, }, }, storage.readJSON(SETTINGS_FILE, 1) || {}); @@ -48,10 +48,10 @@ } } - function sampleBuzz(buzzTimes) { - buzzTimes.reduce(function (promise, buzzTime) { + function sampleBuzz(buzzPatterns) { + buzzPatterns.reduce(function (promise, buzzPattern) { return promise.then(function () { - return Bangle.buzz(buzzTime); + return Bangle.buzz(buzzPattern[0], buzzPattern[1]); }); }, Promise.resolve()); } @@ -74,7 +74,8 @@ var vibTimes = [ [], [[100, 1]], - [[500, 1]],[[500, 1], [100, 0], [500, 1]], + [[500, 1]], + [[500, 1], [100, 0], [500, 1]], [[500, 1],[100, 0], [100, 1], [100, 0], [500, 1]], [[500, 1],[100, 0],[500, 1],[100, 0],[500, 1]], ]; diff --git a/modules/exstats.js b/modules/exstats.js index 82bb40c2f..e5a1acd7d 100644 --- a/modules/exstats.js +++ b/modules/exstats.js @@ -67,17 +67,14 @@ var state = { notify: { dist: { increment: 0, - notification: [], next: 0, }, steps: { increment: 0, - notification: [], next: 0, }, time: { increment: 0, - notification: [], next: 0, }, }, @@ -277,8 +274,6 @@ exports.getStats = function(statIDs, options) { state.BPM = 0; if (stats["bpm"]) stats["bpm"].emit("changed",stats["bpm"]); } - console.log(now); - console.log(state.notify.time.next); if (state.notify.time.increment > 0 && state.notify.time.next < now) { stats["time"].emit("notify",stats["time"]); state.notify.time.next = now + state.notify.time.increment; @@ -296,8 +291,6 @@ exports.getStats = function(statIDs, options) { state.BPM = 0; state.BPMage = 0; state.notify = options.notify; - console.log("options:"); - console.log(JSON.stringify(options)); if (options.notify.dist.increment > 0) { state.notify.dist.next = state.distance + options.notify.dist.increment; } @@ -307,8 +300,6 @@ exports.getStats = function(statIDs, options) { if (options.notify.time.increment > 0) { state.notify.time.next = state.startTime + options.notify.time.increment; } - console.log("state:"); - console.log(JSON.stringify(state)); } reset(); return {