Make seq-ui module strict

This commit is contained in:
Matt 2016-06-21 15:25:29 -04:00
parent 7bbbf7ee7b
commit 84a8df4a78
2 changed files with 6 additions and 6 deletions

View File

@ -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();
}
});
};

View File

@ -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 = [];
};