-
Notifications
You must be signed in to change notification settings - Fork 136
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
Enable drawing in three colors for epd2in13 #76
Conversation
Move from BinaryColor to TriColor: use one Display fo drawing
I'd like to get your feedback @caemor before I update documentation I'm wondering if you like to add a and remove the individual update fn's for bw and chromatic from this trait. Or change the |
I've created a small application using both this patch and an emulator with one draw function. This way I can develop using emulator, knowing that it will work on the e-paper display too: https://github.com/lrbalt/epd-bootscreen I needed to mock TriColor for using the emulator on my Mac (doesn't compile linux-embedded-hal), since it was defined in epd-waveshare, not embedded-graphics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if you like to add a fn to WaveshareThreeColorDisplay which takes a buffer containing both b/w and chromatic data, i.e. fn update_bw_and_chromatic_frame(&mut self, spi: &mut SPI, bw_and_chromatic_buffer: &[u8]
and remove the individual update fn's for bw and chromatic from this trait. Or change the update_color_frrame to take one buffer. But that means that all tri-color screens need to use one big buffer for both b/w and chromatic. I.e. this exposes the internal data model in the api.
I don't think we should remove the option to just use a smaller buffer and update it in between sending b/w and chromatic. So allowing both options should be the best way to go forwards for now.
Ok, I'll add one new |
I've updated the example in
This would mean that the trait |
Do you think this is ready or do you still want to add something here? |
I think it is ready to merge. |
cool, thanks! |
Move from BinaryColor to TriColor: use one Display for drawing