Commit 9f65cb10 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

+help

parent a52dba03
......@@ -78,18 +78,21 @@
font-family: "Helvetica Neue", Helvetica;
}
#snapshot{
background-color: #CF4040; /* not Green */
.button{
font-weight: bold;
border-radius:3px;
outline:none;
border: none;
color: white;
padding: 32px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
}
#snapshot{
background-color: #CF4040; /* not Green */
padding: 32px 32px;
font-size: 20px;
font-weight: bold;
border-radius:3px;
outline:none;
}
#snapshot:hover{
......@@ -104,6 +107,26 @@
background-color: #A0A0A0; /* not Green */
}
#synced{
width:25px;
height:25px;
}
#help_button{
background-color: #404040; /* not Green */
padding: 3px 7px;
font-size: 15px;
}
#help_button:hover{
background-color: #303030; /* not Green */
}
#help_button:active{
background-color: #202020; /* not Green */
}
</style>
<script>
......@@ -115,8 +138,31 @@
</head>
<body>
<button title='Download images (synced) from all channels over network' id='snapshot' onclick='take_snapshot()'>Snapshot</button>
<div>
<button title='Download images from all channels over network' id='snapshot' onclick='take_snapshot()' class='button'>Snapshot</button>
</div>
<br/>
<div>
<table>
<tr>
<td valign='middle'><span style='font-size:20px;line-height:25px;'>sync</span></td>
<td valign='middle'><input type='checkbox' id='synced' checked/></td>
<td valign='middle'><button id='help_button' class='button' onclick='toggle_help()' >?</button></td>
</tr>
</table>
</div>
<br/>
<div id='help' style='display:none;'>
<b>if checked</b>:
<ul>
<li>all ports - same timestamp</li>
<li>fps will be reprogrammed - set to single trigger mode then restored - careful if some other program is doing recording</li>
</ul>
<b>if unchecked</b>:
<ul>
<li>timestamps can be different</li>
<li>fps will not be reprogrammed - no intereference with other recording programs, only network load.</li>
</ul>
</div>
</body>
</html>
\ No newline at end of file
......@@ -6,7 +6,13 @@ function take_snapshot(){
$("#snapshot").attr("disabled",true);
if(ports.length!=0){
read_trig_master();
if ($("#synced").attr("checked")){
read_trig_master();
}else{
download_all(false);
}
}else{
console.log("No ports detected");
}
......@@ -50,18 +56,16 @@ function trigger(){
url:ip+"/snapshot.php?trig",
success:function(){
setTimeout(download_all,200);
setTimeout(function(){
download_all(true);
},200);
}
});
}
function download_all(){
function restore_trig_period(){
ports.forEach(function(c,i){
download_single(ip+":"+c+"/bimg");
});
$.ajax({
url: ip+"/parsedit.php?immediate&TRIG_PERIOD="+(tp_old+1)+"*-2&sensor_port="+trig_master,
success: function(){
......@@ -81,6 +85,16 @@ function download_all(){
}
function download_all(rtp){
ports.forEach(function(c,i){
download_single(ip+":"+c+"/bimg");
});
if (rtp) restore_trig_period();
}
function download_single(addr){
var link = document.createElement('a');
......@@ -95,4 +109,11 @@ function download_single(addr){
document.body.removeChild(link);
}
\ No newline at end of file
}
function toggle_help(){
$("#help").toggle();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment