# Merge upstream/master into mod/master **Date:** 2026-02-13 **Branch:** `mod/merge-upstream` (from `mod/master`) **Commit:** `82bfbd8` ## Task Merged 3 new upstream/master commits into the mod fork: 1. `7a385d7` feat: Allow screenshot retrieval from device (#820) 2. `cb24947` feat: Add central logging pragma (#843) — replaces Serial.printf with LOG_* macros across ~50 files, adds Logging library 3. `6e51afb` fix: Account for nbsp character as non-breaking space (#757) ## Conflicts Resolved ### src/main.cpp (1 conflict region) - Kept mod's `HalPowerManager` (deep sleep, power saving) + upstream's `Logging.h` and `LOG_*` macros + screenshot serial handler (`logSerial`) ### src/activities/boot_sleep/SleepActivity.cpp (3 conflict regions) - Kept mod's entire letterbox fill rework (~330 lines of dithering, edge caching, etc.) - Replaced upstream's reverted positioning logic (size-gated) with mod's always-compute-scale approach - Applied upstream's `LOG_*` pattern to all mod `Serial.printf` calls ## Additional Changes (beyond conflict resolution) - **lib/GfxRenderer/GfxRenderer.cpp** — Fixed one `Serial.printf` that auto-merge missed converting to `LOG_ERR` (caused linker error with the new Logging library's `#define Serial` macro) - **lib/hal/HalPowerManager.cpp** — Converted 4 `Serial.printf` calls to `LOG_DBG`/`LOG_ERR`, added `#include ` - **src/util/BookSettings.cpp** — Converted 3 `Serial.printf` calls to `LOG_DBG`/`LOG_ERR`, replaced `#include ` with `#include ` - **src/util/BookmarkStore.cpp** — Converted 2 `Serial.printf` calls to `LOG_ERR`/`LOG_DBG`, added `#include ` - **platformio.ini** — Added `-DENABLE_SERIAL_LOG` and `-DLOG_LEVEL=2` to `[env:mod]` build flags (was missing, other envs all have these) ## Build Verification PlatformIO build (`pio run -e mod`) succeeded: - RAM: 31.0% (101724/327680 bytes) - Flash: 96.8% (6342796/6553600 bytes) ## Follow-up - The merge is on branch `mod/merge-upstream` — fast-forward `mod/master` when ready - The `TxtReaderActivity.cpp` has a pre-existing `[[nodiscard]]` warning for `generateCoverBmp()` (not introduced by this merge)