Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-camogm
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-apps-camogm
Commits
ee9032de
Commit
ee9032de
authored
Apr 07, 2017
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get update period for interface from status output
parent
8efb3a01
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
camogm_jpeg.c
src/camogm_jpeg.c
+1
-1
camogmgui.js
src/camogmgui/camogmgui.js
+15
-0
No files found.
src/camogm_jpeg.c
View file @
ee9032de
...
@@ -270,7 +270,7 @@ int camogm_start_jpeg(camogm_state *state)
...
@@ -270,7 +270,7 @@ int camogm_start_jpeg(camogm_state *state)
}
}
offset
=
lba_to_offset
(
state
->
writer_params
.
lba_current
-
state
->
writer_params
.
lba_start
);
offset
=
lba_to_offset
(
state
->
writer_params
.
lba_current
-
state
->
writer_params
.
lba_start
);
lseek64
(
state
->
writer_params
.
blockdev_fd
,
offset
,
SEEK_SET
);
lseek64
(
state
->
writer_params
.
blockdev_fd
,
offset
,
SEEK_SET
);
D
6
(
fprintf
(
debug_file
,
"Open block device: %s, offset in bytes: %llu
\n
"
,
state
->
rawdev
.
rawdev_path
,
offset
));
D
3
(
fprintf
(
debug_file
,
"Open block device: %s, offset in bytes: %llu
\n
"
,
state
->
rawdev
.
rawdev_path
,
offset
));
state
->
writer_params
.
stat_update
=
time
(
NULL
);
state
->
writer_params
.
stat_update
=
time
(
NULL
);
}
}
...
...
src/camogmgui/camogmgui.js
View file @
ee9032de
...
@@ -414,6 +414,21 @@ function process_recording(xmldoc) {
...
@@ -414,6 +414,21 @@ function process_recording(xmldoc) {
if
(
state
==
'"stopped"'
){
if
(
state
==
'"stopped"'
){
clearInterval
(
update_intvl
);
clearInterval
(
update_intvl
);
}
else
{
var
frame_period
=
0
;
var
rates
=
xmldoc
.
getElementsByTagName
(
'frame_period'
);
for
(
var
i
=
0
;
i
<
rates
.
length
;
i
++
)
{
var
data
=
parseInt
(
rates
[
i
].
firstChild
.
data
);
if
(
data
>
frame_period
)
frame_period
=
data
;
}
if
(
frame_period
!=
0
)
{
frame_period
/=
1000
;
}
else
{
frame_period
=
1000
;
}
clearInterval
(
update_intvl
);
update_intvl
=
setInterval
(
update_state
,
frame_period
);
}
}
//Update HTML
//Update HTML
document
.
getElementById
(
'ajax_state'
).
innerHTML
=
state
.
substring
(
1
,
state
.
length
-
1
);
document
.
getElementById
(
'ajax_state'
).
innerHTML
=
state
.
substring
(
1
,
state
.
length
-
1
);
...
...
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