Skip to content

Commit 3d58c20

Browse files
authored
Merge pull request #18 from mikelowe983/mikelowe/issue-17-draw-bitmap-straddle-byte
Fix issue with drawing bitmaps of certain heights at non-zero y0 values
2 parents 0a00d22 + 19c3e83 commit 3d58c20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qwiic_grssd1306.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ void QwGrSSD1306::drawBitmap(uint8_t x0, uint8_t y0, uint8_t dst_width,
880880

881881
if (remainingBits) // more data to add from the next byte in this column
882882
bmp_data |= (pBitmap[bmp_width * (bmpPage + 1) + bmp_x] & bmp_mask[1])
883-
<< (kByteNBits - remainingBits);
883+
<< (neededBits - remainingBits);
884884

885885
// Write the bmp data to the graphics buffer - using current write op.
886886
// Note, if the location in the buffer didn't start at bit 0, we shift

0 commit comments

Comments
 (0)