Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion Apps/Maps/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 0.10.1 (in work)
## 0.11.0 (in work)

**Downloaded maps**
- Maps with the same name (for example several areas named "Slovakia") are one row of the list, with their size
Expand Down Expand Up @@ -32,9 +32,62 @@
- Queries asked for in a region's menu also start at least 10 s after the last one.
- A tile that comes on screen from the cache (drawn earlier around the screen) looks for its trails too.

**LVGL**
- The map is an image in an LVGL window below the statusbar, and LVGL keeps running; keys and the trackball are still
read by the map, touch comes through LVGL (all fingers, for pinch and turn). Needs Tactility with
`lvgl_pointer_get_touches`. The native output, which stopped LVGL and drew straight to the panel, is gone, and so are
the Display output setting and the main menu the map drew itself.
- The app task has a 12 KB stack (was the default 8 KB): building the LVGL menu overflowed it.
- The menu and its pages are Tactility's own widgets, one at a time over the map: the main menu is a tile
grid under a toolbar (< back, an X at its right to exit; a running download is the title, "Update 79 %", with a
download button for its card, and a navigation button holds the route's actions, so the grid stays one page of
nine; a paused recording shows the pause sign), the smaller menus (Download, Track, a row's actions) and the pages
Maps, Settings, Waypoints, GPX files, Tracks and the region catalog are lists, About is scrolling text. R renames and
Delete or X deletes on a row, as before. LVGL reads the keys, the trackball and touch while one is shown; toasts
show over it. Confirm and name dialogs, the download card and the buttons over the map are still drawn by the map
(a page steps aside while a dialog is open).

**Screen density**
- The map follows the display's dpi (Tactility's `display.dpi`): the T-Deck's 143 dpi is its own size, a denser
screen magnifies it in quarter steps up to 3x (2x on a 294 dpi Tab5). Tiles are still drawn at 256 pixels and shown
magnified, so a dense screen shows the same area and detail at the same physical size, and draws a quarter of the
tiles (faster frames, a smaller tile cache). Label fonts are made at the magnified size (22, 28 and 36 px at 2x),
POI icons are resampled once, and the spacing between labels, the position marker, pins, route and track lines, the
compass, the cursor, the scale bar and the panels' padding and touch sizes grow with it. A magnified view that is
not a whole multiple is drawn bilinear once it stands still, like a turned one.
- Settings → Render scale (ESP32-P4 and ESP32-S31, which have a PPA): Auto (default), 100 %, 75 % or 50 %, applied when Maps starts
again. Auto is 50 % when the map's shorter side is 720 px or more, 75 % from 480 px, else 100 %.
The map is drawn into a smaller frame (602 x 360 at 50 % on a 1204 x 720 window) and the PPA scales it up into the
LVGL image, so a quarter of the pixels are drawn at 50 %. The frame counts as a screen of lower density (the map's
magnification drops with it), touches are mapped into it, and its text takes the label fonts made for that density
instead of the system's (which are sized for the screen and came out twice as large). 75 % is 21/16 (the PPA scales
in sixteenths). Without a PPA the setting shows 100 % and stays there.

**Closing**
- Closing the app cancels every request that runs, not only a waiting trails query, and a trails answer stops being
read. When closing takes 1 s or more, the log says which part took how long ("Closing took ...").

**Memory**
- About 1 MB more PSRAM left on the T-Deck (map ready 1.9 → 2.8 MB free, view complete 1.1 → 2.1 MB):
- the tile cache is sized for the screen: every tile a view turned any way can show, the spare slots for
magnified ancestors, and a few around the screen (17 on 320 x 240, was a fixed 20; 35 on 800 x 480, which
the fixed 20 could not even show whole); at most 40 % of the free PSRAM;
- the SD cache's write and encode buffers (256 KB a render lane) exist only while the SD cache is on;
- the trails answer goes into the parser as it arrives instead of being held whole first (it could be up to 6 MB).
Parsing pauses for a tick every 100 ms (a dense browsed block kept a core busy past the task watchdog), and the
tile cache gives room while the lines grow, not only before the answer.
- About 50 KB more internal RAM left (T-Deck, map ready: 64 KB → 115 KB free): the render lanes' stacks (10 KB each)
and the inflaters' state and input buffers are in PSRAM now. Tile rendering takes about as long as before.
- Downloads go through Tactility's HTTP client (`esp_http_client` is no longer in the firmware). It closes the
connection after each request, so every tile is a new TLS handshake for now.

## 0.9.0

**Map**
- Dense city tiles kept no roads, street names or water: in tiles with their layers in alphabetical order, the house
numbers and POIs (14,000 values in Amsterdam's centre) came first and filled the decoder's table, so the layers
after them were dropped. The POI and house number layers now leave room for the others, and house numbers take at
most half of what is theirs. Prepared tiles of originals from 256 KB that were made before are made again.
- Outdoor map style (Settings, Map style): paths in red, tracks in brown and cycleways in blue from zoom 12, unpaved
ways lighter, stronger woods and meadows. The tiles of zoom 12 and 13 are prepared again once for it.
- Peaks show with their height ("Vysoká 754 m") from zoom 10, by importance.
Expand Down Expand Up @@ -107,6 +160,9 @@
- The download pill sits under the navigation bar while navigating instead of on it.

**Other**
- Arguments `--lat <degrees> --lon <degrees> [--zoom <0-19>]` open the map there, with a pin on the place for the
session (`--zoom` also works alone). Tactility's Mesh app uses them for "Show on map" in a contact's details.
- Built for the ESP32-S31 too.
- About in sections. The app's version is shown everywhere as in its manifest (it said 0.6.0 and sent 0.2.0 in the
User-Agent).
- A prepared tile whose label or graph file went missing is prepared again.
Expand Down
16 changes: 14 additions & 2 deletions Apps/Maps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Version 0.5.0, tested on a LilyGO T-Deck (ESP32-S3, 8 MB PSRAM); it also runs on

## Install

Needs Tactility 0.8.0 or newer on an ESP32-S3 or ESP32-P4 board with 8 MB PSRAM, a FAT-formatted SD card, and Wi-Fi
Needs Tactility 0.8.0 or newer on an ESP32-S3, ESP32-P4 or ESP32-S31 board with 8 MB PSRAM, a FAT-formatted SD card, and Wi-Fi
for downloading maps. Tested on Tactility 0.8.0-dev (main, November 2026) on a LilyGO T-Deck.

1. Install "Maps" from Tactility's App Hub. Or copy the `.app` file to the SD card, open it in the Files app and
Expand All @@ -20,7 +20,8 @@ for downloading maps. Tested on Tactility 0.8.0-dev (main, November 2026) on a L
## How it works

- Vector tiles (OpenMapTiles schema) are stored one file per tile in `maps/<region>/<z>/<x>/<y>.pbf` on the SD card.
- The map stops LVGL and draws with Tactility's `pixel_buffer` API, like the built-in Terminal app.
- The map draws its frames into an LVGL image below the statusbar, with LVGL running. The menu and its pages are
LVGL widgets over it.
- Tiles are inflated and decoded as a stream, never held whole in memory, and drawn with an exact-area
anti-aliasing rasteriser. Two render tasks (one per core) fill a PSRAM cache. Rendered tiles can also be
cached on the SD card (a setting, off by default).
Expand Down Expand Up @@ -268,6 +269,17 @@ as small dots. A file is read once and a compact copy (`.gpc`) is kept next to i
next time. Files that are not GPX show an error and are skipped. Large tracks were tested on the PC (50,000 points
read in about 40 ms there), not yet on the device.

### Opening a place from another app

Another app can start Maps (`tactility.maps`) with arguments to open the map at a place, marked with a pin:

```
--lat 52.3731 --lon 4.8922 --zoom 16
```

Latitude and longitude in decimal degrees, both or neither. `--zoom` (0-19) is optional and also works alone. Without
arguments the map opens where it was left.

## OpenFreeMap's rules

OpenFreeMap is free and needs no key. Its [terms of service](https://openfreemap.org/tos/) for offline downloads
Expand Down
2 changes: 1 addition & 1 deletion Apps/Maps/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include("$ENV{TACTILITY_SDK_PATH}/TactilitySDK.cmake")
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
tactility_component_register(
SRCS ${SOURCE_FILES}
REQUIRES graphics-module binfont-module location-module http-module esp_http_client esp_rom mbedtls
REQUIRES graphics-module binfont-module location-module http-module esp_rom esp_driver_ppa
)
target_compile_options(${COMPONENT_LIB} PRIVATE -O2 -Wno-format-truncation)
# The search index must match the PC's byte for byte (M6): no fused multiply-add in its float maths (MSVC on the PC
Expand Down
115 changes: 0 additions & 115 deletions Apps/Maps/main/Source/app/DisplayOutput.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions Apps/Maps/main/Source/app/DisplayOutput.h

This file was deleted.

Loading
Loading