From 415306d7a81ab2b24e984504a39c51807e532199 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Mon, 18 Mar 2019 18:41:35 -0400 Subject: [PATCH] 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. --- app/lib/ui/cmd.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/lib/ui/cmd.js b/app/lib/ui/cmd.js index 59c4a65..17febcc 100644 --- a/app/lib/ui/cmd.js +++ b/app/lib/ui/cmd.js @@ -53,6 +53,7 @@ cmd.proj_backward = function (callback) { /** * 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 **/ 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) { 'use strict'; 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) { 'use strict'; var off = [0, 0, 0]; @@ -148,6 +160,11 @@ cmd.cam_backward = function (rgb, callback) { }, 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) { 'use strict'; var off = [0, 0, 0]; @@ -175,7 +192,6 @@ cmd.black_backward = function (callback) { }, mcopy.cfg.arduino.serialDelay); } }; - cmd.cam_to = function (t) { const raw = $('#move_cam_to').val(); const val = parseInt(raw);