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
cd9c687b
Commit
cd9c687b
authored
May 08, 2019
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing recording from Lepton
parent
36b9f027
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
89 deletions
+93
-89
camogm.c
src/camogm.c
+93
-89
No files found.
src/camogm.c
View file @
cd9c687b
...
@@ -1630,15 +1630,19 @@ int listener_loop(camogm_state *state)
...
@@ -1630,15 +1630,19 @@ int listener_loop(camogm_state *state)
ret
=
poll
(
&
pfd
,
1
,
DEFAULT_POLL_TIMEOUT
);
ret
=
poll
(
&
pfd
,
1
,
DEFAULT_POLL_TIMEOUT
);
if
(
ret
==
0
){
if
(
ret
==
0
){
D6
(
fprintf
(
debug_file
,
"Waiting for commands...
\n
"
));
D6
(
fprintf
(
debug_file
,
"Waiting for commands...
, state->prog_state = %d, pfd.revents=%d
\n
"
,
state
->
prog_state
,
(
int
)
pfd
.
revents
));
}
}
if
(
pfd
.
revents
&
POLLIN
){
if
(
pfd
.
revents
&
POLLIN
){
cmd
=
parse_cmd
(
state
,
cmd_file
);
cmd
=
parse_cmd
(
state
,
cmd_file
);
if
(
cmd
)
{
if
(
cmd
)
{
if
(
cmd
<
0
)
D0
(
fprintf
(
debug_file
,
"Unrecognized command
\n
"
));
if
(
cmd
<
0
)
D0
(
fprintf
(
debug_file
,
"Unrecognized command
\n
"
));
}
}
else
if
(
state
->
prog_state
==
STATE_RUNNING
)
{
// no commands in queue, started
}
else
if
(
state
->
prog_state
==
STATE_RUNNING
)
{
// no commands in queue, started
D6
(
fprintf
(
debug_file
,
"state->prog_state == STATE_RUNNING "
));
switch
((
rslt
=
-
sendImageFrame
(
state
)))
{
switch
((
rslt
=
-
sendImageFrame
(
state
)))
{
D6
(
fprintf
(
debug_file
,
" ==> %d"
,
rslt
));
case
0
:
case
0
:
break
;
// frame sent OK, nothing to do (TODO: check file length/duration)
break
;
// frame sent OK, nothing to do (TODO: check file length/duration)
case
CAMOGM_FRAME_NOT_READY
:
// just wait for the frame to appear at the current pointer
case
CAMOGM_FRAME_NOT_READY
:
// just wait for the frame to appear at the current pointer
...
@@ -1727,7 +1731,7 @@ int listener_loop(camogm_state *state)
...
@@ -1727,7 +1731,7 @@ int listener_loop(camogm_state *state)
state
->
rawdev
.
thread_state
=
STATE_RUNNING
;
state
->
rawdev
.
thread_state
=
STATE_RUNNING
;
usleep
(
COMMAND_LOOP_DELAY
);
// make it longer but interruptible by signals?
usleep
(
COMMAND_LOOP_DELAY
);
// make it longer but interruptible by signals?
}
}
}
// if pfd.revents & POLLIN
//
} // if pfd.revents & POLLIN
}
// while (process)
}
// while (process)
// normally, we should not be here
// normally, we should not be here
...
...
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