Commit Graph
52 Commits
Author SHA1 Message Date
drkhsh 17f012b777 Distinguish sent vs delivered with check-mark indicators
Previously a single ASCII glyph collapsed SENT and DELIVERED. Wire
PacketReceipt delivery callbacks through to sideband-style single
and double checks.

LXMFManager tracks outstanding receipts (opportunistic + link
single-packet) by hash. On delivery: persist DELIVERED and fire
_statusCb. On 60s timeout: drop the entry, leave at SENT — lack
of proof over LoRa isn't proof of failure. Resource transfers stay
at SENT; microReticulum's Transport skips receipts for resource
packets and Link::start_resource_transfer exposes no concluded
callback to hook.

LvMessageView renders the glyph via applyStatusGlyph (Montserrat 12):
REFRESH for in-flight, single OK for SENT, double OK for DELIVERED,
WARNING for FAILED. Status callback matches by timestamp (~1s
tolerance) so DELIVERED lands on the right bubble after later
messages have already moved past QUEUED.
2026-04-27 19:44:38 +02:00
DeFiDude f9ef856a6f Add AutoInterface support (IPv6 LAN auto-discovery via microReticulum AutoInterface) 2026-04-25 20:39:18 -06:00
DeFiDude be771818f9 Silence vfs_api error spam and rename /ratputer/ SD paths to /ratdeck/
CORE_DEBUG_LEVEL=0 drops Arduino core noise on expected-missing files, LittleFSFileSystem::open_file now actually works so path_table persists across reboots.
2026-04-16 21:54:44 -06:00
dude.eth 675ae47b4d Merge pull request #18 from scotty007/feature/keyboard-backlight
Add keyboard backlight config and control
2026-04-06 22:39:25 -06:00
DeFiDude 61d6a861f8 v1.8.2
- Fix issue #23
- Improve menu focus
2026-04-06 16:56:08 -06:00
DeFiDude 92112de000 Fix stale orange theme comments — palette is matrix green 2026-04-03 23:32:18 -06:00
DeFiDude f5c584949d - LVGL changes, lost some spirit, but WIP 2026-04-03 19:10:58 -06:00
dude.eth a85c18d8f3 Merge pull request #21 from scotty007/fix/send-button-callback
Add send button callback in LvMessageView
2026-04-03 16:16:27 -06:00
DeFiDude 77de14baef Playing w/ LVGL 2026-04-03 16:12:40 -06:00
Scotty d0563220b6 Add send button callback in LvMessageView 2026-04-03 12:47:17 +02:00
DeFiDude 0c47e2204f Touch screen capability (closes #19) 2026-04-03 00:06:48 -06:00
Belousov Oleg ba4a729d16 The touch work has been completed 2026-04-02 18:42:50 +03:00
Scotty 51dbfa1a4e Add keyboard backlight config and control
- Add user config for brightness and auto-on/off control.
- Auto-switch backlight on/off according to power state.
2026-04-02 09:04:33 +02:00
DeFiDude 33ce7eab56 Shorten LoRa preset labels, default to Long Fast 2026-03-30 01:21:33 -06:00
Belousov Oleg 4b35318121 Fix: custom label in Lora presets 2026-03-29 13:25:56 +03:00
Belousov Oleg 8ea5993e8d The list of Lora presets has been expanded 2026-03-29 13:18:11 +03:00
DeFiDude 2c73a10c80 Hide unknown hop count, remove hops_to and toHex from transport filter hot path 2026-03-28 21:18:08 -06:00
DeFiDude 59200d6aea Cyrillic and Latin Extended font support (fixes #14)
Regenerated Montserrat 10/12/14 with Cyrillic and Latin Extended
Unicode ranges so messages in Russian, Ukrainian, Bulgarian, and
accented European languages render properly instead of rectangles.
2026-03-28 20:58:01 -06:00
DeFiDude 4958ed9289 Fix nodes list scroll truncation, center action modal, trackball parity
Scroll: scrollToSelected() was defined but never called — LVGL didn't
know which pool row to show after viewport updates. Nodes at the
bottom of long lists were invisible. Now called after every sync.

Modal: Replace lv_obj_center() with explicit pixel positioning so
the action modal renders centered regardless of list scroll state.

Trackball: Click now sets character='\n' matching keyboard Enter for
complete event parity.
2026-03-28 20:37:48 -06:00
DeFiDude a32c6d9a42 Prevent selecting Custom preset, detect custom frequency in preset 2026-03-28 19:47:27 -06:00
DeFiDude d81921357b Stamp incoming messages with receiver time, radio-style freq editor
Timestamps: Incoming messages with invalid sender timestamps
(< Nov 2023 epoch) are now stamped with the receiver's local time
if available. Previously, messages from devices without NTP/GPS
showed no timestamp at all.

Frequency editor: Replace raw 9-digit Hz accumulator with a
radio-style digit cursor. Display shows NNN.NNN.NNN format with
bracket cursor on active digit (e.g., "920.[6]50.500"). Trackball
left/right moves cursor, digit keys replace at cursor and advance.
Esc restores original value. Matches amateur radio transceiver UX.
2026-03-28 16:25:50 -06:00
DeFiDude f41e4c0363 Tune RNS tables, cache status bar time, add BLE idle timeout
Status bar: Cache last displayed hour/minute, skip LVGL label
update when minute hasn't changed (eliminates 59/60 redundant
invalidations per minute).

RNS tables: Increase ANNOUNCE_TABLE_MAX 32→48 (prevents premature
eviction on networks >32 nodes). Increase RATE_TIMESTAMPS_MAX
16→32 (prevents false rate-limit rejects on busy networks).

BLE: Add 5-minute idle timeout. Stale connections now get
disconnected to free the single NimBLE connection slot for new
devices. Activity tracked on connect, RX, and TX events.
2026-03-28 15:51:43 -06:00
DeFiDude d3ed421038 Optimize message view rendering, WiFi TX buffering, remove unused font
Message view: Extract appendMessage() from rebuildMessages(). New
messages are now incrementally appended (O(delta) widget ops) instead
of destroying and recreating all bubbles (O(N)). Full rebuild only
on initial load or message count decrease.

WiFi TX: Buffer HDLC frame in PSRAM then send with single write()
call. Previously sent per-byte (200+ syscalls per packet), now 1
syscall. Reduces CPU overhead and TCP fragmentation.

Font: Disable unused LV_FONT_UNSCII_8 (compiled but never referenced).
2026-03-28 15:48:40 -06:00
DeFiDude 16f1bb516c Show WiFi reboot toast only once, not on every setting change
Previously, "Reboot Required!" fired on every applyAndSave() once
any WiFi setting changed — showing 3 times during a single STA
setup (mode + SSID + password). Now the toast only shows on first
detection with a gentler message: "WiFi changes apply on reboot".
Subsequent saves show "Saved" normally.
2026-03-28 15:26:24 -06:00
DeFiDude 4086609054 Fix stale unread badge when message arrives during active conversation
refreshUI() detected and displayed new messages but never called
markRead() or updated the tab badge. Now marks conversation as read
and refreshes the badge whenever new messages are loaded while the
user is actively viewing the conversation.
2026-03-28 14:51:26 -06:00
DeFiDude 31ce457192 Add action modal for node selection (Add Contact / Message / Back)
Replace direct-message-on-Enter with a 3-option modal overlay:
- "Add Contact" prompts for a nickname (pre-filled with announce
  name, falls back to hex hash if left empty), then saves contact
- "Message" opens conversation (previous Enter behavior)
- "Back" closes modal (also Esc at any point)

Long press on unsaved nodes now also shows the modal instead of
silently adding. Long press on saved contacts keeps the existing
delete confirmation flow.
2026-03-28 14:38:59 -06:00
DeFiDude 6cd4197503 Add per-node RSSI/SNR display on Nodes screen (developer mode)
Backend:
- LoRaInterface captures packet RSSI/SNR immediately after every RX,
  removing redundant SPI re-reads from log statements
- AnnounceManager populates DiscoveredNode.rssi/snr from LoRaInterface
  on every announce (fields existed but were never wired up)

Frontend:
- Nodes screen shows RSSI appended to hops/age when dev mode is on
- Node name label uses smaller font (montserrat_12) to reduce truncation
- Normal users see no change
2026-03-28 14:27:07 -06:00
DeFiDude a77fb594a2 Fix screen wake on idle, add regional frequency presets and Hz input
Screen idle:
- Remove powerMgr.activity() from radio yield callback — screen no
  longer wakes on LoRa RX, auto-announce, or RSSI polls
- Add [POWER] state transition logging for on-device diagnostics

Radio regions:
- Add 4-region system: Americas (915), Europe (868), Australia (915),
  Asia (923) with timezone-to-region mapping
- Region picker in Radio settings (always visible)
- Presets now apply region-appropriate frequency + modulation params
- Timezone change warns if it suggests a different radio region

Frequency input (developer mode):
- Hz-precision input (9 digits) displayed as MHz with trimmed decimals
- Left/right arrows step by 125 kHz, digit keys for direct entry
- Inspired by @strijar in https://github.com/ratspeak/ratdeck/pull/12
2026-03-28 14:06:31 -06:00
DeFiDude b2fcfe526e v1.7.1: GPS time sync, timezone picker, status bar clock
- GPS time sync via UBlox MIA-M10Q (38400 baud auto-detect)
- Custom zero-dependency NMEA parser with XOR checksum validation
- Only trust GPS time when satellites > 0 (no stale RTC cache)
- DST-aware timezone picker at first boot (21 cities, POSIX TZ strings)
- Timezone also configurable in Settings > GPS/Time
- GPS Time on by default, GPS Location off by default (opt-in)
- Status bar: clock (top-left), Ratspeak.org (center), battery (right)
- 12h time default (no AM/PM), configurable 24h in settings
- NVS persistence of GPS time for approximate timestamps across reboots
- Fix factory reset Enter key bleed-through (600ms input guard)
- Fix hardcoded UTC-5 NTP timezone (now uses DST-aware POSIX TZ)
2026-03-25 02:42:18 -06:00
DeFiDude 311c5ad3df GPS time sync, status bar clock, configurable UTC offset
- Enable UBlox MIA-M10Q GPS on T-Deck Plus (HAS_GPS true)
- Custom zero-dependency NMEA parser (NMEAParser.h) with XOR checksum
- GPSManager: baud auto-detect (115200/38400/9600, 10s timeout),
  settimeofday() sync every 60s, NVS time/position persistence
- GPS Time enabled by default, GPS Location disabled by default
  (user must explicitly opt in via Settings)
- Replace status bar connectivity bars with clock display (top-left)
- Default 12h format without AM/PM, configurable 24h in Settings
- Add GPS/Time settings category: GPS Time, GPS Location,
  UTC Offset (-12 to +14), 24h Time toggle
- Fix hardcoded UTC-5 NTP timezone to use configurable utcOffset
- Change status bar brand text to "Ratspeak.org"
2026-03-25 01:36:56 -06:00
Scotty 42c5a8b1a5 Add user config setting for auto-announce interval 2026-03-21 11:35:10 +01:00
DeFiDude d89b6699ab v1.6.2: Fix announce bin8 encoding in Settings, deduplicate encodeAnnounceName
PlatformIO Build / build (push) Failing after 30s
PlatformIO Build / release (push) Has been skipped
Apply bin8 fix to the duplicate announce encoding in LvSettingsScreen
(Send Announce action). Replace inline copy with shared function from
main.cpp. Follows up on PR #5.
2026-03-15 12:32:54 -06:00
DeFiDude fc91f8214e TCP scaling, GUI pooling, dev mode, protocol improvements
- TCP: wider drain budgets, TCP_NODELAY, no flush, PSRAM buffers, queue announces until hub ID
- GUI: object pool Messages/Contacts screens, partial MessageView status, targeted tab refresh
- LVGL throttled to 5fps when dimmed, non-blocking RSSI monitor, bounded I2S writes
- LXMF batch drain, BLE frame mutex, LoRa interrupt-driven RX, name cache cap 300
- Developer mode in settings: custom radio params (freq/txp/SF/BW/CR/preamble) behind warning
2026-03-15 12:25:29 -06:00
DeFiDude 02d7dedcce v1.6.1: Fix TCP port input, flash status, PSRAM audio optimization
- Fix TCP port input: allow direct digit entry instead of scroll-only
- Fix flash status always showing "Error" (was checking SD path on flash)
- Flash now shows used/total KB instead of just Mounted/Error
- Audio buffers use PSRAM (ps_malloc) with internal heap fallback
- Bump version to 1.6.1
2026-03-13 13:42:17 -06:00
DeFiDude 957911d7e7 Fix LXMF TX: Header2 transport_id correction and TCP transport improvements
- Restructure send_outgoing() to handle both Header1 wrapping and
  Header2 transport_id correction (for multi-hop edge case where
  Transport::outbound uses wrong _received_from as transport_id)
- Add announce management improvements and LXMF delivery fixes
- Add LoRa interface enhancements and nodes screen updates
- Sync microReticulum hops > 1 revert in libdeps
2026-03-11 13:43:39 -06:00
DeFiDude 6e36e6524a Remove transport node feature — ratdeck is endpoint only
These standalone devices should not act as transport nodes.
Remove the config toggle, settings UI, and boot-time config peek.
Hardcode transport_enabled(false).
2026-03-11 03:32:35 -06:00
DeFiDude 9d81d05979 Performance and stability pass (v1.5.9)
- Tighten transport announce rate limit from 5/sec to 2/sec
- Reduce RNS loop frequency from 200Hz to 100Hz
- Throttle LVGL rendering to 30 FPS (was unthrottled)
- Time-box TCP frame loop to 3 frames / 8ms per client
- Add 12ms global TCP budget across all clients
- Replace blocking WiFi announce delay(1500) with deferred non-blocking check
- Rotate persistData() across 3 cycles to spread file I/O
- Reduce LvNodesScreen rebuild frequency (2s → 5s, skip small transient changes)
- Bump version to 1.5.9
2026-03-10 12:10:24 -06:00
DeFiDude 6f272596c8 Fix announce flood from TCP hub overwhelming device (v1.5.7)
4-layer defense against 100+ node announce storms from rns.ratspeak.org:
- Transport-level rate limiter (5/sec) via filter_packet callback, before Ed25519 verify
- TCP frame processing time-boxed to 15ms per loop iteration
- Global announce rate limit (3/sec) in AnnounceManager
- UI rebuild throttled to once per 2 seconds

Also fixes message status not persisting to disk on queue drain.
2026-03-10 00:08:56 -06:00
DeFiDude 58615b845a v1.5.5: Fix message duplication and ordering over LoRa 2026-03-08 19:28:23 -06:00
DeFiDude 1e22924159 v1.5.4: Hop-based eviction, first-boot data cleanup, message performance
- Evict highest-hop unsaved nodes first when peer list is full (nearby peers survive)
- Add first-boot SD data cleanup screen before name input
- Conversation summaries cache for faster message list rendering
- Optimize message view refresh with summary-based change detection
- Streamline unread tracking through MessageStore instead of LXMFManager
2026-03-08 17:53:43 -06:00
DeFiDude 76b03a7508 v1.5.3: Cross-compat fixes, announce parsing, UI improvements 2026-03-08 16:52:36 -06:00
DeFiDude 4687bc9d38 Remove legacy dead code: pre-LVGL screens and unused stubs
Delete 24 files (2487 lines):
- 18 legacy screen files (BootScreen, HomeScreen, NodesScreen,
  MessagesScreen, MessageView, SettingsScreen, HelpOverlay,
  NameInputScreen, MapScreen) replaced by Lv-prefixed LVGL versions
- PowerManager (superseded by hal/Power)
- hal/Audio (ES7210 stub, working audio is audio/AudioNotify)
- hal/GPS (stub, GPS deprioritized)

Move shared types (SettingType, SettingItem, SettingsCategory) from
deleted SettingsScreen.h into LvSettingsScreen.h.

Clean main.cpp: remove legacy includes, instances, and tab mapping.

Note: StatusBar and TabBar retained — still used by UIManager/main.cpp.
2026-03-08 16:52:36 -06:00
DeFiDude b3fa3927ce Fix stale defidude references and version bumps
- Update clone URLs in BUILDING.md and QUICKSTART.md to ratspeak/ratdeck
- Fix update checker API URL in LvSettingsScreen.cpp to ratspeak/ratdeck
- Bump version examples in BUILDING.md from v1.4.2 to v1.5.2
2026-03-08 16:51:59 -06:00
DeFiDude 8947b636fc Fix LoRa presets: true max range BW 62.5kHz/22dBm, shift balanced and fast down
Long Range: SF12, 62.5 kHz, CR 4/8, 22 dBm (~37 bps)
Balanced:   SF9, 125 kHz, CR 4/5, 17 dBm (~1.8 Kbps)
Fast:       SF7, 250 kHz, CR 4/5, 14 dBm (~11 Kbps)

Previous Long Range used 125 kHz (3rd highest BW) and 17 dBm — not
actually max range. SX1262 supports 62.5 kHz BW and 22 dBm TX power.
2026-03-08 03:45:33 -06:00
DeFiDude 9ec2984d4f v1.5.1: Fix messaging failures, stale timestamps, retry logic
- Add NTP time sync on WiFi STA connect (fixes --:-- timestamps)
- Throttle LXMF send retries to 2s intervals, increase max to 30 (~60s window)
- Restore message status re-save to disk after send completes (QUEUED→SENT/FAILED)
- Update GitHub org URLs to ratspeak
2026-03-07 21:05:19 -07:00
dude.eth a32182140d v1.4.2: LXMF interop fix, UI redesign, radio defaults
- Fix LXMF wire format: standardize on opportunistic [src:16][sig:64][content]
- Fix LXMF signature: sign(dest||src||packed) per spec, remove message_hash
- Fix MsgPack interop: handle both str and bin types for title/content
- Radio defaults changed to Balanced preset (SF9/BW250k/CR5/TX14)
- Messages screen: sorted by most recent, preview with You:/Them:, green unread dot, timestamps
- Status bar: replace LoRa/BLE/WiFi text with signal bars (green=connected, red=offline)
- Home screen: remove Unread info (shown in Messages tab)
- Contacts screen added (Friends tab)
- Identity manager: multi-slot identity support with per-slot display names
- Message store: fix peer hash truncation, SD directory creation, .bak file leak
- Settings: check for updates, active identity display, info diagnostics
2026-03-07 17:03:34 -07:00
DeFiDude 07025bfa23 v1.4.0: LVGL UI, async radio TX, live TCP management, input fixes
- Migrate all screens to LVGL v8.4 widget system
- Non-blocking radio TX (async endPacket via LoRaInterface)
- Live TCP server switching with transient node cleanup
- Fix UI freeze during radio transmit
- Trackball long-press delete, deferred click with debounce
- Pin microReticulum to 392363c, fix list_directory API
- Fix CI build: portable include path, remove hardcoded local path
2026-03-07 13:00:59 -07:00
DeFiDude 9b7980665c v1.3.1: Chat bubbles, identity management, transport mode fix, performance
- Rewrite MessageView with word-wrapped chat bubbles, timestamps,
  incoming/outgoing alignment, pixel-based scrolling
- Add IdentityManager for multi-identity support (create/switch/delete,
  8 slots max, per-identity display names)
- Fix transport mode: default to endpoint (no rebroadcast) — was acting
  as transport node, rebroadcasting every TCP announce over LoRa causing
  5-11 second UI freezes per TX. Loop time: 11146ms → 6ms
- Add Transport Node toggle in Settings > Network
- TCP interface now drains up to 10 frames per loop (was 1)
- Reduce LoRa debug polling from 5s to 30s
2026-03-06 22:32:54 -07:00
DeFiDude 4c55c3ee6c v1.3.0: Major stability, settings redesign, WiFi scanner, TCP support
Stability fixes:
- Fix message duplication (8x repeat) via messageId-based filenames
- Fix message ordering with epoch timestamps (NTP-aware fallback)
- Fix device freezes: MessageView caches messages instead of reading
  disk every frame at 20fps (now refreshes every 500ms)
- Fix .bak file cascade: filter all file ops to .json only, cleanup junk
- Fix radio presets not persisting across reboots (removed force-override)

Settings redesign:
- Collapsible category navigation (6 categories with summaries)
- Enter to drill into category, Backspace to return
- WiFi network scanner with signal bars and RSSI display
- WiFi SSID/Password fields for STA mode
- TCP server preset (None / Ratspeak Hub / Custom) with host/port
- Frequency selector (868/906/915/923 MHz) and Preamble setting
- Factory reset with confirmation step
- Reboot device action
- Merged small categories (Input into Display, Actions into System)

New features:
- TCP network support for rns.ratspeak.org connectivity
- Preamble stored/applied in config and radio at boot
- Version bumped to 1.3.0
2026-03-06 22:09:17 -07:00
DeFiDude d518921eed v1.2.2: Fix trackball, add display name support, announce with app_data
- Fix trackball completely dead: remove gpio_reset_pin() calls that
  prevented GPIO interrupts from registering on ESP32-S3
- Add trackball left/right tab cycling when screen doesn't consume event
- Add NameInputScreen: Ratspeak-branded first-boot name input
- Add display name to all announces as MessagePack app_data
- Add TEXT_INPUT setting type; expose Display Name in Settings
- HomeScreen Enter key sends announce with toast notification
- Bump version to 1.2.2
2026-03-06 16:28:18 -07:00