Conversation
Codecov Report
@@ Coverage Diff @@
## master #36 +/- ##
==========================================
+ Coverage 35.74% 37.03% +1.28%
==========================================
Files 18 21 +3
Lines 996 1145 +149
==========================================
+ Hits 356 424 +68
- Misses 640 721 +81
Continue to review full report at Codecov.
|
In my first attempt to update to digital::v2 the result also wasn't what I wanted so I am currently waiting for the digital::v3/other results of the discussion (rust-embedded/wg#393) |
caemor
left a comment
There was a problem hiding this comment.
I'm a little bit unsure about calling this display Display7in5/EPD7in5 even though they are in the separate v2 module. But since every new newly bought 7in5 Display would be one of v2 it should be the better decision 👍
- Would it make sense to add your update_and_display_frame to the main trait?
|
Also thanks for your work :-) 👍 |
|
Thanks for the pointer. Seems to be a very messy situation. Will undo all digital::* changes then. |
Could make sense, waveshare's python reference implementation uses a single |
I think we can leave your current v2 impl/changes and just keep in mind that we need to improve this situation later on (with v3) for which I made a new issue earlier. |
|
I am gonna merge this for now and make the change to the main trait in a seperate pr |
|
Sorry, was occupied with other stuff. Thanks for taking it in. 🙇🏻♂️ |
When I ordered such 7.5" display and tried to use this library I was confused, as nothing worked. After some time I realized the very red note and thought »Oh, I must be a lucky one« since nobody besides Waveshare has support for V2 yet.
After spending hours in the python code and the spec PDF I came up with the following code, which works fine for my display. Not sure if anyone is willing to spend the money to confirm it. 😅
I also got rid of the deprecation warnings from embedded-hal, shouting at me to not use digital::v1 anymore. My workaround might look hacky, but should not be really worse than the logic before, though the
let _ = …might be a bit unpleasing, as well as the.unwrap_or(false)— yes, I make probably a stupid assumption here to unlock the busy state on error, we could also negate and potentially lock forever; dunno what's best. Given that we ignored potentially failing state changes, I think it should be mostly fine.Commit asaaki/epd-waveshare@19e3d51 was an attempt to fix the digital::v2 fallability, but I discovered that it would at least not work with linux-embedded-hal due to error type mismatches. And the examples step of CI is also pretty unhappy about it.