Add the new firmware identifiers as accepted responses. Also add text identifiers for firmware identified as the 4 new types.

This commit is contained in:
mmcwilliams 2019-03-18 17:21:17 -04:00
parent d4c2f5b678
commit 46da2e6541
8 changed files with 113 additions and 9 deletions

View File

@ -118,12 +118,20 @@
"proj_light_identifier" : "q", "proj_light_identifier" : "q",
"proj_cam_light_identifier" : "r", "proj_cam_light_identifier" : "r",
"proj_cam_identifier" : "s", "proj_cam_identifier" : "s",
"proj_second_identifier" : "t", "proj_second_identifier" : "t",
"proj_dual_identifier" : "d", "proj_dual_identifier" : "d",
"proj_second_forward" : "u", "proj_second_forward" : "u",
"proj_second_backward" : "v", "proj_second_backward" : "v",
"projector_second" : "w", "projector_second" : "w",
"projectors" : "x" "projectors" : "x",
"cam_second_identifier" : "y",
"cam_dual_identifier" : "a",
"cam_second_forward" : "1",
"cam_second_backward" : "2",
"camera_second" : "3",
"cameras" : "4"
} }
} }
} }

View File

@ -216,7 +216,19 @@ class Arduino {
|| data === cfg.arduino.cmd.light_identifier || data === cfg.arduino.cmd.light_identifier
|| data === cfg.arduino.cmd.proj_light_identifier || data === cfg.arduino.cmd.proj_light_identifier
|| data === cfg.arduino.cmd.proj_cam_light_identifier || data === cfg.arduino.cmd.proj_cam_light_identifier
|| data === cfg.arduino.cmd.proj_cam_identifier) { || data === cfg.arduino.cmd.proj_cam_identifier
|| data === cfg.arduino.cmd.proj_second_identifier
|| data === cfg.arduino.cmd.proj_dual_identifier
|| data === cfg.arduino.cmd.proj_second_forward
|| data === cfg.arduino.cmd.proj_second_backward
|| data === cfg.arduino.cmd.projector_second
|| data === cfg.arduino.cmd.projectors
|| data === cfg.arduino.cmd.cam_second_identifier
|| data === cfg.arduino.cmd.cam_dual_identifier
|| data === cfg.arduino.cmd.cam_second_forward
|| data === cfg.arduino.cmd.cam_second_backward
|| data === cfg.arduino.cmd.camera_second
|| data === cfg.arduino.cmd.cameras) {
this.confirmExec(null, data); this.confirmExec(null, data);
this.confirmExec = {}; this.confirmExec = {};
} }
@ -270,6 +282,18 @@ class Arduino {
else if (data === cfg.ardino.cmd.proj_second_identifier) { else if (data === cfg.ardino.cmd.proj_second_identifier) {
type = 'projector_second'; type = 'projector_second';
} }
else if (data === cfg.ardino.cmd.proj_dual_identifier) {
type = 'projectors';
}
else if (data === cfg.ardino.cmd.cam_second_identifier) {
type = 'camera_second';
}
else if (data === cfg.ardino.cmd.cam_dual_identifier) {
type = 'cameras';
}
//camera,projectors
//cameras,projector
//cameras,projectors
return resolve(type); return resolve(type);
}; };
await delay(cfg.arduino.serialDelay); await delay(cfg.arduino.serialDelay);

File diff suppressed because one or more lines are too long

View File

@ -216,7 +216,19 @@ class Arduino {
|| data === cfg.arduino.cmd.light_identifier || data === cfg.arduino.cmd.light_identifier
|| data === cfg.arduino.cmd.proj_light_identifier || data === cfg.arduino.cmd.proj_light_identifier
|| data === cfg.arduino.cmd.proj_cam_light_identifier || data === cfg.arduino.cmd.proj_cam_light_identifier
|| data === cfg.arduino.cmd.proj_cam_identifier) { || data === cfg.arduino.cmd.proj_cam_identifier
|| data === cfg.arduino.cmd.proj_second_identifier
|| data === cfg.arduino.cmd.proj_dual_identifier
|| data === cfg.arduino.cmd.proj_second_forward
|| data === cfg.arduino.cmd.proj_second_backward
|| data === cfg.arduino.cmd.projector_second
|| data === cfg.arduino.cmd.projectors
|| data === cfg.arduino.cmd.cam_second_identifier
|| data === cfg.arduino.cmd.cam_dual_identifier
|| data === cfg.arduino.cmd.cam_second_forward
|| data === cfg.arduino.cmd.cam_second_backward
|| data === cfg.arduino.cmd.camera_second
|| data === cfg.arduino.cmd.cameras) {
this.confirmExec(null, data); this.confirmExec(null, data);
this.confirmExec = {}; this.confirmExec = {};
} }
@ -270,6 +282,18 @@ class Arduino {
else if (data === cfg.ardino.cmd.proj_second_identifier) { else if (data === cfg.ardino.cmd.proj_second_identifier) {
type = 'projector_second'; type = 'projector_second';
} }
else if (data === cfg.ardino.cmd.proj_dual_identifier) {
type = 'projectors';
}
else if (data === cfg.ardino.cmd.cam_second_identifier) {
type = 'camera_second';
}
else if (data === cfg.ardino.cmd.cam_dual_identifier) {
type = 'cameras';
}
//camera,projectors
//cameras,projector
//cameras,projectors
return resolve(type); return resolve(type);
}; };
await delay(cfg.arduino.serialDelay); await delay(cfg.arduino.serialDelay);

