Skip to content

Commit 5e70d2c

Browse files
Fixed logging and OSM_BGCOLOR (#107)
1 parent c6bcd03 commit 5e70d2c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/OpenStreetMap-esp32.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ void OpenStreetMap::makeJobList(const tileList &requiredTiles, std::vector<TileJ
237237
CachedTile *tileToReplace = findUnusedTile(requiredTiles, zoom);
238238
if (!tileToReplace)
239239
{
240+
log_e("Cache error, no unused tile found, could not store tile %lu, %i, %u", x, y, zoom);
240241
tilePointers.push_back(nullptr); // again, keep 1:1 aligned
241242
continue;
242243
}
@@ -290,7 +291,7 @@ bool OpenStreetMap::composeMap(LGFX_Sprite &mapSprite, TileBufferList &tilePoint
290291
mapSprite.pushImage(drawX, drawY, currentProvider->tileSize, currentProvider->tileSize, tile);
291292
}
292293

293-
mapSprite.setTextColor(TFT_BLACK);
294+
mapSprite.setTextColor(TFT_WHITE, OSM_BGCOLOR);
294295
mapSprite.drawRightString(currentProvider->attribution, mapSprite.width(), mapSprite.height() - 10, &DejaVu9Modded);
295296
mapSprite.setTextColor(TFT_WHITE, TFT_BLACK);
296297
return true;

src/OpenStreetMap-esp32.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
#include "HTTPClientRAII.hpp"
4141
#include "fonts/DejaVu9-modded.h"
4242

43-
constexpr uint16_t OSM_BGCOLOR = lgfx::color565(100, 110, 120);
44-
constexpr uint16_t OSM_TILE_TIMEOUT_MS = 500;
43+
constexpr uint16_t OSM_BGCOLOR = lgfx::color565(32, 32, 128);
44+
constexpr uint16_t OSM_TILE_TIMEOUT_MS = 1000;
4545
constexpr UBaseType_t OSM_TASK_PRIORITY = 1;
4646
constexpr uint32_t OSM_TASK_STACKSIZE = 5120;
4747
constexpr uint32_t OSM_JOB_QUEUE_SIZE = 50;

0 commit comments

Comments
 (0)