Closed mvirkkunen closed 5 years ago
Yes, I copied this crate from SSD1306 as a starting point. Can you create a PR and maybe an example so I can test with the display I have?
I noticed you used the SSH1306 crate as a foundation but I thought it was odd that the SH1106 specific commands did exist at one point, but then were removed. I'll clean up my quickly hacked together code (I had to get something working) and make a PR.
Honestly this is a pretty poor quality crate at the moment. I sneezed it out just to get pixels on my display and to get the ball rolling for other people :slightly_smiling_face:. There are a lot of improvements that can be made as you're discovering now. I appreciate the PR offers - I don't have a huge amount of spare time right now to fix all the issues :heart_decoration:.
Did something accidentally get copied and pasted over from the SSD1306 driver at some point? https://github.com/jamwaffles/sh1106/blob/master/src/command.rs seems to have addressing commands that don't exist on SH1106, and therefore drawing results in garbage (at least on the module I have) due to the wrong column address commands and the fact that SH1106 doesn't increment the page address automatically.
It seems some of the correct commands were implemented at one point, but were removed here: 64994e34d8def7ce81bea004b1b7366bd6f4b19c
I can write a PR for this if needed.