canon_ble #82
|
@ -668,12 +668,33 @@ button:focus {
|
|||
}
|
||||
#settings > div {
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
#settings > div.left {
|
||||
float: left;
|
||||
padding-left: 30px;
|
||||
}
|
||||
#settings > div.right {
|
||||
float: right;
|
||||
padding-right: 30px;
|
||||
}
|
||||
#settings > div.right input[type=number] {
|
||||
min-width: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
#settings > div.right .spacer {
|
||||
height: 62px;
|
||||
}
|
||||
#settings > div.right .proj_time {
|
||||
height: 111px;
|
||||
}
|
||||
#settings > div.right .cam_time {
|
||||
height: 111px;
|
||||
}
|
||||
#settings > div > div {
|
||||
width: 360px;
|
||||
}
|
||||
#settings input[type=text],
|
||||
#settings input[type=number],
|
||||
#settings select {
|
||||
display: block;
|
||||
border-radius: 5px;
|
||||
|
@ -690,24 +711,29 @@ button:focus {
|
|||
min-width: 300px;
|
||||
}
|
||||
#settings input[type=text] span,
|
||||
#settings input[type=number] span,
|
||||
#settings select span {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
font-weight: 200;
|
||||
}
|
||||
#settings input[type=text]:active,
|
||||
#settings input[type=number]:active,
|
||||
#settings select:active,
|
||||
#settings input[type=text] .active,
|
||||
#settings input[type=number] .active,
|
||||
#settings select .active {
|
||||
background: #fff;
|
||||
color: #272b30;
|
||||
outline: none;
|
||||
}
|
||||
#settings input[type=text]:focus,
|
||||
#settings input[type=number]:focus,
|
||||
#settings select:focus {
|
||||
outline: none;
|
||||
}
|
||||
#settings input[type=text].active,
|
||||
#settings input[type=number].active,
|
||||
#settings select.active {
|
||||
border-color: #DAE035;
|
||||
color: #DAE035;
|
||||
|
|
|
@ -407,7 +407,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="settings" class="screen">
|
||||
<div>
|
||||
<div class="left">
|
||||
<div>
|
||||
<h4>Devices</h4>
|
||||
<select id="devices">
|
||||
|
@ -457,6 +457,17 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="spacer"></div>
|
||||
<div class="proj_time">
|
||||
<h4>Projector Time (ms)</h4>
|
||||
<input type="number" readonly id="proj_time" value="0" />
|
||||
</div>
|
||||
<div class="cam_time">
|
||||
<h4>Camera Time (ms)</h4>
|
||||
<input type="number" readonly id="cam_time" value="0" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="overlay" onclick="gui.overlay(false);gui.spinner(false);"></div>
|
||||
|
|
|
@ -4,12 +4,33 @@
|
|||
}
|
||||
> div{
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
&.left{
|
||||
float: left;
|
||||
padding-left: 30px;
|
||||
}
|
||||
&.right{
|
||||
float: right;
|
||||
padding-right: 30px;
|
||||
input[type=number] {
|
||||
min-width: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
.spacer{
|
||||
height: 62px;
|
||||
}
|
||||
.proj_time{
|
||||
height: 111px;
|
||||
}
|
||||
.cam_time{
|
||||
height: 111px;
|
||||
}
|
||||
}
|
||||
}
|
||||
> div > div{
|
||||
width: 360px;
|
||||
}
|
||||
input[type=text],
|
||||
input[type=text],
|
||||
input[type=number],
|
||||
select{
|
||||
.button();
|
||||
display: inline-block;
|
||||
|
|
|
@ -207,6 +207,7 @@ class Arduino {
|
|||
complete = this.queue[data](ms);
|
||||
}
|
||||
else if (data[0] === cfg.arduino.cmd.error) {
|
||||
this.log.error(`Received error from device ${serial}`);
|
||||
//error state
|
||||
//stop sequence
|
||||
//throw error in ui
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -56,6 +56,7 @@ class Timing {
|
|||
this.data['cam2'] = cam;
|
||||
this.data['cams'] = cam;
|
||||
this.data['black'] = cam + pad;
|
||||
this.updateUI('#cam_time', cam);
|
||||
}
|
||||
else if (key === 'proj') {
|
||||
proj = 0;
|
||||
|
@ -65,6 +66,7 @@ class Timing {
|
|||
this.data['proj'] = proj;
|
||||
this.data['proj2'] = proj;
|
||||
this.data['projs'] = proj;
|
||||
this.updateUI('#proj_time', proj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,8 +76,16 @@ class Timing {
|
|||
//update with rolling average
|
||||
update(c, ms) {
|
||||
let cmd = this.fromArduino[c];
|
||||
let id;
|
||||
if (typeof cmd !== 'undefined' && typeof this.data[cmd] !== 'undefined') {
|
||||
this.data[cmd] = Math.round((this.data[cmd] + ms) / 2);
|
||||
id = `#${cmd}_time`;
|
||||
this.updateUI(id, this.data[cmd]);
|
||||
}
|
||||
}
|
||||
updateUI(id, ms) {
|
||||
if ($(id).length) {
|
||||
$(id).val(ms);
|
||||
}
|
||||
}
|
||||
//get current value
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"timing.js","sourceRoot":"","sources":["../../src/lib/ui/timing.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,IAAI,MAAe,CAAC;AAMpB,MAAM,MAAM;IAoCX;QAnCO,SAAI,GAAgB,EAE1B,CAAA;QAEO,gBAAW,GAAS;YAC3B,GAAG,EAAG,KAAK;YACR,GAAG,EAAG,MAAM;YACZ,GAAG,EAAG,MAAM;YACZ,GAAG,EAAG,OAAO;YAChB,GAAG,EAAG,MAAM;YACT,GAAG,EAAG,OAAO;YAChB,GAAG,EAAG,OAAO;SACb,CAAA;QAEO,YAAO,GAAU;YACxB,IAAI,EAAG,KAAK;YACZ,IAAI,EAAG,KAAK;YACZ,IAAI,EAAG,OAAO;YACX,IAAI,EAAG,OAAO;YACd,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,MAAM;YACb,KAAK,EAAG,MAAM;YACd,KAAK,EAAG,MAAM;YACd,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACjB,IAAI,EAAG,MAAM;YACb,IAAI,EAAG,MAAM;YACb,KAAK,EAAG,OAAO;YACf,KAAK,EAAG,OAAO;YACf,KAAK,EAAG,OAAO;YACf,KAAK,EAAG,OAAO;YACf,MAAM,E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AM,GAAG,GAAY,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrC,IAAI,OAAO,GAAG,KAAK,WAAW,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,WAAW,EAAE;YACxE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACtB;QACD,OAAO,CAAC,CAAC;IACV,CAAC;IAEM,KAAK;QACX,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,MAAM,EAAG,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IACpD,CAAC;CACD;AAED,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAEtB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC"}
|
|
@ -66,10 +66,11 @@ class Timing {
|
|||
pad = (profile['black'].before + profile['black'].after);
|
||||
}
|
||||
|
||||
this.data['cam'] = cam
|
||||
this.data['cam2'] = cam
|
||||
this.data['cams'] = cam
|
||||
this.data['black'] = cam + pad
|
||||
this.data['cam'] = cam;
|
||||
this.data['cam2'] = cam;
|
||||
this.data['cams'] = cam;
|
||||
this.data['black'] = cam + pad;
|
||||
this.updateUI('#cam_time', cam);
|
||||
} else if (key === 'proj') {
|
||||
proj = 0;
|
||||
proj += profile[key].time;
|
||||
|
@ -78,6 +79,7 @@ class Timing {
|
|||
this.data['proj'] = proj;
|
||||
this.data['proj2'] = proj;
|
||||
this.data['projs'] = proj;
|
||||
this.updateUI('#proj_time', proj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,8 +91,17 @@ class Timing {
|
|||
//update with rolling average
|
||||
public update (c : string, ms : number) {
|
||||
let cmd : string = this.fromArduino[c];
|
||||
let id : string;
|
||||
if (typeof cmd !== 'undefined' && typeof this.data[cmd] !== 'undefined') {
|
||||
this.data[cmd] = Math.round((this.data[cmd] + ms) / 2);
|
||||
id = `#${cmd}_time`;
|
||||
this.updateUI(id, this.data[cmd]);
|
||||
}
|
||||
}
|
||||
|
||||
public updateUI (id : string, ms : number) {
|
||||
if ($(id).length) {
|
||||
$(id).val(ms);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -218,6 +218,7 @@ class Arduino {
|
|||
} else if (data[0] === cfg.arduino.cmd.state) {
|
||||
complete = this.queue[data](ms)
|
||||
} else if (data[0] === cfg.arduino.cmd.error) {
|
||||
this.log.error(`Received error from device ${serial}`)
|
||||
//error state
|
||||
//stop sequence
|
||||
//throw error in ui
|
||||
|
|
Loading…
Reference in New Issue