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
213e3b1d
Commit
213e3b1d
authored
Sep 09, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sysfs path variable
parent
a9f84049
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
Makefile
Makefile
+1
-1
camogm_jpeg.c
camogm_jpeg.c
+5
-9
No files found.
Makefile
View file @
213e3b1d
...
@@ -3,7 +3,7 @@ PHPFILES = camogmstate.php
...
@@ -3,7 +3,7 @@ PHPFILES = camogmstate.php
CONFIGS
=
qt_source
CONFIGS
=
qt_source
SRCS
=
camogm.c camogm_ogm.c camogm_jpeg.c camogm_mov.c camogm_kml.c camogm_read.c index_list.c
SRCS
=
camogm.c camogm_ogm.c camogm_jpeg.c camogm_mov.c camogm_kml.c camogm_read.c index_list.c
OBJS
=
camogm.o camogm_ogm.o camogm_jpeg.o camogm_mov.o camogm_kml.o camogm_read.o index_list.o
OBJS
=
$
(
SRCS:.c
=
.o
)
CFLAGS
+=
-Wall
-I
$(STAGING_KERNEL_DIR)
/include/elphel
-I
$(STAGING_DIR_HOST)
/usr/include-uapi
CFLAGS
+=
-Wall
-I
$(STAGING_KERNEL_DIR)
/include/elphel
-I
$(STAGING_DIR_HOST)
/usr/include-uapi
LDLIBS
+=
-logg
-pthread
-lm
LDLIBS
+=
-logg
-pthread
-lm
...
...
camogm_jpeg.c
View file @
213e3b1d
...
@@ -81,9 +81,10 @@ int camogm_start_jpeg(camogm_state *state)
...
@@ -81,9 +81,10 @@ int camogm_start_jpeg(camogm_state *state)
state
->
rawdev
.
start_pos
,
state
->
rawdev
.
end_pos
,
state
->
rawdev
.
curr_pos_w
));
state
->
rawdev
.
start_pos
,
state
->
rawdev
.
end_pos
,
state
->
rawdev
.
curr_pos_w
));
lseek64
(
state
->
rawdev
.
rawdev_fd
,
state
->
rawdev
.
curr_pos_w
,
SEEK_SET
);
lseek64
(
state
->
rawdev
.
rawdev_fd
,
state
->
rawdev
.
curr_pos_w
,
SEEK_SET
);
state
->
rawdev
.
sysfs_fd
=
open
(
sysfs_fname
,
O_WRONLY
);
state
->
rawdev
.
sysfs_fd
=
open
(
SYSFS_AHCI_WRITE
,
O_WRONLY
);
fprintf
(
debug_file
,
"Open sysfs file: %s
\n
"
,
SYSFS_AHCI_WRITE
);
if
(
state
->
rawdev
.
sysfs_fd
<
0
)
{
if
(
state
->
rawdev
.
sysfs_fd
<
0
)
{
D0
(
fprintf
(
debug_file
,
"Error opening sysfs file: %s
\n
"
,
sysfs_fname
));
D0
(
fprintf
(
debug_file
,
"Error opening sysfs file: %s
\n
"
,
SYSFS_AHCI_WRITE
));
return
-
CAMOGM_FRAME_FILE_ERR
;
return
-
CAMOGM_FRAME_FILE_ERR
;
}
}
}
}
...
@@ -101,15 +102,10 @@ int camogm_start_jpeg(camogm_state *state)
...
@@ -101,15 +102,10 @@ int camogm_start_jpeg(camogm_state *state)
*/
*/
int
camogm_frame_jpeg
(
camogm_state
*
state
)
int
camogm_frame_jpeg
(
camogm_state
*
state
)
{
{
int
i
,
j
,
k
,
split_index
;
int
i
,
j
;
int
chunks_used
=
state
->
chunk_index
-
1
;
ssize_t
iovlen
,
l
=
0
;
ssize_t
iovlen
,
l
=
0
;
struct
iovec
chunks_iovec
[
8
];
struct
iovec
chunks_iovec
[
8
];
unsigned
char
*
split_ptr
=
NULL
;
long
split_cntr
=
0
;
int
port
=
state
->
port_num
;
int
port
=
state
->
port_num
;
uint32_t
start_time
,
end_time
;
off_t
free_space
;
struct
frame_data
fdata
=
{
0
};
struct
frame_data
fdata
=
{
0
};
if
(
!
state
->
rawdev_op
)
{
if
(
!
state
->
rawdev_op
)
{
...
@@ -176,7 +172,7 @@ int camogm_end_jpeg(camogm_state *state)
...
@@ -176,7 +172,7 @@ int camogm_end_jpeg(camogm_state *state)
if
(
write
(
state
->
rawdev
.
sysfs_fd
,
&
fdata
,
sizeof
(
struct
frame_data
))
<
0
)
{
if
(
write
(
state
->
rawdev
.
sysfs_fd
,
&
fdata
,
sizeof
(
struct
frame_data
))
<
0
)
{
D0
(
fprintf
(
debug_file
,
"Error sending 'finish' command to driver
\n
"
));
D0
(
fprintf
(
debug_file
,
"Error sending 'finish' command to driver
\n
"
));
}
}
D0
(
fprintf
(
debug_file
,
"Closing sysfs file %s
\n
"
,
sysfs_fname
));
D0
(
fprintf
(
debug_file
,
"Closing sysfs file %s
\n
"
,
SYSFS_AHCI_WRITE
));
ret
=
close
(
state
->
rawdev
.
sysfs_fd
);
ret
=
close
(
state
->
rawdev
.
sysfs_fd
);
if
(
ret
==
-
1
)
if
(
ret
==
-
1
)
D0
(
fprintf
(
debug_file
,
"Error: %s
\n
"
,
strerror
(
errno
)));
D0
(
fprintf
(
debug_file
,
"Error: %s
\n
"
,
strerror
(
errno
)));
...
...
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