ELPHEL_CONST_FRAMEPAIR_FRAME_FUNC);///#define FRAMEPAIR_FRAME_FUNC (FRAMEPAIR_FRAME_ZERO | FRAMEPAIR_FORCE_NEW) // write to func2call instead of the frame parameters
}
/*
echo "<pre>\n";
var_dump($pars);
echo "</pre>\n";
*/
}
///TODO: colorize columns, checkboxes
//main
$elp_const=get_defined_constants(true);
$elp_const=$elp_const["elphel"];
$sensor_port=0;
if(array_key_exists('sensor_port',$_GET)){
$sensor_port=(myval($_GET['sensor_port']));
}
switch($_GET["mode"]){
case"triggers":
case"functions":
$filter=0;
$minnum=0;//927
$maxnum=512;//927
$rephead=50;
if($_GET["filter"]){
$filter=$_GET["filter"];
}
if($_GET["min"]){
$minnum=$_GET["min"];
}
if($_GET["max"]){
$maxnum=$_GET["max"];
}
if($_GET["rephead"]){
$rephead=$_GET["rephead"];
}
if($_SERVER["REQUEST_METHOD"]=="POST"){
apply_triggers();
}
print_triggers($filter,$minnum,$maxnum,$rephead);
exit(0);
case"latency":
case"latencies":
if($_SERVER["REQUEST_METHOD"]=="POST"){
apply_latencies();
}
print_latencies();
exit(0);
default:
echo<<<USAGE
<p>This page allows to tune camera sequencer at run time, those adjustments to be applied to C headers of the drivers:
<a href="https://github.com/Elphel/linux-elphel/blob/master/src/drivers/elphel/latency.h">latency.h</a> and
<p>First mode is used to specify latency (in frames) for different actions, additionally it specifies which actions can use hardware sequencer (some, like writing gamma tables to FPGA
can only be performed in "ASAP" mode, bypassing the sequencer)</p>
<p>The second one can be used to specify which functions are triggered by chnage in which parameters (either from user program or sometimes by actions of other functions).</p>
<p>This mode can generate large tables, so it is possible to limit number of parameters shown</p>
<ul>
<li><b>filter=N</b> (N=0..3), where 1 means "ignore unnamed parameters", 2 - "ignore parameters with a value 0", 3 - ignore both and 0 - show all<b></li>
<li><b>min=N</b> - start with parameter number <b>N</b></li>
<li><b>max=N</b> - end with parameter number <b>N</b></li>
<li><b>rephead=N</b> - repeat table header each <b>N</b> lines.</li>