Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-web-393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-web-393
Commits
2ab69a0f
Commit
2ab69a0f
authored
May 11, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print pointers only as well
parent
f43043fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
18 deletions
+33
-18
diagnostics.php
src/diagnostics/diagnostics.php
+30
-16
index.php
src/index/index.php
+3
-2
No files found.
src/diagnostics/diagnostics.php
View file @
2ab69a0f
...
...
@@ -16,17 +16,25 @@ $master_port = elphel_get_P_value($sample_port,ELPHEL_TRIG_MASTER);
//print_r($ports);
//print("sample port = ".$sample_port);
if
(
isset
(
$_GET
[
'pointers'
])){
$POINTERS_ONLY
=
true
;
}
else
{
$POINTERS_ONLY
=
false
;
}
$res
=
""
;
$res
.=
"<camera ip='"
.
$_SERVER
[
'SERVER_ADDR'
]
.
"'>
\n
"
;
$res
.=
"
\t
<master_port>"
.
$master_port
.
"</master_port>
\n
"
;
$res
.=
"
\t
<systime>"
.
get_system_time
()
.
"</systime>
\n
"
;
$res
.=
"
\t
<systimestamp>"
.
time
()
.
"</systimestamp>
\n
"
;
$res
.=
"
\t
<uptime>"
.
get_uptime
()
.
"</uptime>
\n
"
;
$res
.=
"
\t
<temperature>"
.
get_temperature
()
.
"
\t
</temperature>
\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
"
;
if
(
!
$POINTERS_ONLY
){
$res
.=
"
\t
<master_port>"
.
$master_port
.
"</master_port>
\n
"
;
$res
.=
"
\t
<systime>"
.
get_system_time
()
.
"</systime>
\n
"
;
$res
.=
"
\t
<systimestamp>"
.
time
()
.
"</systimestamp>
\n
"
;
$res
.=
"
\t
<uptime>"
.
get_uptime
()
.
"</uptime>
\n
"
;
$res
.=
"
\t
<temperature>"
.
get_temperature
()
.
"
\t
</temperature>
\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
++
){
$s
=
implode
(
', '
,
$ports
[
$i
][
'sensors'
]);
...
...
@@ -212,12 +220,14 @@ function get_temperature(){
function
get_port_info
(
$port
){
global
$POINTERS_ONLY
;
$pars_res
=
""
;
$ts_res
=
""
;
$pars
=
array
(
'WB_EN'
=>
0
,
'AUTOEXP_
E
N'
=>
0
,
'AUTOEXP_
O
N'
=>
0
,
'COMPRESSOR_RUN'
=>
0
,
'SENSOR_RUN'
=>
0
,
'COLOR'
=>
0
,
...
...
@@ -236,14 +246,17 @@ function get_port_info($port){
'GAINGB'
=>
0
,
);
$pars_res
.=
"
\n
"
;
if
(
!
$POINTERS_ONLY
){
$ps
=
elphel_get_P_arr
(
$port
,
$pars
);
$pars_res
.=
"
\n
\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
$circbuf_pointers
=
elphel_get_circbuf_pointers
(
$port
,
1
);
...
...
@@ -261,7 +274,8 @@ function get_port_info($port){
foreach
(
$meta
as
$m
){
$sec
=
$m
[
'meta'
][
'timestamp_sec'
];
$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
"
;
...
...
src/index/index.php
View file @
2ab69a0f
...
...
@@ -173,10 +173,11 @@
<a
href=
"photofinish/"
title=
"Scanline mode demo"
>
Photo finish demo
</a><br
/>
<br
/>
<a
href=
"hwmon.html"
title=
"hwmon.html"
>
Temperature monitor
</a><br
/>
<a
href=
"update_software.html"
title=
"
u
pdate NAND flash"
>
Update firmware
</a><br
/>
<a
href=
"update_software.html"
title=
"
U
pdate NAND flash"
>
Update firmware
</a><br
/>
<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
/>
</div>
<script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment