Commit 2ab69a0f authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

print pointers only as well

parent f43043fb
...@@ -16,17 +16,25 @@ $master_port = elphel_get_P_value($sample_port,ELPHEL_TRIG_MASTER); ...@@ -16,17 +16,25 @@ $master_port = elphel_get_P_value($sample_port,ELPHEL_TRIG_MASTER);
//print_r($ports); //print_r($ports);
//print("sample port = ".$sample_port); //print("sample port = ".$sample_port);
if (isset($_GET['pointers'])){
$POINTERS_ONLY = true;
}else{
$POINTERS_ONLY = false;
}
$res = ""; $res = "";
$res .= "<camera ip='".$_SERVER['SERVER_ADDR']."'>\n"; $res .= "<camera ip='".$_SERVER['SERVER_ADDR']."'>\n";
$res .= "\t<master_port>".$master_port."</master_port>\n";
$res .= "\t<systime>".get_system_time()."</systime>\n"; if (!$POINTERS_ONLY){
$res .= "\t<systimestamp>".time()."</systimestamp>\n"; $res .= "\t<master_port>".$master_port."</master_port>\n";
$res .= "\t<uptime>".get_uptime()."</uptime>\n"; $res .= "\t<systime>".get_system_time()."</systime>\n";
$res .= "\t<temperature>".get_temperature()."\t</temperature>\n"; $res .= "\t<systimestamp>".time()."</systimestamp>\n";
$res .= "\t<storage>".check_storage()."\t</storage>\n"; $res .= "\t<uptime>".get_uptime()."</uptime>\n";
$res .= "\t<recorder name='camogm'>".check_camogm_running()."</recorder>\n"; $res .= "\t<temperature>".get_temperature()."\t</temperature>\n";
$res .= "\t<gps>".check_gps($master_port)."\t</gps>\n"; $res .= "\t<storage>".check_storage()."\t</storage>\n";
$res .= "\t<recorder name='camogm'>".check_camogm_running()."</recorder>\n";
$res .= "\t<gps>".check_gps($master_port)."\t</gps>\n";
}
for($i=0;$i<count($ports);$i++){ for($i=0;$i<count($ports);$i++){
$s = implode(', ',$ports[$i]['sensors']); $s = implode(', ',$ports[$i]['sensors']);
...@@ -212,12 +220,14 @@ function get_temperature(){ ...@@ -212,12 +220,14 @@ function get_temperature(){
function get_port_info($port){ function get_port_info($port){
global $POINTERS_ONLY;
$pars_res = ""; $pars_res = "";
$ts_res = ""; $ts_res = "";
$pars = array( $pars = array(
'WB_EN' => 0, 'WB_EN' => 0,
'AUTOEXP_EN' => 0, 'AUTOEXP_ON' => 0,
'COMPRESSOR_RUN'=> 0, 'COMPRESSOR_RUN'=> 0,
'SENSOR_RUN'=> 0, 'SENSOR_RUN'=> 0,
'COLOR' => 0, 'COLOR' => 0,
...@@ -236,14 +246,17 @@ function get_port_info($port){ ...@@ -236,14 +246,17 @@ function get_port_info($port){
'GAINGB' => 0, 'GAINGB' => 0,
); );
$ps = elphel_get_P_arr($port,$pars); $pars_res .= "\n";
$pars_res .= "\n\t\t<parameters>\n"; if (!$POINTERS_ONLY){
foreach($ps as $k=>$v){ $ps = elphel_get_P_arr($port,$pars);
$pars_res .= "\t\t\t<".strtolower($k).">$v</".strtolower($k).">\n";
}
$pars_res .= "\t\t</parameters>\n";
$pars_res .= "\t\t<parameters>\n";
foreach($ps as $k=>$v){
$pars_res .= "\t\t\t<".strtolower($k).">$v</".strtolower($k).">\n";
}
$pars_res .= "\t\t</parameters>\n";
}
// get recent timestamps // get recent timestamps
$circbuf_pointers = elphel_get_circbuf_pointers($port,1); $circbuf_pointers = elphel_get_circbuf_pointers($port,1);
...@@ -261,7 +274,8 @@ function get_port_info($port){ ...@@ -261,7 +274,8 @@ function get_port_info($port){
foreach($meta as $m){ foreach($meta as $m){
$sec = $m['meta']['timestamp_sec']; $sec = $m['meta']['timestamp_sec'];
$usec = sprintf("%06d", $m['meta']['timestamp_usec']); $usec = sprintf("%06d", $m['meta']['timestamp_usec']);
$ts_res .= "\t\t\t<ts frame='{$m['Exif']['FrameNumber']}'>$sec.$usec</ts>\n"; $ptr = $m['circbuf_pointer'];
$ts_res .= "\t\t\t<ts frame='{$m['Exif']['FrameNumber']}' ts='$sec.$usec' ptr='$ptr'>$sec.$usec</ts>\n";
} }
$ts_res .= "\t\t</timestamps>\n"; $ts_res .= "\t\t</timestamps>\n";
......
...@@ -173,10 +173,11 @@ ...@@ -173,10 +173,11 @@
<a href="photofinish/" title="Scanline mode demo">Photo finish demo</a><br /> <a href="photofinish/" title="Scanline mode demo">Photo finish demo</a><br />
<br /> <br />
<a href="hwmon.html" title="hwmon.html">Temperature monitor</a><br /> <a href="hwmon.html" title="hwmon.html">Temperature monitor</a><br />
<a href="update_software.html" title="update NAND flash">Update firmware</a><br /> <a href="update_software.html" title="Update NAND flash">Update firmware</a><br />
<br /> <br />
<a title="docs" href="http://wiki.elphel.com/index.php?title=Tmp_manual">User manual</a><br /> <a title="docs" href="http://wiki.elphel.com/index.php?title=Tmp_manual">User manual</a><br />
<a href="jp4-viewer/?width=1200&quality=1" title="preview jp4 images (drag and drop from PC)">JP4 Viewer</a><br /> <a href="jp4-viewer/?width=1200&quality=1" title="Preview jp4 images (drag and drop from PC)">JP4 Viewer</a><br />
<a href="/diagnostics/index.html" title="Inspect camera system info">System info</a><br />
<a href="/debugfs.html" title="Linux Kernel Dynamic Debug helper interface (debug device drivers)">DebugFS</a><br /> <a href="/debugfs.html" title="Linux Kernel Dynamic Debug helper interface (debug device drivers)">DebugFS</a><br />
</div> </div>
<script> <script>
......
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