Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-autoexposure
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-autoexposure
Commits
487dd09b
Commit
487dd09b
authored
Nov 07, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added waiting for frame>0 at startup, daemons can be started before bitstream load
parent
66cba9b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
autoexposure.c
src/autoexposure.c
+2
-1
globalsinit.c
src/globalsinit.c
+7
-0
No files found.
src/autoexposure.c
View file @
487dd09b
...
...
@@ -135,9 +135,10 @@ int main (int argc, char *argv[]) {
daemon_bit
=
strtol
(
argv
[
6
],
NULL
,
10
);
if
((
daemon_bit
<
0
)
||
(
daemon_bit
>
31
))
{
printf
(
"Invalid bit number %d (should be 0..31)
\n
"
,
daemon_bit
);
exit
(
1
);}
fprintf
(
stderr
,
"autoexposure started,
daemon_bit=0x%x, debug=0x%x
\n
"
,
daemon_bit
,
autoexposure_debug
);
fprintf
(
stderr
,
"autoexposure started,
port = %d, daemon_bit=0x%x, debug=0x%x
\n
"
,
sensor_port
,
daemon_bit
,
autoexposure_debug
);
// MDF1(fprintf(stderr,"\n"));
if
(
initFilesMmap
(
sensor_port
,
sensor_subchannel
)
<
0
)
exit
(
1
);
/// initialization errors
MDF0
(
fprintf
(
stderr
,
"autoexposure: drivers initialized
\n
"
));
if
(
autoexposure_debug
<
0
)
{
/// tempoorary hack for testing
GLOBALPARS_SNGL
(
G_DEBUG
)
=
0
;
exit
(
0
);
...
...
src/globalsinit.c
View file @
487dd09b
...
...
@@ -75,6 +75,13 @@ int initFilesMmap(int sensor_port, int sensor_subchannel) {
ELP_FERR
(
fprintf
(
stderr
,
"Open failed: (%s)
\r\n
"
,
framepars_driver_name
));
return
-
1
;
}
// Wait hardware to be initialized, so frame number >0 (otherwise histograms_cache will fail to open as it depends on number of subframes)
lseek
(
fd_fparmsall
,
1
+
LSEEK_FRAME_WAIT_ABS
,
SEEK_END
);
/// skip 3 frames (first got 0 pixels, 2- 0x3fff) - one extra, sometimes it is needed
// frameParsAll = (struct framepars_all_t *) mmap(0, sizeof (struct framepars_all_t) * HISTOGRAM_CACHE_NUMBER , PROT_READ | PROT_WRITE, MAP_SHARED, fd_fparmsall, 0);
frameParsAll
=
(
struct
framepars_all_t
*
)
mmap
(
0
,
sizeof
(
struct
framepars_all_t
),
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd_fparmsall
,
0
);
...
...
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