Add comments to existing sequencer gui file. Question arises here: should this logic be pushed back into the main process so that there is less reliance on the renderer and all command logic takes place in main (or a sub-module) with the renderer being used only for display and not sequencing. This seems to be the path going forward, but will take a re-write that allows for GUI to interrupt the process as it does now. A proof of concept will have to be written to demonstrate that using `await delay(ms)` is viable and the process does not completely lock.

This commit is contained in:
mmcwilliams 2019-03-18 18:41:35 -04:00
parent b1e4015630
commit 415306d7a8
1 changed files with 17 additions and 1 deletions

View File

@ -53,6 +53,7 @@ cmd.proj_backward = function (callback) {
/** /**
* Move the camera one frame forward * Move the camera one frame forward
* *
* @param {array} rgb Color to set light for frame
* @param {function} callback Function to call after camera moves one frame * @param {function} callback Function to call after camera moves one frame
**/ **/
cmd.cam_forward = function (rgb, callback) { cmd.cam_forward = function (rgb, callback) {
@ -89,6 +90,11 @@ cmd.cam_forward = function (rgb, callback) {
}); });
} }
}; };
/**
* Move the camera one frame forward, light set to black or off
*
* @param {function} callback Function to call after camera moves one frame
**/
cmd.black_forward = function (callback) { cmd.black_forward = function (callback) {
'use strict'; 'use strict';
var off = [0, 0, 0]; var off = [0, 0, 0];
@ -118,6 +124,12 @@ cmd.black_forward = function (callback) {
}); });
} }
}; };
/**
* Move the camera one frame backward
*
* @param {array} rgb Color to set light for frame
* @param {function} callback Function to call after camera moves one frame
**/
cmd.cam_backward = function (rgb, callback) { cmd.cam_backward = function (rgb, callback) {
'use strict'; 'use strict';
var off = [0, 0, 0]; var off = [0, 0, 0];
@ -148,6 +160,11 @@ cmd.cam_backward = function (rgb, callback) {
}, mcopy.cfg.arduino.serialDelay); }, mcopy.cfg.arduino.serialDelay);
} }
}; };
/**
* Move the camera one frame forward, light set to black or off
*
* @param {function} callback Function to call after camera moves one frame
**/
cmd.black_backward = function (callback) { cmd.black_backward = function (callback) {
'use strict'; 'use strict';
var off = [0, 0, 0]; var off = [0, 0, 0];
@ -175,7 +192,6 @@ cmd.black_backward = function (callback) {
}, mcopy.cfg.arduino.serialDelay); }, mcopy.cfg.arduino.serialDelay);
} }
}; };
cmd.cam_to = function (t) { cmd.cam_to = function (t) {
const raw = $('#move_cam_to').val(); const raw = $('#move_cam_to').val();
const val = parseInt(raw); const val = parseInt(raw);