Commit Graph

21 Commits

Author SHA1 Message Date
Jakub
4d163cda49 chore: bump build date to 19 May 2026; fix UTF-8 ellipsis truncation
Fix drawTextEllipsized to strip orphaned UTF-8 leading bytes after
byte-at-a-time trimming, preventing an invisible 6px gap before "..."
when truncating non-ASCII names.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 10:25:25 +02:00
Jakub
d3b2480fdb refactor: remove transliteration from DisplayDriver base class
Lemon font supports Latin Extended, Greek, and Cyrillic natively,
so transliteration to ASCII is not needed. SH1106Display overrides
translateUTF8ToBlocks to pass UTF-8 directly to the Lemon renderer.
The base class implementation is now a simple pass-through copy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 10:08:50 +02:00
Jakub
340b4854f1 Merge wio-tracker-l1-improvements into font-experiments
- DataStore.cpp: persist auto_lock setting across reboots
- MyMeshBot.h: fix bot responding when disabled (missing bot_enabled check)
- QuickMsgScreen.h: fix msg buffer too small for 140-byte templates
- DisplayDriver.h: add European language transliterations (kept for non-Lemon displays)
- FullscreenMsgView.h: keep pixel-accurate word-wrap (font-experiments)
- SettingsScreen.h: keep dynamic layout via _vis/_item_h (font-experiments)
- UITask.cpp: remove stale placeholder comment

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 10:04:56 +02:00
Jakub
d1d524aab1 fix: apply UTF-8 transliteration in drawTextEllipsized
Names printed via drawTextEllipsized (contacts, senders) bypassed
translateUTF8ToBlocks, causing raw UTF-8 bytes to render as garbage
on the Adafruit font. Now transliteration happens inside the method.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 23:04:03 +02:00
Jakub
9ec4fddbbc fix: use block char █ fallback for unknown codepoints in transliteration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 23:04:03 +02:00
Jakub
8ec2a0ac22 feat: transliterate accented/diacritic characters to ASCII in translateUTF8ToBlocks
Replaces the block-character fallback with proper transliteration for
Polish (ą→a, ć→c, ę→e, ł→l, ń→n, ó→o, ś→s, ź→z, ż→z), German (ä ö ü ß),
and common French/Spanish/Portuguese accents. Unknown codepoints fall back
to '?' instead of █.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 23:04:03 +02:00
Jakub
2bc6dae78e feat: add Icelandic and Romanian legacy cedilla transliteration
Adds ð/Ð (eth), þ/Þ (thorn) for Icelandic, and ţ/Ţ (t with cedilla)
for legacy-encoded Romanian text.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 12:11:42 +02:00
Jakub
b0552e246a feat: extend UTF-8 transliteration to cover all major European languages
Adds Scandinavian (å ø æ), Hungarian (ő ű), Romanian (ă ș ț),
Croatian (đ), Turkish (ğ ş ı), and Baltic/Lithuanian/Latvian
(ā ē ī ū ģ ķ ļ ņ ŗ ų ė į) diacritics.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 12:08:20 +02:00
Jakub
6492fd490e feat: add Czech and Slovak diacritic transliteration
Adds háček and other Czech/Slovak characters (č š ž ř ě ů ď ť ň ľ ĺ ŕ)
to the UTF-8 transliteration table so they display as ASCII letters
instead of █ blocks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 12:01:51 +02:00
Jakub
31962726ec fix: apply UTF-8 transliteration in drawTextEllipsized
Names printed via drawTextEllipsized (contacts, senders) bypassed
translateUTF8ToBlocks, causing raw UTF-8 bytes to render as garbage
on the Adafruit font. Now transliteration happens inside the method.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 15:11:12 +02:00
Jakub
f6b13c5cab fix: use block char █ fallback for unknown codepoints in transliteration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 15:05:53 +02:00
Jakub
8d3b955da1 feat: transliterate accented/diacritic characters to ASCII in translateUTF8ToBlocks
Replaces the block-character fallback with proper transliteration for
Polish (ą→a, ć→c, ę→e, ł→l, ń→n, ó→o, ś→s, ź→z, ż→z), German (ä ö ü ß),
and common French/Spanish/Portuguese accents. Unknown codepoints fall back
to '?' instead of █.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 14:46:53 +02:00
Jakub
24c8dcad72 feat: dynamic font-adaptive layout and Lemon font icon support for SH1106
- Add getCharWidth()/getLineHeight() virtual methods to DisplayDriver so
  all layout math adapts to whatever font is active
