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
0564ebaf
Commit
0564ebaf
authored
Jan 04, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+comments
parent
d72dfabf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
pgm_functions.c
src/drivers/elphel/pgm_functions.c
+5
-0
No files found.
src/drivers/elphel/pgm_functions.c
View file @
0564ebaf
...
@@ -1810,10 +1810,15 @@ int pgm_hist (int sensor_port, ///< sensor port number (0..3
...
@@ -1810,10 +1810,15 @@ int pgm_hist (int sensor_port, ///< sensor port number (0..3
if
(
hist_setup_data
.
left
>
(
thispars
->
pars
[
P_ACTUAL_WIDTH
]
-
hist_setup_data
.
width
))
hist_setup_data
.
left
=
thispars
->
pars
[
P_ACTUAL_WIDTH
]
-
hist_setup_data
.
width
;
if
(
hist_setup_data
.
left
>
(
thispars
->
pars
[
P_ACTUAL_WIDTH
]
-
hist_setup_data
.
width
))
hist_setup_data
.
left
=
thispars
->
pars
[
P_ACTUAL_WIDTH
]
-
hist_setup_data
.
width
;
#ifdef BUGFIX_HISTWND_HEIGHT
#ifdef BUGFIX_HISTWND_HEIGHT
// bug 1: if not "-2" from hist_setup_data.height - there will be a blue/green bar near 0 (pix value)
// bug 2: NOT FIXED ... hist_setup_data.top=0 and rheight=100% - port 3 blue gets to port 2 blue channel
// lowering actual_height does not fix
actual_height
=
thispars
->
pars
[
P_ACTUAL_HEIGHT
]
-
2
;
actual_height
=
thispars
->
pars
[
P_ACTUAL_HEIGHT
]
-
2
;
hist_setup_data
.
height
=
((
thispars
->
pars
[
P_HISTWND_RHEIGHT
+
poffs
]
*
actual_height
)
>>
16
)
&
0xfffe
;
hist_setup_data
.
height
=
((
thispars
->
pars
[
P_HISTWND_RHEIGHT
+
poffs
]
*
actual_height
)
>>
16
)
&
0xfffe
;
if
(
hist_setup_data
.
height
<
2
)
hist_setup_data
.
height
=
2
;
if
(
hist_setup_data
.
height
<
2
)
hist_setup_data
.
height
=
2
;
else
if
(
hist_setup_data
.
height
>
actual_height
)
hist_setup_data
.
height
=
actual_height
;
else
if
(
hist_setup_data
.
height
>
actual_height
)
hist_setup_data
.
height
=
actual_height
;
hist_setup_data
.
top
=
((
thispars
->
pars
[
P_HISTWND_RTOP
+
poffs
]
*
(
actual_height
-
hist_setup_data
.
height
))
>>
16
)
&
0xfffe
;
hist_setup_data
.
top
=
((
thispars
->
pars
[
P_HISTWND_RTOP
+
poffs
]
*
(
actual_height
-
hist_setup_data
.
height
))
>>
16
)
&
0xfffe
;
if
(
hist_setup_data
.
top
>
(
actual_height
-
hist_setup_data
.
height
))
hist_setup_data
.
top
=
actual_height
-
hist_setup_data
.
height
;
if
(
hist_setup_data
.
top
>
(
actual_height
-
hist_setup_data
.
height
))
hist_setup_data
.
top
=
actual_height
-
hist_setup_data
.
height
;
#else
#else
...
...
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