Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023.9.1: Add screen id support to bitmap_small and add rainbow_bitmap_small #116

Merged

Conversation

andrewjswan
Copy link

No description provided.

@lubeda
Copy link
Owner

lubeda commented Oct 18, 2023

What's the benefit, you can only have one bitmap_small at a time?

@andrewjswan
Copy link
Author

This removes the limitation of one screen with an icon from the HA, you can display more than one

@andrewjswan andrewjswan changed the title 2023.9.1: Add screen id support to bitmap_small 2023.9.1: Add screen id support to bitmap_small and add rainbow_bitmap_small Oct 19, 2023
@andrewjswan
Copy link
Author

I add rainbow bitmap small screen with screen_id support

@lubeda lubeda merged commit 4bc65f8 into lubeda:2023.9.1 Oct 20, 2023
3 of 5 checks passed
@andrewjswan
Copy link
Author

What's the benefit, you can only have one bitmap_small at a time?

I didn't notice that the bitmap_small array is not part of the queue object and it can be only one, I need to think how to redesign this nicely without adding an bitmap_small array to each queue element.
Maybe make a separate inheritor?

@andrewjswan
Copy link
Author

Although, if we take the maximum, we can have maximum 24 screens const uint8_t MAXQUEUE = 24; in each screen if we add PROGMEM Color sbitmap[64]; we will get 64 * 4 * 24 = 6144 bytes, i.e. 6 kilobytes. Not such a big charge given the availability of flash memory in Esp32.
@lubeda What do you think about it?

@lubeda
Copy link
Owner

lubeda commented Oct 23, 2023

hi, the bitmap array for each queue element was also my plan. This would be the cleaner way to implement instead of providing additional over 20 unused arrays. I need the ram for the voiceassitant and PROGMEM is slower than RAM which is also not optimal.

@andrewjswan
Copy link
Author

hi, the bitmap array for each queue element was also my plan.

Do you mean a separate array that is MAXQUEUE in length? Or a separate dynamic array that will be automatically added when a specific screen is added?

I need the ram for the voiceassitant

Ulanzi doesn't have a microphone, or are we talking about a separate device?

PROGMEM is slower than RAM which is also not optimal.

I don't think we'll notice a difference in performance.

@andrewjswan
Copy link
Author

@lubeda I’ll make changes for now (I’ll move the array declaration for the icon to the queue), and when you have free time, you’ll do what you planned.

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