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
a20f3d19
Commit
a20f3d19
authored
May 20, 2020
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply multiple params in single request
parent
c9ecc342
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
6 deletions
+28
-6
index.php
src/index/index.php
+28
-6
No files found.
src/index/index.php
View file @
a20f3d19
...
...
@@ -361,11 +361,19 @@
async
function
init_lowlatency
(){
$
(
"#low_latency_link"
).
click
(
async
()
=>
{
await
set_param
(
"WOI_WIDTH"
,
1920
,()
=>
{
console
.
log
(
"ok"
);});
await
set_param
(
"WOI_HEIGHT"
,
1088
,()
=>
{
console
.
log
(
"ok"
);});
await
set_param
(
"WOI_TOP"
,
432
,()
=>
{
console
.
log
(
"ok"
);});
await
set_param
(
"WOI_LEFT"
,
336
,()
=>
{
console
.
log
(
"ok"
);});
await
set_param
(
"TRIG_PERIOD"
,
3333333
,()
=>
{
console
.
log
(
"ok"
);});
await
set_params
({
"AUTOEXP_EXP_MAX"
:
30000
,
"WOI_WIDTH"
:
1920
,
"WOI_HEIGHT"
:
1088
,
"WOI_TOP"
:
432
,
"WOI_LEFT"
:
336
},()
=>
{
console
.
log
(
"ok"
)});
await
set_params
({
"TRIG_PERIOD"
:
3333333
},()
=>
{
console
.
log
(
"ok"
);});
$
(
"#ll_status"
).
css
({
opacity
:
1
}).
animate
({
opacity
:
0
},
1000
);
update_canvas_mjpeg
();
});
...
...
@@ -389,9 +397,23 @@
async
function
set_param
(
pname
,
pvalue
,
callback
){
$
.
ajax
({
url
:
"parsedit.php?immediate&sensor_port=
<?php
echo
$master_port
;
?>
&"
+
pname
+
"="
+
pvalue
+
"&*"
+
pname
+
"=0xf"
,
url
:
"parsedit.php?immediate&sensor_port=
<?php
echo
$master_port
;
?>
&"
+
pname
+
"="
+
pvalue
+
"*3&*"
+
pname
+
"=0xf"
,
success
:
callback
});
}
async
function
set_params
(
pars
,
callback
){
let
req
=
[];
for
(
p
in
pars
){
req
.
push
(
p
+
"="
+
pars
[
p
]
+
"&*"
+
p
+
"=0xf"
);
}
$
.
ajax
({
url
:
"parsedit.php?immediate&sensor_port=
<?php
echo
$master_port
;
?>
&"
+
req
.
join
(
"&"
),
success
:
callback
});
}
</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