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
9f570c69
Commit
9f570c69
authored
Apr 24, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto exposure on/off
parent
9353c3a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
12 deletions
+68
-12
index.php
src/index/index.php
+68
-12
No files found.
src/index/index.php
View file @
9f570c69
...
...
@@ -83,6 +83,11 @@
.btn.active
:focus
,
.btn
:focus
{
outline
:
none
;
}
.btn-toggle
{
padding
:
1px
0px
;
}
</style>
</head>
<body>
...
...
@@ -126,7 +131,7 @@
// check awb of master channel
$master_port
=
elphel_get_P_value
(
$sample_port
,
ELPHEL_TRIG_MASTER
);
$awb_on
=
elphel_get_P_value
(
$master_port
,
ELPHEL_WB_EN
);
$aexp_on
=
elphel_get_P_value
(
$master_port
,
ELPHEL_AUTOEXP_ON
);
echo
"<table><tr>
$table_contents
</tr></table>
\n
"
;
...
...
@@ -135,14 +140,30 @@
echo
"Camera Control Interface<ul>
$port_links
</ul>
\n
"
;
?>
<span
title=
'Auto White Balance'
>
Auto WB:
<div
class=
"btn-group btn-toggle"
>
<button
class=
"btn btn-xs
<?php
echo
(
$awb_on
)
?
"btn-success active"
:
"btn-default"
;
?>
"
>
ON
</button>
<button
class=
"btn btn-xs
<?php
echo
(
!
$awb_on
)
?
"btn-danger active"
:
"btn-default"
;
?>
"
>
OFF
</button>
</div>
</span>
<br
/>
<table>
<tr
id=
"toggle_awb"
title=
'Auto White Balance'
>
<td>
Auto WB:
</td>
<td>
<div
id=
"toggle_awb"
class=
"btn-group btn-toggle"
>
<button
class=
"btn btn-xs
<?php
echo
(
$awb_on
)
?
"btn-success active"
:
"btn-default"
;
?>
"
>
ON
</button>
<button
class=
"btn btn-xs
<?php
echo
(
!
$awb_on
)
?
"btn-danger active"
:
"btn-default"
;
?>
"
>
OFF
</button>
</div>
</td>
</tr>
<tr
id=
"toggle_aexp"
title=
'Auto Exposure'
>
<td>
Auto Exposure:
</td>
<td>
<div
id=
"toggle_aexp"
class=
"btn-group btn-toggle"
>
<button
class=
"btn btn-xs
<?php
echo
(
$aexp_on
)
?
"btn-success active"
:
"btn-default"
;
?>
"
>
ON
</button>
<button
class=
"btn btn-xs
<?php
echo
(
!
$aexp_on
)
?
"btn-danger active"
:
"btn-default"
;
?>
"
>
OFF
</button>
</div>
</td>
</tr>
</table>
<br
/>
<a
href=
"autocampars.php"
title=
"autocampars.php"
>
Parameter Editor
</a><br
/>
<br
/>
...
...
@@ -161,6 +182,7 @@
<script>
$
(
function
(){
init_awb_toggle
();
init_aexp_toggle
();
init_jp4_previews
();
});
...
...
@@ -172,7 +194,7 @@ function init_jp4_previews(){
}
function
init_awb_toggle
(){
$
(
'
.btn-toggle
'
).
click
(
function
()
{
$
(
'
#toggle_awb
'
).
click
(
function
()
{
if
(
$
(
this
).
find
(
'.btn.active'
).
html
()
==
"ON"
){
$
(
this
).
find
(
'.btn.active'
).
toggleClass
(
'btn-success'
);
...
...
@@ -201,9 +223,43 @@ function init_awb_toggle(){
console
.
log
(
"awb "
+
(
wb_en
?
"on"
:
"off"
));
}
});
});
}
function
init_aexp_toggle
(){
$
(
'#toggle_aexp'
).
click
(
function
()
{
if
(
$
(
this
).
find
(
'.btn.active'
).
html
()
==
"ON"
){
$
(
this
).
find
(
'.btn.active'
).
toggleClass
(
'btn-success'
);
}
else
{
$
(
this
).
find
(
'.btn.active'
).
toggleClass
(
'btn-danger'
);
}
// toggle active
$
(
this
).
find
(
'.btn'
).
toggleClass
(
'active'
);
if
(
$
(
this
).
find
(
'.btn.active'
).
html
()
==
"ON"
){
aexp_en
=
1
;
$
(
this
).
find
(
'.btn.active'
).
toggleClass
(
'btn-success'
);
}
else
{
aexp_en
=
0
;
$
(
this
).
find
(
'.btn.active'
).
toggleClass
(
'btn-danger'
);
}
$
(
this
).
find
(
'.btn'
).
toggleClass
(
'btn-default'
);
});
}
url
=
"parsedit.php?immediate&sensor_port=
<?php
echo
$master_port
;
?>
&AUTOEXP_ON="
+
aexp_en
+
"&*AUTOEXP_ON=0xf"
;
$
.
ajax
({
url
:
url
,
success
:
function
(){
console
.
log
(
"aexp "
+
(
aexp_en
?
"on"
:
"off"
));
}
});
});
}
</script>
<body>
...
...
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