Closed mikelowe983 closed 6 months ago
Hi @mikelowe983 -
Quick question - which OLED screen where you using for your tests? I greb one of these when I take a look at this.
The bitmap code is very efficent, but a little complicated and I'll have to re-grok how I implemented it. I'll try to take a look at this in the next week.
-Kirk
Thanks @gigapod!
I am using this screen for my testing: https://www.digikey.com/en/products/detail/midas-displays/MCOT064048A1V-BM/18088018
It seems to be the same or very similar to the screen used in this breakout board: https://www.sparkfun.com/products/22495
I attempted to trace through the code within the QwGrSSD1306::drawBitmap function, but as you said, it was a bit tough to grok. I'll continue looking at it myself.
Let me know if there is anything I can do to help.
@gigapod I think I've isolated the issue. I've opened a PR which should resolve it here: #18
I read the contributing guidelines, which mentioned targeting the release_candidate
branch, but I did not see one in this repo, so I targeted main
instead.
Let me know if you have any feedback on the PR format, or code changes, let me know. Additionally, please test the changes yourself. I ran through some tests on my own, but it would be great to have your eyes on it as well.
Thanks!
Thaks for finding this @mikelowe983 . I'll get a release updated so the Arduino library bot picks this up.
When using bitmaps of certain sizes, the
oled.bitmap
function will not draw the bitmap correctly.See the below example bitmap:
Calling
oled.bitmap
with a0
for they0
argument draws the bitmap as expected:output:
However, if I pass a non-zero value for
y0
, the bitmap does not draw correctly:output:
The bottom row is not drawn. This also occurs for bitmaps that have heights of 10, 11, 12, etc.