File diff suppressed because one or more lines are too long

View File

@ -216,7 +216,19 @@ class Arduino {
|| data === cfg.arduino.cmd.light_identifier || data === cfg.arduino.cmd.light_identifier
|| data === cfg.arduino.cmd.proj_light_identifier || data === cfg.arduino.cmd.proj_light_identifier
|| data === cfg.arduino.cmd.proj_cam_light_identifier || data === cfg.arduino.cmd.proj_cam_light_identifier
|| data === cfg.arduino.cmd.proj_cam_identifier) { || data === cfg.arduino.cmd.proj_cam_identifier
|| data === cfg.arduino.cmd.proj_second_identifier
|| data === cfg.arduino.cmd.proj_dual_identifier
|| data === cfg.arduino.cmd.proj_second_forward
|| data === cfg.arduino.cmd.proj_second_backward
|| data === cfg.arduino.cmd.projector_second
|| data === cfg.arduino.cmd.projectors
|| data === cfg.arduino.cmd.cam_second_identifier
|| data === cfg.arduino.cmd.cam_dual_identifier
|| data === cfg.arduino.cmd.cam_second_forward
|| data === cfg.arduino.cmd.cam_second_backward
|| data === cfg.arduino.cmd.camera_second
|| data === cfg.arduino.cmd.cameras) {
this.confirmExec(null, data); this.confirmExec(null, data);
this.confirmExec = {}; this.confirmExec = {};
} }
@ -270,6 +282,18 @@ class Arduino {
else if (data === cfg.ardino.cmd.proj_second_identifier) { else if (data === cfg.ardino.cmd.proj_second_identifier) {
type = 'projector_second'; type = 'projector_second';
} }
else if (data === cfg.ardino.cmd.proj_dual_identifier) {
type = 'projectors';
}
else if (data === cfg.ardino.cmd.cam_second_identifier) {
type = 'camera_second';
}
else if (data === cfg.ardino.cmd.cam_dual_identifier) {
type = 'cameras';
}
//camera,projectors
//cameras,projector
//cameras,projectors
return resolve(type); return resolve(type);
}; };
await delay(cfg.arduino.serialDelay); await delay(cfg.arduino.serialDelay);

File diff suppressed because one or more lines are too long

View File

@ -219,13 +219,28 @@ class Arduino {
confirmEnd (data : string) { confirmEnd (data : string) {
//console.dir(data) //console.dir(data)
if (data === cfg.arduino.cmd.connect if ( data === cfg.arduino.cmd.connect
|| data === cfg.arduino.cmd.proj_identifier || data === cfg.arduino.cmd.proj_identifier
|| data === cfg.arduino.cmd.cam_identifier || data === cfg.arduino.cmd.cam_identifier
|| data === cfg.arduino.cmd.light_identifier || data === cfg.arduino.cmd.light_identifier
|| data === cfg.arduino.cmd.proj_light_identifier || data === cfg.arduino.cmd.proj_light_identifier
|| data === cfg.arduino.cmd.proj_cam_light_identifier || data === cfg.arduino.cmd.proj_cam_light_identifier
|| data === cfg.arduino.cmd.proj_cam_identifier ) { || data === cfg.arduino.cmd.proj_cam_identifier
|| data === cfg.arduino.cmd.proj_second_identifier
|| data === cfg.arduino.cmd.proj_dual_identifier
|| data === cfg.arduino.cmd.proj_second_forward
|| data === cfg.arduino.cmd.proj_second_backward
|| data === cfg.arduino.cmd.projector_second
|| data === cfg.arduino.cmd.projectors
|| data === cfg.arduino.cmd.cam_second_identifier
|| data === cfg.arduino.cmd.cam_dual_identifier
|| data === cfg.arduino.cmd.cam_second_forward
|| data === cfg.arduino.cmd.cam_second_backward
|| data === cfg.arduino.cmd.camera_second
|| data === cfg.arduino.cmd.cameras) {
this.confirmExec(null, data); this.confirmExec(null, data);
this.confirmExec = {}; this.confirmExec = {};
} }
@ -274,7 +289,16 @@ class Arduino {
type = 'projector,camera' type = 'projector,camera'
} else if (data === cfg.ardino.cmd.proj_second_identifier) { } else if (data === cfg.ardino.cmd.proj_second_identifier) {
type = 'projector_second' type = 'projector_second'
} else if (data === cfg.ardino.cmd.proj_dual_identifier) {
type = 'projectors'
} else if (data === cfg.ardino.cmd.cam_second_identifier) {
type = 'camera_second'
} else if (data === cfg.ardino.cmd.cam_dual_identifier) {
type = 'cameras'
} }
//camera,projectors
//cameras,projector
//cameras,projectors
return resolve(type) return resolve(type)
} }
await delay(cfg.arduino.serialDelay) await delay(cfg.arduino.serialDelay)