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
d9494184
Commit
d9494184
authored
Jul 16, 2020
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
centered WOI resizing
parent
7a275771
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
9 deletions
+26
-9
index.php
src/index/index.php
+26
-9
No files found.
src/index/index.php
View file @
d9494184
...
@@ -120,8 +120,12 @@
...
@@ -120,8 +120,12 @@
$sample_port
=
-
1
;
$sample_port
=
-
1
;
foreach
(
get_sensors
()
as
$i
=>
$sensor
){
$sensors
=
get_sensors
();
$sensor_type
=
"none"
;
foreach
(
$sensors
as
$i
=>
$sensor
){
if
(
$sensor
!=
"none"
){
if
(
$sensor
!=
"none"
){
$sensor_type
=
$sensor
;
$sample_port
=
$i
;
$sample_port
=
$i
;
$sandp
=
"http://
{
$_SERVER
[
"SERVER_ADDR"
]
}
:"
.
(
$port0
+
$i
);
$sandp
=
"http://
{
$_SERVER
[
"SERVER_ADDR"
]
}
:"
.
(
$port0
+
$i
);
...
@@ -167,6 +171,9 @@
...
@@ -167,6 +171,9 @@
$expos
=
elphel_get_P_value
(
$master_port
,
ELPHEL_EXPOS
);
$expos
=
elphel_get_P_value
(
$master_port
,
ELPHEL_EXPOS
);
$expos
=
round
(
$expos
/
100
)
/
10
;
$expos
=
round
(
$expos
/
100
)
/
10
;
$sensor_width
=
elphel_get_P_value
(
$master_port
,
ELPHEL_SENSOR_WIDTH
);
$sensor_height
=
elphel_get_P_value
(
$master_port
,
ELPHEL_SENSOR_HEIGHT
);
echo
"<table><tr>
$table_contents
</tr></table>
\n
"
;
echo
"<table><tr>
$table_contents
</tr></table>
\n
"
;
echo
"<br/>"
;
echo
"<br/>"
;
...
@@ -243,6 +250,10 @@
...
@@ -243,6 +250,10 @@
<script>
<script>
var
sensor_type
=
"
<?php
echo
$sensor_type
;
?>
"
;
var
sensor_width
=
<?php
echo
$sensor_width
;
?>
;
var
sensor_height
=
<?php
echo
$sensor_height
;
?>
;
var
jp4_previews_enable
=
true
;
var
jp4_previews_enable
=
true
;
var
jp4_previews
=
[];
var
jp4_previews
=
[];
...
@@ -412,16 +423,19 @@
...
@@ -412,16 +423,19 @@
$
(
"#quick_1080p"
).
click
(
async
function
(){
$
(
"#quick_1080p"
).
click
(
async
function
(){
let
w
=
1920
;
let
h
=
1088
;
await
set_params
({
await
set_params
({
"TRIG_PERIOD"
:
10000000
"TRIG_PERIOD"
:
10000000
},
-
2
);
},
-
2
);
await
set_params
({
await
set_params
({
"AUTOEXP_EXP_MAX"
:
30000
,
"AUTOEXP_EXP_MAX"
:
30000
,
"WOI_WIDTH"
:
1920
,
"WOI_WIDTH"
:
w
,
"WOI_HEIGHT"
:
1088
,
"WOI_HEIGHT"
:
h
,
"WOI_TOP"
:
43
2
,
"WOI_TOP"
:
(
sensor_height
-
h
)
/
2
,
"WOI_LEFT"
:
336
,
"WOI_LEFT"
:
(
sensor_width
-
w
)
/
2
,
"SENSOR_RUN"
:
0
,
"SENSOR_RUN"
:
0
,
"COMPRESSOR_RUN"
:
3
"COMPRESSOR_RUN"
:
3
},
3
);
},
3
);
...
@@ -438,16 +452,19 @@
...
@@ -438,16 +452,19 @@
$
(
"#quick_720p"
).
click
(
async
function
(){
$
(
"#quick_720p"
).
click
(
async
function
(){
let
w
=
1280
;
let
h
=
720
;
await
set_params
({
await
set_params
({
"TRIG_PERIOD"
:
10000000
"TRIG_PERIOD"
:
10000000
},
-
2
);
},
-
2
);
await
set_params
({
await
set_params
({
"AUTOEXP_EXP_MAX"
:
16000
,
"AUTOEXP_EXP_MAX"
:
16000
,
"WOI_WIDTH"
:
1280
,
"WOI_WIDTH"
:
w
,
"WOI_HEIGHT"
:
720
,
"WOI_HEIGHT"
:
h
,
"WOI_TOP"
:
616
,
"WOI_TOP"
:
(
sensor_height
-
h
)
/
2
,
"WOI_LEFT"
:
656
,
"WOI_LEFT"
:
(
sensor_width
-
w
)
/
2
,
"SENSOR_RUN"
:
0
,
"SENSOR_RUN"
:
0
,
"COMPRESSOR_RUN"
:
3
"COMPRESSOR_RUN"
:
3
},
3
);
},
3
);
...
...
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