Closed bugadani closed 4 years ago
I believe the various display properties need some thought here. I prefer the closure method for setting them, because it doesn't require implementing the same functionality in like 3 places ( one impl and 2 forwarders in the display modes), but your request is totally sensible. Should I include other properties in the common set (i.e. the trait)?
I've copied the rtfm_dvd example and set it up so when the logo hits the sides, the brightness changes. Unfortunately, I have no hardware to test it.
I'm still leaving this as draft, because I just don't like the 2 parameter implementation (omitting precharge period 1 was an arbitrary choice, for example), it doesn't feel... exact.
I really don't have a better idea of how to implement this in a somewhat nice manner, so I'm marking the PR as ready.
I just merged #126 so if you can give this a rebase I'll approve and merge once the build passes.
The build is failing with some unused/not found errors.
Once fixed, you can try running TARGET=thumbv7m-none-eabi ./build.sh
on your PC to test things before pushing if you want.
Ah yes, I renamed change_brightness to set, but forgot the example... Oh well
That's better
Thanks!
Hi! Thank you for helping out with SSD1306 development! Please:
master
if you're not already up to dateCHANGELOG.md
entry in the Unreleased section under the appropriate heading (Added, Fixed, Changed, etc)rustfmt
on the project withcargo fmt --all
- CI will not pass without this stepPR description
Some open questions that I still have:
change_property
with a closure, because it allows for the same (and more) functionality without implementing a bunch of forwarder methods. Or maybe it is overly generic in the current form.So for now, this is only a draft.