Skip to content

Commit 50922b4

Browse files
committed
Move the icon width and height to above the icon data, add const
Make the width and height easily found for each icon by generically searching for _Width and _Height before the icon data. If width and height not found, use previous width and height. Move the icons, widths and heights from RAM into flash.
1 parent fe7205c commit 50922b4

File tree

2 files changed

+92
-93
lines changed

2 files changed

+92
-93
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,9 +2287,9 @@ void paintResets()
22872287
}
22882288

22892289
//Wrapper to avoid needing to pass width/height data twice
2290-
void displayBitmap(uint8_t x, uint8_t y, uint8_t imageWidth, uint8_t imageHeight, uint8_t *imageData)
2290+
void displayBitmap(uint8_t x, uint8_t y, uint8_t imageWidth, uint8_t imageHeight, const uint8_t *imageData)
22912291
{
2292-
oled.bitmap(x, y, x + imageWidth, y + imageHeight, imageData, imageWidth, imageHeight);
2292+
oled.bitmap(x, y, x + imageWidth, y + imageHeight, (uint8_t *)imageData, imageWidth, imageHeight);
22932293
}
22942294

22952295
void displayKeysUpdated()

0 commit comments

Comments
 (0)