- Fix Lemon font baseline offset from +8 to +6 (cap height, not FONT_ASCENT)
- Add LemonIcons.h with Private Use Area glyph table; U+E03B mute icon
  rendered via drawLemonChar icon lookup
- FullscreenMsgView: compute wrap width and visible lines dynamically from
  display font metrics instead of hardcoded constants
- SettingsScreen and MessagesScreen: replace hardcoded ITEM_H/VISIBLE with
  members computed at render() time from getLineHeight()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 13:27:34 +02:00
Jakub
c3846ba9f5 feat(wio-tracker-l1): add settings screen and companion radio improvements
Settings screen (UI_HAS_JOYSTICK_UPDOWN build variant):
- Display brightness (5 levels, contrast curve tuned for SH1106 non-linearity)
- Buzzer on/off (respected at startup, no more forced unmute)
- TX power (2–22 dBm)
- Auto-off delay (5s / 15s / 30s / 60s / never)
- GPS update interval (off / 30s / 1min / 5min / 15min / 30min)
- Timezone offset (UTC-12..+14) for clock screen
- Low battery auto-shutdown threshold (off / 3.0–3.5V, default 3.4V)
- Battery display mode (icon / % / voltage)

Battery:
- EMA filter (alpha=0.2) on ADC readings to smooth voltage spikes from uneven load
- Battery % calculated using low_batt_mv as 0% anchor
- Mute icon repositions dynamically based on battery display width

Clock screen on HomeScreen showing time/date with timezone support.

Build:
- _settings variants added for USB and BLE companion radio builds
- Automatic UF2 generation on every build via create-uf2.py post-script
- UI_HAS_JOYSTICK_UPDOWN flag guards joystick_up/down to avoid breaking other boards

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 21:09:46 +02:00
Florent de Lamotte
18bfc2d81a DisplayDriver: introduce drawTextRightAlign and drawTextLeftAlign 2025-10-01 18:07:59 +02:00
Michael Hart
bd6aa983a3 feat: add DisplayDriver methods for UTF-8 filtering and text ellipsis
- Add translateUTF8ToBlocks() method to convert UTF-8 characters to displayable blocks
- Add drawTextEllipsized() method for text truncation with ellipsis
- Apply UTF-8 filtering to node names, recent contacts, and message content
- Use ellipsized text rendering for recent contacts to prevent overflow
- Addresses PR feedback by moving text processing to DisplayDriver level
2025-09-16 17:17:15 -07:00
Scott Powell
4b95c981bb * UI revamp for companion radios 2025-08-08 20:01:31 +10:00
JQ
678f36a57b Implement getTextWidth for display classes
- Added getTextWidth method to DisplayDriver interface
- Implemented getTextWidth in all display classes
- Updated examples to use getTextWidth directly
2025-05-04 18:17:18 -07:00
Florent
cf3d55201f ui : manage colors and ensure fw using ssd1306 still compile 2025-04-11 22:23:47 +02:00
liamcottle
87443ad43f clear display on init to avoid static 2025-04-01 14:46:48 +13:00
Scott Powell
372c228210 * new ui/DisplayDriver classes (just SSD1306Display impl for now)
* companion radio: now with optional UITask (enabled by DISPLAY_CLASS config in target/env)
2025-03-04 23:09:43 +11:00