Skip to content

Fix image.h guard - #113

Merged
tuupola merged 1 commit into
tuupola:masterfrom
supcik:dev
Jul 31, 2023
Merged

tuupola merged 1 commit into
tuupola:masterfrom
supcik:dev

Conversation

@supcik

@supcik supcik commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

The image.h file has the same guard as pixel.h, so image.h does not get included.

Note : I also had to increase the stack size to use the function hagl_load_image. Perhaps a note in the documentation could be useful.

@tuupola tuupola changed the title Fix guard Fix image.h guard Jul 31, 2023
@tuupola
tuupola merged commit 8281a8a into tuupola:master Jul 31, 2023
@tuupola

tuupola commented Jul 31, 2023

Copy link
Copy Markdown
Owner

Good catch. Thanks!

Note : I also had to increase the stack size to use the function hagl_load_image

With ESP32?

@supcik

supcik commented Jul 31, 2023

Copy link
Copy Markdown
Contributor Author

With ESP32?

Yes, with ESP32 and ESP/IDF version 4.4.5. I just tried in the app_main function and the default stack size seems to be 3.5KB. Increasing the stack size to 8KB solved the problem. I did not try to find the minimum stack size, but I can investigate it if you want.

@supcik

supcik commented Jul 31, 2023

Copy link
Copy Markdown
Contributor Author

The work local variable is already taking more than 3KB :

image

@supcik

supcik commented Jul 31, 2023

Copy link
Copy Markdown
Contributor Author

I guess that the code is anyhow not thread safe, so you could solve this issue by defining the work array as static. It will then no longer take place on the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants