Skip to content

InkHUD: add offline map tile backgrounds and zoom controls#10785

Merged
thebentern merged 10 commits into
developfrom
InkHUD_Maps
Jun 27, 2026
Merged

InkHUD: add offline map tile backgrounds and zoom controls#10785
thebentern merged 10 commits into
developfrom
InkHUD_Maps

Conversation

@HarukiToreda

@HarukiToreda HarukiToreda commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Map background tiles are now rendered on the display when available, compressed with LZ4 to keep flash usage low for NRF nodes
  • If no map tiles are loaded, the map applets behave exactly as before
  • Zoom in, zoom out, and reset zoom back to auto-fit are accessible from the menu, and only appear when the menu is opened from a map screen
  • Zoom in will always zoom towards your own location, and if there's no location it will zoom to the cluster of zero hop nodes.
  • The map updates automatically whenever GPS gets a new position or your phone shares a location
  • The Positions and Favorites map applets now also refresh when mesh position packets arrive for your own node
  • The Favorites map now shows your position on the map even if you have no favorites yet
  • Zoom in / zoom out skip directly to the next zoom level that has tiles, so pressing zoom out from z10 with z8 and z13 baked in goes straight to z8 — no empty intermediate stops

How to add a map to your device

  1. Download the E-ink Map Tiles tool from github.com/HarukiToreda/E-ink-Map-Tiles/releases
  2. Open the tool, set the mode to InkHUD, set your area and zoom levels, and export Export for InkHUD.
  3. Pay attention to the flash space estimate for your device. For NRF, recommended use Grid 2x2 up to 3 zooms.
  4. Copy the exported MapTile.h into src/graphics/niche/InkHUD/Applets/Bases/Map/ replacing the empty default
  5. Build and flash the firmware as normal
image

Details

This adds optional map tile rendering to the InkHUD map base applet. Tiles are drawn behind the existing node markers, labels, scale bar, and own-node marker. The committed default tile header contains no tile data, so builds without generated tiles keep the existing marker-only map display.

The menu now detects when it was opened from a map applet and shows map-specific zoom controls only in that context. Reset zoom returns the map to the existing auto-fit behavior.

Testing

  • Heltec Wireless Paper
  • Lilygo T5S3 V2
  • Wio Tracker L1 Pro Eink
  • Tinknode M1
20260625_004933.mp4

- Map background tiles are now rendered on the display when available, compressed with LZ4 to keep flash usage low
- If no map tiles are loaded, the map applets behave exactly as before
- Zoom in, zoom out, and reset zoom (back to auto-fit) are accessible from the menu, and only appear when the menu is opened from a map screen
- The map updates automatically whenever GPS gets a new position or your phone shares a location
- The Positions and Favorites map applets now also refresh when mesh position packets arrive for your own node
- The Favorites map now shows your position on the map even if you have no favorites yet
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

⚡ Try this PR in the Web Flasher

Flash this PR in the Web Flasher

firmware commit boards expires

Warning

This is an automated, unreviewed CI test build. Back up your device configuration
before flashing, and only flash devices you are able to recover.

Supported boards built by this PR (25)
Device Board Platform
Crowpanel Adv 3.5 TFT elecrow-adv-35-tft esp32-s3
Heltec HT62 heltec-ht62-esp32c3-sx1262 esp32-c3
Heltec Mesh Node 096 heltec-mesh-node-t096 nrf52840
Heltec Mesh Node T1 heltec-mesh-node-t1 nrf52840
Heltec Mesh Node T114 heltec-mesh-node-t114 nrf52840
Heltec V3 heltec-v3 esp32-s3
Heltec V4 heltec-v4 esp32-s3
Raspberry Pi Pico pico rp2040
Raspberry Pi Pico W picow rp2040
RAK WisMesh Tag rak_wismeshtag nrf52840
RAK WisBlock 11200 rak11200 esp32
RAK WisBlock 11310 rak11310 rp2040
RAK3312 rak3312 esp32-s3
RAK WisBlock 4631 rak4631 nrf52840
Seeed Wio Tracker L1 seeed_wio_tracker_L1 nrf52840
Seeed Xiao NRF52840 Kit seeed_xiao_nrf52840_kit nrf52840
Seeed Xiao ESP32-S3 seeed-xiao-s3 esp32-s3
Station G2 station-g2 esp32-s3
Station G3 station-g3 esp32-s3
LILYGO T-Deck t-deck-tft esp32-s3
LILYGO T-Echo t-echo nrf52840
LILYGO T-Echo Plus t-echo-plus nrf52840
LILYGO T-Impulse Plus t-impulse-plus nrf52840
LilyGo T3-C6 tlora-c6 esp32-c6
Seeed SenseCAP T1000-E tracker-t1000-e nrf52840

Build artifacts expire on 2026-07-26. Updated for 877de71.

@github-actions github-actions Bot added the enhancement New feature or request label Jun 25, 2026
@HarukiToreda HarukiToreda self-assigned this Jun 25, 2026
@HarukiToreda HarukiToreda added the InkHUD Issues directly related to InkHUD UI label Jun 25, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24ce05157c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends InkHUD’s map applet infrastructure by adding optional offline background map tile rendering (via a generated MapTile.h) and exposing map-specific zoom controls through the InkHUD menu when a map applet is active.

Changes:

  • Add MapApplet support for rendering background tiles and maintaining a shared zoom lock, plus GPS-status-driven refresh behavior.
  • Add map zoom actions to the InkHUD menu and gate their visibility to map contexts.
  • Adjust Positions/Favorites map applets to refresh on loopback/local position updates and to show the user position even with no favorites.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/graphics/niche/InkHUD/docs/README.md Documents the MapApplet base, tile format, and zoom controls.
src/graphics/niche/InkHUD/Applets/User/Positions/PositionsApplet.h Enables loopback handling only while the applet is active.
src/graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.h Enables loopback while active; adds enoughMarkers() override.
src/graphics/niche/InkHUD/Applets/User/FavoritesMap/FavoritesMapApplet.cpp Allows map display when only the local node has a position (no favorites yet).
src/graphics/niche/InkHUD/Applets/System/Menu/MenuApplet.cpp Adds map zoom menu items/actions when the borrowed tile owner is a MapApplet.
src/graphics/niche/InkHUD/Applets/System/Menu/MenuAction.h Introduces menu actions for map zoom in/out/reset.
src/graphics/niche/InkHUD/Applets/Bases/Map/MapTile.h Adds the default “no tiles bundled” tile header stub.
src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.h Adds zoom APIs and GPS status observation hooks.
src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp Implements tile rendering, zoom selection, and redraw triggers.
src/graphics/niche/InkHUD/Applet.h Adds asMapApplet() for RTTI-free detection of map applets.

Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp
Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp
Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp
Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp
Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp
Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp
Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp
Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapTile.h
Comment thread src/graphics/niche/InkHUD/Applets/Bases/Map/MapApplet.cpp
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Firmware Size Report

22 targets | vs develop: 21 increased, 1 decreased, net +17,380 (+17.0 KB)

Target Size vs develop
heltec-vision-master-e213-inkhud 2,219,280 📈 +3,152 (+3.1 KB)
rak3312 2,265,040 📈 +1,136 (+1.1 KB)
heltec-v3 2,256,304 📈 +1,088 (+1.1 KB)
heltec-v4 2,268,688 📈 +1,072 (+1.0 KB)
elecrow-adv-35-tft 3,408,144 📈 +1,056 (+1.0 KB)
Show 17 more target(s)
Target Size vs develop
station-g2 2,259,248 📈 +1,056 (+1.0 KB)
t-eth-elite 2,482,944 📈 +1,056 (+1.0 KB)
rak11200 1,853,024 📈 +1,040 (+1.0 KB)
seeed-xiao-s3 2,268,784 📈 +1,040 (+1.0 KB)
station-g3 2,259,248 📈 +1,040 (+1.0 KB)
heltec-ht62-esp32c3-sx1262 2,127,024 📈 +880
tlora-c6 2,360,416 📈 +864
picow 1,237,568 📈 +568
pico2w 1,213,620 📈 +552
seeed_xiao_rp2040 773,832 📈 +368
pico 775,616 📈 +352
seeed_xiao_rp2350 761,280 📈 +344
pico2 763,128 📈 +336
rak11310 798,352 📈 +184
t-deck-tft 3,803,344 📈 +176
rak3172 182,160 📈 +52
wio-e5 234,428 📉 -32

Updated for 62e2d97

@thebentern thebentern merged commit 25c71cb into develop Jun 27, 2026
90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request InkHUD Issues directly related to InkHUD UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants