Skip to content

Commit c8377e7

Browse files
Cleanup
1 parent f4cf505 commit c8377e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/OpenStreetMap-esp32.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,9 @@ bool OpenStreetMap::saveMap(const char *filename, LGFX_Sprite &map, String &resu
488488
}
489489

490490
uint8_t *buf = rowBuffer.get();
491-
for (int y = 0; y < map.height(); y++)
491+
for (uint16_t y = 0; y < map.height(); y++)
492492
{
493-
for (int x = 0; x < map.width(); x++)
493+
for (uint16_t x = 0; x < map.width(); x++)
494494
{
495495
uint16_t rgb565Color = map.readPixel(x, y);
496496
uint8_t red8 = ((rgb565Color >> 11) & 0x1F) * 255 / 31;
@@ -501,7 +501,7 @@ bool OpenStreetMap::saveMap(const char *filename, LGFX_Sprite &map, String &resu
501501
buf[x * 3 + 1] = green8;
502502
buf[x * 3 + 2] = red8;
503503
}
504-
file.write(buf, rowBuffer.size()); // Write entire row at once
504+
file.write(buf, rowBuffer.size());
505505
}
506506

507507
file.close();

0 commit comments

Comments
 (0)