Commit Graph
197 Commits
Author SHA1 Message Date
Michael A. CojocariandCopilot a386d4087d Web console: Settings tab with every device setting, and a themed redesign (#854)
The browser drives the device's own Settings pages instead of a second copy of
them: WebSettingsEngine.h builds a category page out of sight, describes its
widgets as JSON over /term (kit rows record themselves while the web session is
on), applies changes by setting widgets and sending the events a tap would,
and tears the page down, all in one UI-loop call. New settings show up on the
web with no extra work and save through the device's own code.

- settings.html: category sidebar, cards per page, one Save bar for all
  changes, write-only secrets, device confirms and a confirm for danger
  actions, sub-pages with breadcrumbs, reconnect after a restart.
- theme.css: shared tokens; every page follows the browser's light/dark mode.
- index, mesh, files, screen and the approval overlay restyled on it.
- /settings route (gated like Mesh) and a settings flag in /api/info.

Tested: T-Deck Pro, Heltec V4 TFT and T-Deck Plus builds; host tests
(56 pass); pages checked in headless Chrome against a mock device.
Not yet tested on hardware.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-13 22:16:13 -05:00
Michael A. CojocariandCopilot 7c3b43f64c web: unified web console with on-device approval (phase 1, #854)
- One gzipped console (Mesh / Screen / Files tabs) served on the device's
  web port; page sources live in web/console/ and are generated into
  WebConsoleAssets.h by scripts/build/gen-web-console.py (pre-build hook).
- New browsers ask on the device (Allow / Always allow / Deny); trusted
  browsers are stored in NVS. The 6-digit code remains as a fallback.
- Files tab requests a File Transfer session through the same approval.
- Remote page: single "Web console" toggle, trusted-browser list,
  "Disconnect all browsers". Separate VNC page removed.
- Approval prompt is suppressed while the lock screen is up.

Tested: builds for LilyGo_TDeck_Pro_v1_1_companion_radio_touch and
heltec_v4_tft_companion_radio_usb_tcp_touch (no File Transfer); host
tests pass (56/0/2) incl. new test_web_session_auth. Not device-tested.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-13 20:38:41 -05:00
Kaj SchittecatandClaude Opus 5.5 2e71e5b512 Merge #826: ThinkNode M9 board init, charger sense, 20 MHz SD, IMU/compass, LR1110 wrapper
Language rows from both sides kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:23:32 +01:00
TinkeringDao 63f40f27ed fix(m9): hardware init, charger sense, SD clock, IMU/compass, and LR1110 wrapper
Scope ThinkNode M9 board support and UI integration cleanly off main:
- variants/thinknode_m9: move M9LR1110Wrapper.h under variants/thinknode_m9 (matching Pager's CustomLR1121Wrapper.h pattern without shadowing core RadioLibWrappers.h) and calibrate LR1110 from STDBY_RC per Semtech SWDR001
- variants/thinknode_m9: 3-state USB VBUS + LGS4056HDA DONE# charger sense, ADC2 Wi-Fi contention filter, 20 MHz SD SPI clock, SPI CS pre-park, GPIO46 key LED mirror, deep-sleep wake/isolation, QMI8658A IMU gestures, MMC5603NJ auto-SR heading, and L76K GPS wake/ESD pin release
- src/main.cpp, DataStore.cpp, MyMesh.cpp, HardwareRtcClock.cpp, WadaNmeaLocationProvider.h, UITask.cpp: gate all M9/LR1110 paths under HAS_THINKNODE_M9 / HAS_M9_IMU / HAS_M9_KEYBOARD / USE_LR1110 so non-M9 targets retain identical RAM, flash, and SPIFFS behavior
- deploy/apps/lang/*.lang & test/test_m9_board.cpp: add .lang entries (leaving generated i18n_builtin.h untouched) and host unit tests for M9 board peripherals
2026-11-11 14:07:47 +01:00
Kaj SchittecatandClaude Opus 5.5 010b675ee5 idf: exFAT builds on the IDF boards; deflated emoji carry #616's sequences
- patch_idf_fatfs_exfat.py also defines FF_USE_LABEL as 0 when sdkconfig leaves
  CONFIG_FATFS_USE_LABEL out: exFAT's dir_read() tests it in plain C, so the
  Tanmatsu, T-Display P4 and CrowPanel P4 builds stopped at ff.c with #812.
- gen-emoji-deflated.py emits the kSequences table and emoji_deflated.cpp
  defines emojiGlyphSequenceLookup, which #616 calls; the Tanmatsu failed to link.
- test_emoji_deflated checks every sequence against the raw table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:01:30 +01:00
Kaj SchittecatandClaude Opus 5.5 cdfd383dfe host tests: build test_lua_json (#788) against the Lua core
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 11:36:20 +01:00
Kaj SchittecatandClaude Opus 5.5 919af1cc47 Merge #616 (TerryTel93): emoji pack from the SD card, rebased on main
Follow-ups in the merge, from the review:
- emojiRememberRecent copies the picked text first: a Recent cell points into
  s_emoji_recent, and the shift overwrote it before the copy into slot 0.
- The text menu's Emoji opens the emoji set (it passed k_emoji_items, which
  marked the sheet as special characters, so nothing was remembered).
- Without a pack the picker is the plain grid it always was: no tabs, no
  Recent, and hearts never show as a "More" tab (they sit under Smileys).
- Removed wada_shape_flag_codepoint, which nothing called.
- emoji_data.c regenerated with the merged add-emoji.py (the eight bot emoji
  from beta_102 kept); the EmojiGlyph typedef stays on one line.
- .lang rows for the tab names in all 15 languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 11:36:20 +01:00
Kaj Schittecat 78f88efd2b Merge #788 (oumike): Cyberspace app, wada.net.request over verified https, wada.json, label:on_press 2026-11-11 11:31:51 +01:00
Kaj Schittecat 5da1ca2716 Merge #812 (zmiguel): exFAT microSD support 2026-11-11 11:29:45 +01:00
Kaj SchittecatandClaude Opus 5.5 4f4c11df5d Merge PR #631 (oumike: i18n: translations from #611)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 15:25:03 +01:00
Kaj SchittecatandClaude Opus 5.5 fae96adfb4 touch: eight more emoji for a channel bot, repeater paths in the Lua SDK
Ice cube, the red, yellow, green and blue circles, oncoming car, hiking boot
and the police light render now. Noto moved its PNGs under 2D/, so the bake
script follows it.

on_message gains m.hops and m.path on floods, rx_log and on_packet gain
p.path on floods, and wada.mesh.repeats returns the repeaters heard as a
second value. Requested by jadestarwatcher on Discord.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:38:26 +01:00
Kaj Schittecat 52e8b0d81d Merge PR #784 (oumike): touch(T-Deck Pro): e-paper fonts, settings buttons, no status-bar name, chat header (#767) 2026-11-10 11:47:39 +01:00
Kaj Schittecat 1e5f83c534 Merge PR #773 (Ender436: ProTreck 1.3: local sun/twilight/moon times) 2026-11-10 11:44:21 +01:00
José Valdiviesso c6ccb08d90 exFAT microSD support
Signed-off-by: José Valdiviesso <zmiguel.alves@gmail.com>
2026-11-06 18:38:40 +01:00
CarpeNoctemandCopilot 7dd9abd92d ebook: centre image placeholders again, with blank lines kept
6587555 left-aligned the placeholders because centred ones, often as wide as
the text column, looked wrong. That broke tapping: a tap opens a picture only
in the middle third of the screen, and a short left-aligned placeholder sits
entirely in the left third, where a tap turns the page instead.

Centre a placeholder that fits on one line (padding it with spaces, since the
page is one left-aligned label), and keep the blank line above and below it.
A placeholder that wraps stays left-aligned.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: CarpeNoctem <cryptomax@pm.me>
2026-11-03 13:20:16 +11:00
CarpeNoctemandCopilot 6587555f5e ebook: set image placeholders off with blank lines, not centred
Placeholders are often as wide as the text column, so centring looked wrong.
A blank line above and below now sets each one apart. text_lines ignores the
empty line after a trailing newline, so lines() adds it back; the harness
wrapper now matches the firmware there.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: CarpeNoctem <cryptomax@pm.me>
2026-11-03 12:27:04 +11:00
CarpeNoctemandCopilot cc7867cd35 ebook: show image placeholders in angle brackets
Angle brackets read more clearly than square ones. Comments, tests and the
store description follow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: CarpeNoctem <cryptomax@pm.me>
2026-11-03 11:54:12 +11:00
CarpeNoctemandCopilot fc9b679c29 ebook: centre image placeholders
A placeholder that fits on one line is padded with spaces to the middle of the
text column. Tests also check that an image inside a paragraph gets a line of
its own.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: CarpeNoctem <cryptomax@pm.me>
2026-11-03 11:09:05 +11:00
CarpeNoctemandCopilot 6edc5ce162 ebook: stub image display behind a proposed wada.ui.image call
Adds an Images menu row (always / on tap / never) that appears only when the
firmware has wada.ui.image, which it does not yet. Without it the app behaves
exactly as before (placeholders only). With it: on tap shows a picture fit to
the screen from the placeholder (tap, i key or menu row), always gives a
picture a page of its own, and never ignores taps on the placeholder. The
default stays never until the firmware call exists.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: CarpeNoctem <cryptomax@pm.me>
2026-11-03 10:42:32 +11:00
CarpeNoctemandCopilot 13ef64c5c8 ebook: show images as [image: alt text] placeholders
Use the img alt text when the book gives one, including images wrapped in
svg (common for covers), and ignore closing img tags so one image makes one
placeholder.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: CarpeNoctem <cryptomax@pm.me>
2026-11-03 10:40:12 +11:00
Ender436 470ccb9b35 Merge branch 'ALLFATHER-BV:main' into protreck-local-time 2026-11-01 17:10:45 -07:00
CarpeNoctemandCopilot 7a20ff02bd ebook: survive store.get returning a table; keep saved positions under the store's line limit
On beta_101 store.get(key) of a missing key returns the store's own table,
not nil (storeGet reads the default from stack slot 2, which is the table by
then), so the first launch called :gmatch on a table. Only strings and numbers
count as stored values now, and the harness reproduces the quirk for this app.

The store reloads lines of at most 191 bytes, so the serialized reading
positions are capped at 180 bytes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: CarpeNoctem <cryptomax@pm.me>
2026-11-02 03:02:13 +11:00
CarpeNoctemandCopilot f98155ec9d Add Ebook app: read stored-zip .epub books from the app folder
Pure-Lua reader using wada.fs: chapters, three text sizes, remembered
position, touch/trackball/jog-wheel/keyboard navigation. Includes
scripts/ebook-prep.py to repack epubs uncompressed, harness scenarios,
and a store page entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: CarpeNoctem <cryptomax@pm.me>
2026-11-02 01:41:34 +11:00
Michael A. CojocariandClaude Opus 5.5 d1571d91ca lua: Cyberspace app, wada.net.request over verified https, wada.json, label:on_press
A client for cyberspace.online (cIRC rooms, C-Mail, the Feed) as a store app,
and the SDK pieces it needed:

- wada.net.request{url, method, headers, body, max}: any method, request
  headers, the real status code. https:// runs in a one-shot TLS task with the
  chain verified against the ISRG roots (CAP_LUA_HTTPS: off on the P4 boards,
  where TLS runs on the C6 unverified, and on the 2 MB Heltec V4).
- wada.json.decode/encode in C; 64-bit integers come back as exact text.
- label:on_press(fn): a label becomes a tap / long-press / cursor target.
- wada.store: get(key) with no default returned the store table for a missing
  key; flush wrote past its 192-byte line buffer; changes now reach the card
  within 2 s instead of only on close.

Host tests: test/test_lua_json.cpp and scripts/lua-harness/cyberspace/run.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01He9DHEuLWYQHXVBnNzzD6E
2026-10-30 20:36:57 -04:00
Michael A. CojocariandClaude Opus 5.5 5e846f27fb touch(T-Deck Pro): e-paper fonts, settings buttons, no status-bar name (#767, WIP)
- epd_font_NN.c: the UI faces cut from Montserrat SemiBold at 1 bpp for the
  black-and-white panel (gen-touch-fonts.sh generate_ui_epd). Anti-aliased
  Medium strokes were thresholded to ragged, uneven lines; 1 bpp SemiBold
  draws one stroke width. The Medium ui_font_NN.c are compiled out on the Pro,
  and the semibold role uses the same faces.
- Settings buttons: one smaller face (12 px) for every button, wrapping a
  title that does not fit instead of cutting it (the Firmware card).
- The node name leaves the status bar (no room beside the clock, and its
  marquee was a panel update every step); it sits centred over Home, the
  widget grid and the app drawer. Off Home the clock takes the left corner.
  "Hide device name" is hidden on the Pro.
- Settings section subtitles: dotted instead of a scrolling marquee.
- EPD_DIRTY_LOG (off by default): logs each e-paper update's changed box and
  settings row geometry, for finding what still redraws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01He9DHAqRzswrcCw39ZcTgB
2026-10-29 20:48:46 -04:00
Michael A. Cojocari 3aa0b90232 i18n: translate the strings that still showed in English (#418)
i18n-scan-unwrapped.py reported 16 user-visible literals that never went
through TR(), so they rendered in English in every language. Wrapped them:
the 30 sec slider label, the Spectrum peak readout (and its two live
formats, which the scan cannot see), the T-Deck Max sleep banner, the File
Transfer status lines and page title, the USB Files title, and the Reboot
Now / Forget confirm buttons. The add-channel menu items and the control
centre's Timer / Screenshot captions were already translated (or unused)
inside their helpers; they are wrapped at the call site too, which the
scanner expects and which is harmless. Three app-page titles assigned
directly (Send advert, Known regions, Blocked users), where the scan cannot
see them, are wrapped as well. "Esc" is a key-cap name and joins SKIP_TEXT.

The sleep banner's English also lost its typo ("Asleep:Tap Screen").

Translated in all 14 languages, along with the Forget-keyboard question
and "Known regions", which were English copies in most files.
i18n_builtin.h regenerated. The scan now reports 0 unwrapped literals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016zE15egJdCZ9nRBZmg1YUq
(cherry picked from commit 6e9b92c278)
(cherry picked from commit dce673f7906b405f777839c1b75e7ab1f9964a8e)
2026-10-29 08:41:53 -04:00
Kaj SchittecatandClaude Opus 5.5 879a452300 lang: rows for every TR() key the files were missing, "Connections" among them
The Settings group heading "Connections" had no row in any language, so it
stayed English (CONNECTIONS above Polish rows). The headings come from
kSettingsGroups through `for (const SettingsGroupDef& g : kSettingsGroups)
... TR(g.title)`, and i18n-audit.py's range-for rule only recognised
`for (auto& x : table)`, so the key never reached the audit. The rule now
takes any element type.

The audit then lists 18 more keys added since the last pass (the old-contact
purge, vibration, browser-build notes, the web location prompt). All 19 get
a row in all 15 files: real translations in de, nl, fr, es, it, pt-br and pl,
English placeholders elsewhere. i18n_builtin.h regenerated (V4 +3.9 KB).
i18n-audit.py: every file ok.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 08:47:50 +01:00
Kaj SchittecatandClaude Opus 5.5 b923ca78fc touch(fonts): accented letters at the size of the text around them, Romanian ș ț drawn at all
At the bigger text sizes (the Large/Huge presets on the T-Deck, M9, V4-R8,
T-Deck Pro, Pager; the large screens and the browser build always) the UI
swaps an 18/20/24/28 px Montserrat into g_font_12/14/16. That face is ASCII
only, so every accented letter came from the fallback chain, which stayed at
12/14/16 px: "Urządzenie", "Dźwięk", "Język" drew their ą ź ę visibly
smaller in Polish, and the same for Czech, Hungarian and Romanian. Only the
Tanmatsu spliced a size-matched Latin font (#129).

initTouchFontFallbacks() now gives every slot the extras at its primary's
own size on every CAP_UI_SIZE board: the full extras_12/14/16 (or the
Pager's extras_20/24) where one exists at that size, otherwise extras_lat_18/
20/24/28 (Latin-1, Latin Extended-A) in front of the biggest full extras for
Greek/Cyrillic/Arabic. extras_lat_18 is new; 18/20/24 are built under the
same board gate as the 18/20/24 px UI faces. Romanian's ș ț Ș Ț (U+0218-021B,
Latin Extended-B, 85 uses in ro.lang) were in no font at all and drew as the
missing-glyph mark: added to the extras, the Latin extras and the SemiBold.

Flash (vs the previous commit): heltec_v4_tft +2.2 KB (94.4%, the V4 has no
text-size setting, so only the Romanian glyphs); T-Deck +37.6 KB (91.2%),
M9 +37.5 KB (89.3%): extras_lat_18 and _24. The 28 px Latin font is only
referenced where a preset reaches 28 px (large screens), and the Pager (98%)
keeps its 20 px extras for its 18 px face instead of linking extras_lat_18.
Tanmatsu application.bin 3,126,480 B (ceiling 3,276,800).

Proof: the browser host build with pl.lang active, Settings before/after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 08:43:49 +01:00
Kaj SchittecatandClaude Opus 5.5 1ee32105de touch(clock): Central Africa and 24 more zones, GPS wake no longer sets a stale time, every SNTP sync reaches the clock
Discord (gadgeteerza, ThinkNode M9, beta_100): no Central Africa zone, the
clock often half an hour behind on a Custom UTC offset, and "Sync clock from
system" with Wi-Fi on not always setting it.

Zones: the saved setting is an index into the zone table, and Custom used to
be "one past the list", so appending zones would have moved it. Custom now
keeps its id (16) forever and the new zones (Central/South/East/West Africa,
Egypt, Eastern/Western Europe, Moscow, Turkey, Arabia, Iran, Gulf, Pakistan,
Nepal, Bangladesh, Indochina, Singapore, Perth, Korea, Adelaide, Brisbane,
New Zealand, Argentina, Mexico City, Newfoundland) sit after it. The picker
shows its own west-to-east order and opens on the current zone.

Half an hour behind: not the offset. WadaNmeaLocationProvider::begin() kept
the parser's pre-rest sentence, so after a GPS saver rest the first loop pass
saw a "valid" fix, the 30-minute re-sync was due, and the clock was set to
the moment the receiver went to rest. begin() now clears the parser, and
UITask::setGpsPower(true) calls syncTime() so the core provider (V4 and
others) gets the same. test_gps_time_sync runs the real provider against a
receiver sending true UTC: the pre-fix provider set the clock 1801 s behind
after a 30-minute rest; now every set is within 1 s.

Sync from system: on the M9 the system clock is the device clock, so the
button copied a clock onto itself. And the Wi-Fi loop wrote only the FIRST
SNTP result into the mesh clock: SNTP's hourly re-syncs set the system clock
only, the PCF8563 kept its old value, and the hourly chip resync (#583)
pulled the clock back to it. Every completed sync is now written through
(SntpClockPush.h, test_sntp_clock_push), and the button with Wi-Fi up
restarts SNTP and says "Clock synced" when the answer lands.

test_time_zones: the legacy ids keep their zones, every zone's offset in
January/July/October, Egypt's DST edges, and all 65536 saved
(tz_zone, time_offs) byte pairs through the exact prefs path to localtime().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 08:19:39 +01:00
Kaj SchittecatandClaude Opus 5.5 d1295124c3 store: serve slimmed .lang files that fit the device's download buffer
The device downloads a language into one buffer of at most 128 KB and reports
anything larger as "Server or connection failed". Every v30 file was over
it (Polish 149 KB, Greek 163 KB), so no language could be downloaded, and
seven were already over it in v29. deploy-apps.sh now publishes from a
staging copy in which pack-lang.py keeps the headers and the last row per key,
drops rows that equal the English key (the device falls back to the key
anyway), and, for a file still over 120 KB, keys no current firmware looks
up. A file over 128 KB aborts the deploy. The repo keeps the full files for
translators. Served v30: 72-107 KB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:49:51 +01:00
Ender436 4c5ea958ae ProTreck 1.3: local sun/twilight/moon times
Use wada.sys.datetime() for the status bar and localise the ASTRO event times without changing the astronomy. The local civil date drives the day-of-year, the UTC offset is re-read at draw time (DST and half-hour zones included), and a host without sys.datetime() falls back to UTC with explicit labels. Refresh ASTRO immediately on open and retry when the clock or GPS fix arrives. Add harness scenarios for local time, UTC+13/-10, half-hour zones, a live timezone change, no clock, and the UTC fallback.
2026-10-26 16:06:12 -06:00
Terry Carr 26b93e9ed3 reset format. 2026-10-26 20:47:41 +00:00
Terry Carr a579374481 Add emojiGlyphSequenceLookup function to emoji_data.h
- Introduced a new function `emojiGlyphSequenceLookup` that returns a baked composite image for an exact UTF-8 emoji sequence, or NULL if not found.
- Updated the existing `emojiGlyphLookup` function comment for clarity.
2026-10-26 20:44:24 +00:00
Terry Carr 0a745e0f07 Enhance emoji pack support with regional flags and tag handling 2026-10-26 20:44:24 +00:00
Terry Carr cd0644e6b3 Add optional SD-card emoji pack support
- Introduced EmojiPack.h to handle loading and managing an emoji pack from the SD card.
- Updated UITask.cpp to integrate the emoji pack with existing emoji functionality.
- Implemented functions to read and validate the emoji pack, allowing it to extend the baked-in emoji set.
- Enhanced emoji picker to dynamically include items from the SD card pack, ensuring a seamless user experience.
- Added logic to handle loading the emoji pack in budgeted slices to prevent stalling the UI during boot.
2026-10-26 20:44:23 +00:00
Kaj Schittecat e077d8b097 Merge wip/verify-2026-10-26: today's merges proven off-device, six fixes
wada.sys.random full range no longer divides by zero, wada.ui.input Enter
submits on touch boards with an external keyboard, the OTA download ends
its HTTP connection when no buffer could be allocated, an accepted clock set
lifts the floor (a chip stuck at it no longer keeps the stale time), the host
build refuses removes with '..', and 10 new host tests plus headless scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	scripts/run-host-tests.sh
#	src/helpers/esp32/TouchPrefsStore.cpp
#	test/clock_floor_fakes/helpers/AutoDiscoverRTCClock.h
2026-10-26 15:12:00 +01:00
Kaj SchittecatandClaude Opus 5.5 c627bec464 test: #730 vibration, the notify decision and the AW86224 driver
newMsgImpl's chime/vibration decision moves into src/ui-touch/NotifyAlert.h
(same rules, a static_assert ties its slots to the prefs' TOUCH_SND_* and
TOUCH_CHMUTE_*); the P4's vibrate task takes its beat count from it.
test/test_notify_alert.cpp: Do Not Disturb silences both for every
event, the master Sound switch only the chime, Vibrate off only the buzz;
the per-event switches and channel mutes gate the buzz as they gate the
chime; a DM with its switch off does not fall back to the message slot; a
muted mention is a plain message; 1, 2 and 3 beats for message, DM and
mention.

test/test_p4_haptic.cpp runs the production P4Haptic.cpp against a
register model of the AW86224 on a fake Wire1 (test/p4_haptic_fakes),
each case in its own process: first use loads the 711-byte waveform at
0x0800 and verifies it, the FIFO thresholds match the vendor formula, a
retained SRAM is not rewritten and one differing byte reloads it; a buzz
plays waveform 1 looped with auto brake at the given gain for exactly its
duration and is stopped; 0 or negative durations touch nothing; an absent
chip stays off the bus after the first probe; a busy bus skips the buzz;
a chip that never idles does not hang; every transaction happens with the
I2C_2 bus held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 15:02:25 +01:00
Kaj SchittecatandClaude Opus 5.5 a662ed1e7f site: WADAMESH-TAK section, and a phone menu with every page
The home page gets a WADAMESH-TAK section after the install options: what the
Cascadia Mesh build adds (MediaMesh, Team, OTP messenger, detection, Sound
link, the MeshCore Open TAK app), with its flasher, user guide and source, and
a quick link in the icon rail. The question in the FAQ now points to it.

On a phone (760 px and narrower) one Menu button replaces the row of
unlabelled icons on the home page and the Home link in the other pages' top
bars: a sheet with every page and link, named and described, plus the light
or dark switch. menu.js holds the one list for all pages; the generated
changelog and apps pages include it from their generators. Wider screens are
unchanged. The Tanmatsu page's top bar said Lua SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:53:00 +01:00
Kaj SchittecatandClaude Opus 5.5 5db1c7b761 site: the changelog lists only tagged betas
deploy-site.sh rebuilds changelog.html from every release-notes/beta_N.txt,
so draft notes for a build not cut yet went live with an unrelated site
deploy. A note is now listed only once its beta_N tag exists, and the deploy
fetches tags first so a tag made by gh release create is seen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:48:53 +01:00
Kaj Schittecat 441ef32040 Merge wip/tansize-2026-10-26: about 196 KB of room on the Tanmatsu (silent asserts, no error-name table, deflated emoji)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	scripts/run-host-tests.sh
2026-10-26 14:25:43 +01:00
Kaj Schittecat 1afa19a35e Merge Pager PRs #748-#752 (MrYoshii): vibration, charger + fuel gauge, ship mode, BHI260AP motion, lock-screen wallpaper
Reviewed with follow-ups: shared vibrate key with #730, CAP_CST_BATT_NOTE
(Pager only), backup key cap 192, host tests against fake chips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	deploy/apps/lang/bg.lang
#	deploy/apps/lang/cs.lang
#	deploy/apps/lang/de.lang
#	deploy/apps/lang/el.lang
#	deploy/apps/lang/es.lang
#	deploy/apps/lang/fr.lang
#	deploy/apps/lang/hu.lang
#	deploy/apps/lang/it.lang
#	deploy/apps/lang/nl.lang
#	deploy/apps/lang/pl.lang
#	deploy/apps/lang/pt-br.lang
#	deploy/apps/lang/ro.lang
#	deploy/apps/lang/ru.lang
#	deploy/apps/lang/sr.lang
#	deploy/apps/lang/uk.lang
#	scripts/run-host-tests.sh
2026-10-26 14:19:25 +01:00
Kaj SchittecatandClaude Opus 5.5 621487b771 tanmatsu: ship the colour emoji deflated, inflate once into PSRAM (-103.5 KB)
The 273 baked RGB565+alpha emoji images in src/ui-touch/emoji_data.c are
208,908 B of the Tanmatsu's application.bin, which may not exceed
50 x 64 KB pages. Deflated as one stream they are 105,053 B.

The Tanmatsu's IDF build now leaves emoji_data.c out and compiles
variants/tanmatsu/emoji_deflated.cpp, which provides the same
emojiGlyphLookup() / kEmojiGlyphCount. Its header is generated at build
time from emoji_data.c by scripts/build/gen-emoji-deflated.py (a CMake
custom command into the build dir, nothing committed), so emoji_data.c
stays the one source and add-emoji.py keeps working unchanged. The script
inflates its own output and checks every image and glyph mapping against
the source before writing, so a bad blob fails the build.

On the first lookup that hits a known emoji the blob is inflated with the
ROM tinfl (no flash cost) into one 208,908 B PSRAM block plus 273
descriptors; lookups that miss never inflate. An allocation failure gives
"no glyph" and is retried on a later lookup; a blob that will not inflate
is not retried per draw. Same pixels, same headers, same sharing of one
image by several codepoints (U+FE0F, U+200D, ...).

S3 boards, the web build and the other P4 builds do not compile anything
here (variants/tanmatsu is only globbed by tanmatsu/), so their images do
not change.

Host test test/test_emoji_deflated.cpp compares the deflated lookup with
the raw emoji_data.c for every codepoint up to U+10FFFF and drives the
out-of-memory and corrupt-blob paths (zlib stands in for the ROM tinfl).
run-host-tests.sh gains per-test prep (generate the header under $OUT)
and link flags.

Measured with WADA_FW_TAG=beta_99: 3,179,904 -> 3,076,400 B.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:12:44 +01:00
Kaj SchittecatandClaude Opus 5.5 e0c435dc87 Merge wip/clock-2026-10-26: host build stops deleting images outside its data dir, #699 time zone, #685 Wi-Fi rejoin policy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:10:07 +01:00
Kaj SchittecatandClaude Opus 5.5 e6d1fb3d5d touch: Wi-Fi rejoins without racing the driver or erasing the network (#685)
The main loop's Wi-Fi retry ran "every 10 s while not connected", with a
timer that only moved when it fired. After a long connected stretch it was
ancient, so the very pass that saw the link drop ran a disconnect + begin
on top of the reconnect the driver had just started for the same loss
(Arduino's auto-reconnect on the S3 boards, the C6's own AT+CWRECONNCFG on
the T-Display P4). And the S3 retry's disconnect erased the stored network
(disconnect(false, true)): that is the retry that stayed "disconnected",
while an apply after a scan (the same disconnect without the erase, then
begin) joins.

When to rejoin is now src/helpers/WifiRejoinPolicy.h, a pure state machine
shared by src/main.cpp (every S3 board) and the T-Display P4 loop:
- a link that drops gets a 10 s grace for the driver's own reconnect;
- a running scan, a join in flight or a C6 reset restarts the window;
- six fast tries 10 s apart, then every 30 s, so an AP that is gone all
  night is searched about a third as often (964 vs 2881 attempts in 8 h);
- the screen coming back on asks for one prompt attempt (not within 3 s
  of the last one), so a device picked up after sleeping does not wait
  out the back-off.
The rejoin itself leaves the BSS without erasing it, waits 50 ms and joins
again, as the scan apply does. On the hosted P4 a scan now also holds the
retry off, as it already did on the S3 boards.

test/test_wifi_rejoin_policy.cpp drives the policy pass by pass with a
fake clock: switch-on, link loss with and without the driver recovering,
scan and join busy windows, an 8 h overnight on the battery saver's 50 ms
loop then the wake, Wi-Fi off and on, and the millis() wrap. The runner
also gets the include path test_c6_link_health needed (it failed to build
from scripts/run-host-tests.sh).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:05:42 +01:00
Kaj SchittecatandClaude Opus 5.5 67ed48f4fb test: the Pager's charger, gauge, vibration and IMU logic on fake chips
Host tests that compile the production variant files (TLoraPagerBoard.cpp,
PagerHaptics.cpp, PagerImu.cpp from #748-#751) against register-level fakes of
the BQ25896, BQ27220, DRV2605 and BHI260AP (test/pager_hw_fakes/):

- test_pager_power: REG0B decoding (USB host, adapter, power-good alone, OTG not
  counted as USB, the 1 s cache), the temperature guard with its 3 C band, user
  limits and implausible readings, battery care 80/75 %, both holds through the
  one charger switch, charge limits rounded to the chip's 64 mA / 16 mV steps,
  the gauge capacity written once per target (a sealed gauge is left alone on
  later boots), and ship mode refused on USB, read afresh, BATFET_DLY cleared
  and BATFET_DIS set on battery.
- test_pager_haptics: the waveform slots of every pattern and strength, all
  eight slots rewritten, standby only after GO clears, no bus traffic without
  the chip.
- test_pager_imu: one firmware upload per boot at 1 MHz with the bus clock put
  back, scaling to g, stale samples refused, the 3 s idle stop and restart, no
  retry storm after a failed upload.

Each was checked against a mutated copy of its subject (hysteresis removed,
care resume moved, ship mode on USB, OTG as USB, stale waveform tail, standby
mid-pattern, capacity written every boot): all eight mutants fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:04:59 +01:00
Kaj SchittecatandClaude Opus 5.5 17c4fa5739 test: the clock floor with #756's system-clock fallback
test/test_clock_floor.cpp runs src/helpers/ClockFloorRTC.h over a
settable hardware clock (test/clock_floor_fakes) with settimeofday /
gettimeofday faked, so the machine's clock is never touched. A chip
behind the floor or asserting 2043 gives way to the system clock when that
is ahead and plausible, else the floor or the core's seed as before; a
negative or implausible system clock is never used; a healthy chip whose
write takes is followed; a 20000-step random walk of both clocks never
steps back or past the plausible window; garbage sets are refused, a
>10 min backward set lowers the floor, a poisoned persisted floor is
refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:01:05 +01:00
Kaj SchittecatandClaude Opus 5.5 09c4c9e193 test: wada.ui.input max_len and wada.sys.random in the host build and harness
web/scripts/apps/inputlen.lua + web/scripts/lua-input.wada run against the
real LuaAppHost.cpp in the web host build: caps().input_len is true,
random(6) stays in 1..6 with every value seen, random(1, 1) is 1,
random(5, 3) is in 3..5, random(1) is 1, random() is a raw word; 250
characters typed into wada.ui.input(..., 300) come back whole on Enter,
100 typed with no max_len come back as 63; the full 32-bit range returns
integers.

The Lua harness mock now mirrors the current host: sys.random with the
new ranges (deterministic xorshift32), caps().input / input_len, and
wada.ui.input with its argument checks, the 63 default, the 1..2000
clamp and one prompt at a time, answered by answer_input(). Scenarios
inputlen_random and inputlen_input run the same app; every store app's
scenarios still pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:58:23 +01:00
Kaj SchittecatandClaude Opus 5.5 27ed74a983 map: PMTiles follow-up to #759 (kremers): gate off the Tanmatsu, bounded directories, host test
Follow-up on Martin Kremers' (@kremers) PMTiles reader, behaviour unchanged
where it was right:

- CAP_MAP_PMTILES (CAP_MICROSD minus the Tanmatsu) gates the reader, the Map
  file picker and the zoom limit. The Tanmatsu has a card too, but its AppFS
  image has under 1 KB left and this is ~11 KB.
- The directory walk and the gzip inflater move from UITask.cpp into
  PmTiles.cpp (checkArchive, gunzip, locateTile over a read callback), so the
  whole lookup runs natively. UITask keeps the File glue and the UI.
- Bounded allocations: a directory may hold at most 32768 entries (768 KB
  decoded) and only blocks of 16 KB or less fall back to internal RAM, so a
  hostile entry count or a big leaf can't take the internal heap Wi-Fi needs.
- Uncompressed directories (internal compression 1) are valid v3 and now
  load instead of being listed as "not a PNG raster archive".
- A corrupt directory logs once per archive instead of once per tile.
- The Map file row only shows with Tiles from SD card on, like the zoom row:
  picking an archive did nothing with server tiles.
- test/test_pmtiles.cpp now runs from scripts/run-host-tests.sh (it could not
  find PmTiles.h there) and checks the full lookup against archives that
  test/pmtiles/make_fixtures.py writes from the spec: gzip and plain
  directories, leaf directories, runs, unclustered data, gzip header fields;
  vector, JPEG, gzip-tile and brotli archives refused; v2, cut short, bad CRC,
  lying gzip sizes, hostile counts, out-of-section entries and a leaf that
  points at itself all fail cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:57:49 +01:00
Kaj SchittecatandClaude Opus 5.5 16f2eee57d touch: the time zone holds after a Wi-Fi sync and a hand-set clock (#699)
Two ways the clock read hours off while the zone setting looked right.

The ESP32-P4 esp-hosted boards started SNTP with configTime(0, 0, ...),
which also sets TZ to UTC, so from the first Wi-Fi join every displayed
time was UTC until the zone was picked again. #756 fixed this on the
T-Display P4; the CrowPanel P4 10.1 still had it. It now starts SNTP with
the user's zone (configTzTime) and, as on the T-Display, only pushes a
COMPLETED sync into the clock instead of the stale boot time.

Settings > Clock & time fills "By hand (local time)" with the clock's
reading when the page opens. Picking another zone (or stepping the custom
offset) left those digits in the old zone, so "Set clock" right after a
zone change read them in the new zone and moved the clock by the
difference. The field now refills whenever the zone is applied.

The zone table and its POSIX strings move to helpers/TimeZones.h (same
strings, same order) so test/test_time_zones.cpp can check every zone
through the C library's localtime(): January, July and today's offsets,
the US and EU DST edges to the minute, the Custom offset's sign for
UTC-12..+14, and ClockFloorRTC with the zone in force (a later clock set,
like the GPS re-sync every 30 minutes, moves the time and never the zone;
a chip that reads behind the floor or garbage-future falls back to the
system clock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:51:34 +01:00
Kaj SchittecatandClaude Opus 5.5 44eddcb86c test: #747 Italian, Spanish and Romanian keep the digits (256b6b79)
test/test_keyboard_layouts_hw.cpp compiles the production
KeyboardLayouts.cpp (LVGL names from test/kb_layouts_fakes) with the T-Deck
matrix decoder: Sym+W/E/R decode to 1 2 3 and type as themselves under
Italian, Spanish and Romanian, as do all ten digits and ) ! @ # $ % ^ & * (.
It reads the accent box's tables out of UITask.cpp and checks every letter
the old digit rows gave (à è ì ñ ă â î ş ţ and capitals) is offered after
its base letter, and that the box is on by default. Latvian keeps ā..ū on
the digits, Russian and Bulgarian map as before. It fails on the parent of
256b6b79.

A full dump of keyboardLayoutMapHwKey (14 layouts x 95 keys x shift)
before and after 256b6b79 differs only in the ES, IT and RO digit and
shifted-symbol entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:46:40 +01:00