Skip to content

Commit 15ec4b4

Browse files
Mark tiles as not busy in the decoding task (#90)
1 parent c6e6f34 commit 15ec4b4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/OpenStreetMap-esp32.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,6 @@ void OpenStreetMap::runJobs(const std::vector<TileJob> &jobs)
248248

249249
while (pendingJobs.load() > 0)
250250
vTaskDelay(pdMS_TO_TICKS(1));
251-
252-
for (const TileJob &job : jobs)
253-
job.tile->busy = false;
254251
}
255252

256253
bool OpenStreetMap::composeMap(LGFX_Sprite &mapSprite, const tileList &requiredTiles, uint8_t zoom)
@@ -471,7 +468,7 @@ bool OpenStreetMap::fetchTile(CachedTile &tile, uint32_t x, uint32_t y, uint8_t
471468

472469
currentInstance = this;
473470
currentTileBuffer = tile.buffer;
474-
471+
tile.busy = false;
475472
const int decodeResult = png->decode(0, PNG_FAST_PALETTE);
476473
if (decodeResult != PNG_SUCCESS)
477474
{

0 commit comments

Comments
 (0)