Add a seq.cmds object to map named actions to functions. This creates targets for MSCRIPT to compile to, and allows the sequence to be stored in a string array.

This commit is contained in:
mmcwilliams 2019-03-18 18:42:31 -04:00
parent 415306d7a8
commit 0fbe45073c
1 changed files with 30 additions and 0 deletions

View File

@ -13,6 +13,36 @@ mcopy.loopCount = 0;
capture.active = false;
capture.report = '';
seq.cmds = {
cam_forward : 'CF',
cam_backward : 'CB',
proj_forward : 'PF',
proj_backward : 'PB',
black_forward : 'BF',
black_backward : 'BB',
//dual commands
cam2_forward : 'C2F',
cam2_backward : 'C2B',
cams_forward : 'CCF',
cams_forward : 'CCB',
cam_forward_cam2_backward : 'CFCB',
cam_backward_cam2_forward : 'CBCF',
proj2_forward : 'P2F',
proj2_backward : 'P2B',
projs_forward : 'PPF',
projs_backward : 'PPB',
proj_forward_proj2_backward : 'PFPB',
proj_backward_proj2_forward : 'PBPF'
}
seq.run = function () {
'use strict';
var c = mcopy.state.sequence.arr[seq.i],