Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stm32_libraries
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
humanoides
tools
stm32_libraries
Commits
b80dc200
Commit
b80dc200
authored
4 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Solved a bug in the dimension of the img_pattern_data buffer.
Solved a bug in the computation of the image region to show.
parent
6d3ac527
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pattern_frame_buffer/include/image_patterns.h
+1
-1
1 addition, 1 deletion
pattern_frame_buffer/include/image_patterns.h
pattern_frame_buffer/src/image_patterns.c
+2
-2
2 additions, 2 deletions
pattern_frame_buffer/src/image_patterns.c
with
3 additions
and
3 deletions
pattern_frame_buffer/include/image_patterns.h
+
1
−
1
View file @
b80dc200
...
...
@@ -18,7 +18,7 @@
#error "Please, specify the maximum image height with the IMG_MAX_IMAGE_HEIGHT macro"
#endif
extern
unsigned
char
img_pattern_data
[
IMG_MAX_NUM_IMAGES
][
IMG_MAX_IMAGE_
WIDTH
][
IMG_MAX_IMAGE_
HEIGHT
][
3
];
extern
unsigned
char
img_pattern_data
[
IMG_MAX_NUM_IMAGES
][
IMG_MAX_IMAGE_
HEIGHT
][
IMG_MAX_IMAGE_
WIDTH
][
3
];
void
img_patterns_init
(
TMemory
*
memory
,
unsigned
short
int
ram_base_address
);
...
...
This diff is collapsed.
Click to expand it.
pattern_frame_buffer/src/image_patterns.c
+
2
−
2
View file @
b80dc200
...
...
@@ -5,7 +5,7 @@
#include
"ram.h"
// private variables
unsigned
char
img_pattern_data
[
IMG_MAX_NUM_IMAGES
][
IMG_MAX_IMAGE_
WIDTH
][
IMG_MAX_IMAGE_
HEIGHT
][
3
]
=
{{{{
0
}}}};
unsigned
char
img_pattern_data
[
IMG_MAX_NUM_IMAGES
][
IMG_MAX_IMAGE_
HEIGHT
][
IMG_MAX_IMAGE_
WIDTH
][
3
]
=
{{{{
0
}}}};
// private functions
void
img_patterns_compute_range
(
unsigned
short
int
area_min
,
unsigned
short
int
area_max
,
short
int
pattern_start
,
unsigned
short
int
max_size
,
unsigned
short
int
*
buff_start
,
unsigned
short
int
*
buff_end
,
unsigned
char
*
img_start
)
...
...
@@ -36,7 +36,7 @@ void img_patterns_compute_range(unsigned short int area_min,unsigned short int a
if
(
*
buff_start
+
cp_size
>
area_max
)
{
*
buff_end
=
area_max
;
cp_size
-=
area_max
;
cp_size
-=
(
*
buff_start
+
cp_size
-
area_max
)
;
}
else
*
buff_end
=*
buff_start
+
cp_size
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment