Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
03dc3b07
Commit
03dc3b07
authored
May 19, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add command to change byrshift in circbuf
parent
0a06b6ec
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
circbuf.c
src/drivers/elphel/circbuf.c
+15
-0
circbuf.h
src/drivers/elphel/circbuf.h
+1
-0
sensor_common.c
src/drivers/elphel/sensor_common.c
+2
-1
No files found.
src/drivers/elphel/circbuf.c
View file @
03dc3b07
...
...
@@ -694,6 +694,7 @@ loff_t circbuf_lseek(struct file *file, loff_t offset, int orig)
unsigned
short
circbuf_quality
=
100
;
unsigned
short
circbuf_height
=
1936
;
unsigned
short
circbuf_width
=
2592
;
unsigned
char
circbuf_byrshift
=
3
;
ssize_t
circbuf_write
(
struct
file
*
file
,
const
char
*
buf
,
size_t
count
,
loff_t
*
off
)
{
unsigned
long
p
;
...
...
@@ -714,6 +715,7 @@ ssize_t circbuf_write(struct file *file, const char *buf, size_t count, loff_t *
camera_interrupts
(
1
);
break
;
case
3
:
/* update image quality */
buf_copy
[
count
-
1
]
=
0
;
ret
=
kstrtol
(
&
buf_copy
[
2
],
10
,
&
val
);
dev_dbg
(
g_dev_ptr
,
"ret: %d, buf[2]: %s
\n
"
,
ret
,
&
buf_copy
[
2
]);
...
...
@@ -732,6 +734,7 @@ ssize_t circbuf_write(struct file *file, const char *buf, size_t count, loff_t *
dump_state
(
chn
);
break
;
case
5
:
/* print debug statistics */
{
int
j
,
cntr
;
long
long
res
;
...
...
@@ -749,6 +752,7 @@ ssize_t circbuf_write(struct file *file, const char *buf, size_t count, loff_t *
}
break
;
case
6
:
/* update frame size */
{
unsigned
int
w
,
h
;
int
res
=
sscanf
(
&
buf
[
2
],
"%u:%u"
,
&
w
,
&
h
);
...
...
@@ -759,6 +763,17 @@ ssize_t circbuf_write(struct file *file, const char *buf, size_t count, loff_t *
}
}
break
;
case
7
:
/* update Bayer shift */
{
unsigned
char
val
;
int
res
=
sscanf
(
&
buf
[
2
],
"%u"
,
&
val
);
if
(
res
==
1
)
{
circbuf_byrshift
=
val
;
dev_dbg
(
g_dev_ptr
,
"set new bayer shift: %u
\n
"
,
val
);
}
}
break
;
}
/* debug code end */
...
...
src/drivers/elphel/circbuf.h
View file @
03dc3b07
...
...
@@ -46,6 +46,7 @@ extern struct circbuf_priv_t *circbuf_priv_ptr;
extern
unsigned
short
circbuf_quality
;
extern
unsigned
short
circbuf_height
;
extern
unsigned
short
circbuf_width
;
extern
unsigned
char
circbuf_byrshift
;
/* end of debug code */
#endif
/* _CIRCBUF_H */
src/drivers/elphel/sensor_common.c
View file @
03dc3b07
...
...
@@ -363,7 +363,8 @@ inline static void set_default_interframe(struct interframe_params_t *params)
// params->width = 2592;
params
->
height
=
circbuf_height
;
params
->
width
=
circbuf_width
;
params
->
byrshift
=
3
;
// params->byrshift = 3;
params
->
byrshift
=
circbuf_byrshift
;
params
->
color
=
0
;
params
->
quality2
=
circbuf_quality
;
//params->quality2 = 100;
...
...
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