-
Notifications
You must be signed in to change notification settings - Fork 283
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
Added drawBitmap and demos to display bitmaps. #26
Conversation
hiya do you have a software test for this? i can run it on esp32, just some way to test :) |
By the way, this missing method then allows for this cool DemoSauce code to work (at least most of it): |
@ran6110 I think you are commenting on the wrong pull request. This pull request has not been merged, so it could not possibly have impacted you. I recommend you go back in the git history and find the relevant pull request that you think affects you, you can even just rewind the git commits until things work again, and comment on the relevant pull request. Good luck. |
Will merge for now to restore some basic functionality. Note that there is no edge clipping; this will work only for well-behaved sketches. I'll work on that. Also, in the future, I recommend that sketches that won't work on Uno have comments to that effect. |
@PaintYourDragon thanks for your comments, understood. |
Working on the clipping issue. Will be removing the pictureEmbed demo in next commit; can't test, simply doesn't compile on ANY board I have here (M0, WICED, etc.). Recommend a simpler/smaller example with images that fit in 32K or so. |
@PaintYourDragon the demo has instructions on how to make your own pixmap, it's pretty quick. Do you want to give that a shot, or would you like me to go and generate one for you? |
Sadly it's hard for me to test this on an uno and I'm not sure if progmem would work for the picture definition, but I think it would. That should give you 20-30KB for the pixmap, right? |
I put the original comments about image conversion back into the new-and-smaller version of pictureEmbed.ino, calling this done, thanks for helping track this down. |
@PaintYourDragon thank for the merge again and the fixups (and leaving the how to convert to pixmap comments). |
@PaintYourDragon because scrollTo isn't shown/documented anywhere, do you think it's worth adding back to the pixmap display example, or some other example to give people a chance to see how it's used? |
At some point, yes, but this is not that point. Still dealing with fallout from the big transaction-based change. Once support issues for that quiet down, then would look at demoing other new features. |
@PaintYourDragon maybe share some of those issues so we can help? |
@me-no-dev I had a look too, to see if I could help, and all I found was |
This is a followup to
7703b62
from @me-no-dev originally sent to espressif#1
@PaintYourDragon I see you just improved spitftbitmap further. This should be a good alternative for those who don't have an sdcard and still want to display a bitmap.
Now, for full disclosure this original bitmap display code (only 4 lines as you see) was adapted from Paul's old fork of your lib: https://github.com/PaulStoffregen/ILI9341_t3 he had some good example code that only worked on his chips and I thought it was silly that we didn't have access to this on all other capable chips that ran the same LCD, so I found his extra functions and ported them back to your lib through @me-no-dev 's temporary fork. This PR is the last missing bit.
I have tested this on ESP32 both with hardware SPI and software SPI (software SPI should ensure the code works on other chips too). The pitfall is that the examples I gave chew up a lot of RAM, which is going to be missing on non 32bit platforms with less flash.
That said, I think the example is still useful for people to see how drawBitmap and scrollTo get used, and they can easily substitute and smaller bitmap that fits in their RAM/flash (if using progmem)
If you want to drop my bitmap examples or replace them with a small one, that's understandable.
The current demo I included shows a bitmap converted in 2 different ways, and a full size bitmap that gets scrolled horizontally (there is currently no example of ScrollTo that was just added too)
Example: