Commit 70820648 authored by Andrey Filippov's avatar Andrey Filippov

time setting fro the IMS camera w/o sensors

parent fcfa1fc1
......@@ -229,6 +229,8 @@ function get_ports(){
var tmp_port = new Port({port: $(this).attr("port"), index: $(this).attr("index"), sensor_type: $(this).html()});
cams[index].ports.push(tmp_port);
init_port(index,cams[index].ports.length-1);
} else {
init_noport(index); // just set time for ims-only "camera"
}
});
// check camogm is alive
......@@ -566,11 +568,20 @@ function init_port(cam_i,port_i){
cams[this.cam_i].ports[this.port_i].bits = bits;
}
});
}
function init_noport(cam_i){
var date_time=new Date();
var url = "http://"+cams[cam_i].ip+"/parsedit.php?immediate&_time="+date_time.getTime();
// alert("init_noport("+cam_i+"): "+url);
$.ajax({
url: url,
cam_i: cam_i,
success: function(){ // res){
// alert("init_noport("+cam_i+") res.text( )= "+$(res).text());
}
});
}
// * if any attribute is not initialized it will be NaN
// * if all do not match then take the last one
function button_update_state(btn){
......
......@@ -123,7 +123,7 @@
$PARS_FRAMES_MASK = $PARS_FRAMES - 1;
$sensor_port=0; /// TODO: NC393 - add sensor port control, initially will use $sensor_port=0 for all php functions that require it
$autocampars='/www/pages/autocampars.php';
$descriptions=getParDescriptions($autocampars);
// $descriptions=getParDescriptions($autocampars);
$default_ahead= 3;
$maxahead=6; /// maximal ahead of the current frame that tasks can currently be set to driver; //NC393 - is it the same?
$minahead=4; /// skip to frame $minahead from the soonest next task before programming
......@@ -160,6 +160,8 @@
if (array_key_exists ( 'sensor_port', $_GET )) {
$GLOBALS [sensor_port] = (myval($_GET ['sensor_port'])) & 3;
} else {
$GLOBALS [sensor_port] = -1;
}
$page_title="Default control/test page for the NC393L camera, sensor port ".$GLOBALS [sensor_port];
if ((count($_GET)==0) || ((count($_GET)==1) && array_key_exists ( 'sensor_port', $_GET ))) {
......@@ -198,7 +200,7 @@
} else { // return XML page with specified parameters values
addGammas($todo);
$names=array_merge(extractNames($global_params),extractNames($frame_params));
$currentParameters=elphel_get_P_arr($GLOBALS [sensor_port], $names);
$currentParameters=($GLOBALS [sensor_port] >= 0)?elphel_get_P_arr($GLOBALS [sensor_port], $names):[];
applyPost($todo,true); // no final wait
$msg="<?xml version=\"1.0\"?>\n<parameters>\n";
foreach ($currentParameters as $key=>$value) {
......@@ -214,6 +216,7 @@
exit(0); // that's all
}
}
$descriptions=getParDescriptions($autocampars);
// startPage();
startPage($page_title, mainJavascript($refreshSig));
......
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