Commit 3ed8b3eb authored by Andrey Filippov's avatar Andrey Filippov

intermediate working versio with debug enabled

parent 5d1ca452
......@@ -18,12 +18,16 @@ var debug;// = 0;
var sequence_num;// = 0;
var last_ffc;// = 0;
var time_to_ffc;// = 0;
var left_capture;
var capture_run;// = 0;
var capture_wait;// wait sequence end to stop
var capture_wait_was = 0;
var want_run;
var request_num = 0;
var update_editable = true;
var apply_pending = false;
console.log("self.location.host="+self.location.host);
function parse_response(resp){
var result = "";
console.log("parse_response(), resp="+resp);
......@@ -58,7 +62,7 @@ function send_request(rq,callback){
function sendStatusRequest(){
console.log("sendStatusRequest()");
var url = "http://192.168.0.41/lwir16/lwir16.php?daemon=status";
var url = "http://"+self.location.host+"/lwir16/lwir16.php?daemon=status";
if (apply_pending) {
console.log("sendStatusRequest(), apply_pending");
var mod_pars = modParameters();
......@@ -74,7 +78,7 @@ function sendStatusRequest(){
function sendRestartRequest(){
console.log("sendRestartRequest()");
var url = "http://192.168.0.41/lwir16/lwir16.php?daemon=restart&cmd=STATUS";
var url = "http://"+self.location.host+"/lwir16/lwir16.php?daemon=restart&cmd=STATUS";
send_request(url,parseStatusResponse);
}
......@@ -144,13 +148,23 @@ function parseStatusResponse(resp){
time_to_ffc = parseFloat(resp.getElementsByTagName("time_to_ffc")[0].childNodes[0].nodeValue);
document.getElementById("idtime_to_ffc").value = time_to_ffc;
}
if (resp.getElementsByTagName("left_capture").length!=0){
left_capture = parseFloat(resp.getElementsByTagName("left_capture")[0].childNodes[0].nodeValue);
document.getElementById("idleft_capture").value = left_capture;
}
if (resp.getElementsByTagName("capture_run").length!=0){
capture_run = parseInt(resp.getElementsByTagName("capture_run")[0].childNodes[0].nodeValue);
document.getElementById("idcapture_run").checked = capture_run > 0;
if (update_editable) {
document.getElementById("idStartStop").innerHTML=capture_run?"Stop":"Start";
document.getElementById("idStartStop").disabled = false;
if (resp.getElementsByTagName("capture_wait").length!=0){
capture_wait_was = capture_wait;
capture_wait = parseInt(resp.getElementsByTagName("capture_wait")[0].childNodes[0].nodeValue);
}
document.getElementById("idcapture_run").checked = (capture_run > 0) || (capture_wait > 0); // still waiting
// if (update_editable || (want_run != capture_run)) {
if (update_editable || (capture_wait_was && !capture_wait)) {
document.getElementById("idStartStop").innerHTML=capture_run?"Stop":(capture_wait?"Waiting":"Start");
document.getElementById("idStartStop").disabled = capture_wait; //false;
want_run = capture_run;
}
}
......@@ -227,6 +241,13 @@ function clickedApply(){
setPending();
}
function clickedAbort(){
setPending();
want_run=false;
console.log("sendAbortRequest()");
var url = "http://"+self.location.host+"/lwir16/lwir16.php?daemon=status&cmd=ABORT";
send_request(url,parseStatusResponse);
}
</script>
</head>
......@@ -236,6 +257,7 @@ function clickedApply(){
<tr><td>
<button id="idStartStop" name = "nStartStop" onclick="clickedRun()" disabled="true">???</button>
<button id="idAbort" name = "nAbort" onclick="clickedAbort()">Abort</button>
</td><td>
<button id="idApply" name = "nApply" onclick="clickedApply()" disabled = "true">???</button>
</td><td>&nbsp;</td> <td>&nbsp;</td><td>&nbsp;</td>
......@@ -249,26 +271,26 @@ function clickedApply(){
<tr><td>Sequence length (@60Hz)</td><td>
<input id="idduration" name="nduration" size="10" maxlength="10" value="?" type="text">
</td><td>frames</td><td>Request count</td><td>
<input id="idrequest_num" name="nrequest_num" size="10" maxlength="10" value="?" type="text" disabled >
</td><td>frames</td><td>Frames left</td><td>
<input id="idleft_capture" name="nleft_capture" size="10" maxlength="10" value="?" type="text" disabled >
</td><td>&nbsp;</td></tr>
<tr><td>Sequence length (@10Hz)</td><td>
<input id="idduration_eo" name="nduration_eo" size="10" maxlength="10" value="?" type="text">
</td><td>frames</td><td>Capture run</td><td>
<input id="idcapture_run" name="ncapture_run" type="checkbox" disabled>
</td><td>frames</td><td>Request count</td><td>
<input id="idrequest_num" name="nrequest_num" size="10" maxlength="10" value="?" type="text" disabled >
</td><td>&nbsp;</td></tr>
<tr><td>FFC</td><td>
<input id="idffc" name="nffc" type="checkbox">
</td><td>&nbsp;</td><td>Last FFC</td><td>
<input id="idlast_ffc" name="nlast_ffc" size="10" maxlength="10" value="?" type="text" disabled >
</td><td>sec</td></tr>
</td><td>&nbsp;</td><td>Capture run</td><td>
<input id="idcapture_run" name="ncapture_run" type="checkbox" disabled>
</td><td>&nbsp;</td></tr>
<tr><td>FFC period</td><td>
<input id="idffc_period" name="nffc_period" size="10" maxlength="10" value="?" type="text">
</td><td>sec</td><td>Time to FFC</td><td>
<input id="idtime_to_ffc" name="ntime_to_ffc" size="10" maxlength="10" value="?" type="text" disabled >
</td><td>sec</td><td>Last FFC</td><td>
<input id="idlast_ffc" name="nlast_ffc" size="10" maxlength="10" value="?" type="text" disabled >
</td><td>sec</td></tr>
<tr><td>FFC groups</td><td>
......@@ -277,8 +299,11 @@ function clickedApply(){
<option value="2">2</option>
<option value="4" selected="selected">4</option>
</select>
</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
</td><td>&nbsp;</td>
<td>Time to FFC</td><td>
<input id="idtime_to_ffc" name="ntime_to_ffc" size="10" maxlength="10" value="?" type="text" disabled >
</td><td>sec</td></tr>
<tr><td>FFC frames</td><td>
<input id="idffc_frames" name="nffc_frames" size="10" maxlength="10" value="?" type="text">
</td><td>frames</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
......
......@@ -7,18 +7,24 @@ multicam_conf = "/etc/elphel393/multicamconf.xml"
ips = "192.168.0.41,192.168.0.42,192.168.0.43,192.168.0.44,192.168.0.45"
port_masks= "15,15,15,15,15"
duration = 100
pre_delay = 3.0
ffc_period = 30.0
ffc_groups = 2
ffc_frames = 8
ffc = 1
tiff_telem = 1
tiff_mn = 0
tiff_mx = 65535
#1 - run/stop, 2 - continuous, 0 do not use
run_modes = "1,1,1,1,2"
lwir_fps = 59.98
eo_decimate_m1 = 5
duration = 500
pre_delay = 2.0
ffc_period = 180.0
ffc_groups = 2
ffc_frames = 8
ffc = 1
tiff_telem = 1
tiff_mn = 0
tiff_mx = 65535
tiff_bin_shift = 1
tiff_auto = 0
debug = 1
tiff_auto = 0
frames_idle = 10
frames_wait = 20
debug = 1
output_log = /var/log/lwir16.log
# no spaces around commas!
CMD = INIT,START
\ No newline at end of file
This diff is collapsed.
......@@ -16,6 +16,7 @@ PHP_SCRIPTS=i2c.php \
ccam.php \
diag_utils.php \
framepars.php \
frame_to_ts.php \
parsedit.php \
phpinfo.php \
raw.php \
......
This diff is collapsed.
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