From 84a8df4a78b4ef15f3267fbee9778b1d02157e97 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 21 Jun 2016 15:25:29 -0400 Subject: [PATCH] Make seq-ui module strict --- app/lib/capture-report.js | 7 +------ app/lib/seq-ui.js | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/lib/capture-report.js b/app/lib/capture-report.js index af8cd38..91724af 100644 --- a/app/lib/capture-report.js +++ b/app/lib/capture-report.js @@ -11,6 +11,7 @@ capture.store = { capture.start = function (first) { 'use strict'; + //reset storage capture.store.events = []; capture.store.start = +new Date(); }; @@ -104,21 +105,15 @@ capture.test = function () { capture.init = function () { 'use strict'; eventEmitter.on('arduino_send', function (cmd) { - console.log(cmd); if (capture.active && cmd.trim() === 'p') { - if (capture.store.start === 0) { - capture.start(); - } capture.proj_start(); } }); eventEmitter.on('arduino_end', function (cmd) { - console.log(cmd); if (capture.active && cmd.trim() === 'p') { capture.proj_end(); - } }); }; diff --git a/app/lib/seq-ui.js b/app/lib/seq-ui.js index be00f0a..9adc24e 100644 --- a/app/lib/seq-ui.js +++ b/app/lib/seq-ui.js @@ -9,6 +9,7 @@ mcopy.loopCount = 0; seq.time = 0; seq.stopState = false; seq.run = function () { + 'use strict'; var c = mcopy.state.sequence.arr[seq.i], timeEnd = 0, rgb, @@ -72,6 +73,7 @@ seq.run = function () { } }; seq.stop = function (state) { + 'use strict'; if (typeof state === 'undefined') { return seq.stopState; } else { @@ -79,6 +81,7 @@ seq.stop = function (state) { } }; seq.init = function (start) { + 'use strict'; if (typeof start === 'undefined') { start = 0; mcopy.loopCount = 0; @@ -89,6 +92,7 @@ seq.init = function (start) { seq.run(); }; seq.stats = function () { + 'use strict'; var ms = 0, c = '', cam_total = 0, @@ -156,6 +160,7 @@ seq.stats = function () { return ms; }; seq.clear = function () { + 'use strict'; mcopy.state.sequence.size = 24; mcopy.state.sequence.arr = []; };