Add ui-lvgl, a standalone touch UI for the Wio Tracker L2 Pro - #3529
Open
Hacuchino-hash wants to merge 4 commits into
Open
Hacuchino-hash wants to merge 4 commits into
Hacuchino-hash wants to merge 4 commits into
Conversation
ESP32-S3 with SX1262, a 3.2" 320x240 touch LCD, an L76K GNSS module and an SD slot. Everything except the radio hangs off a TCA9535 expander, so the board brings up power and reset lines in Seeed's documented order before the display and GNSS are usable. Companion (BLE and USB), repeater and room server environments run on the existing shared code. Pre-release hardware: the pin map may change on production units.
An LVGL 9 interface for boards with a touch panel, used by this variant's standalone environment: messaging with delivery state and history, contacts with path control and repeater trace, a repeater admin screen, an offline map from SD, and on-device radio and node settings. One translation unit per screen (thread, contacts, repeater, overlays, map, settings), with UITask.cpp holding the shell, the settings rows, the mesh events and the main loop. The UI is a MyMesh::Listener. Incoming messages, CLI replies, ACKs and trace results arrive through the listener interface; logins and status requests go out through the BaseChatMesh send methods and their replies are picked up in onUnhandledResponse (status by request tag, login by sender, since login replies carry the server clock in the tag field). The shared-file changes are a flood flag on MyMesh::advert(), doing what CMD_SEND_SELF_ADVERT does, and saveChannels, saveContacts and isValidClientRepeatFreq moving to the public section so the settings screen can reach them. The boot splash draws the wordmark bitmap the other display UIs already share, expanded to an alpha mask and tinted from the widget style.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ui-lvgl, a standalone touch UI for the Wio Tracker L2 Pro
Builds on #3381 (the variant); the first two commits here are that PR and
the last two are new. Adds
examples/companion_radio/ui-lvgl/, an LVGL 9interface for boards with a touch panel, and the
Wio_Tracker_L2_standalone_lvglenvironment that uses it (Bluetoothcompiled out, USB CLI only).
It is a full node interface, not a status screen, so the board can be used
without a phone: chats with history and delivery state, contacts with a
manual path picker and repeater path trace, on-device repeater
administration (login, status, CLI), an offline map from SD with pan and
zoom, radio and node settings, and a first-boot region and name wizard.
How it fits after #3431
The UI is a
MyMesh::Listenerand takes everything through that interface:via
onMessageRecv,onChannelMessageRecv,onACKRecv,onDiscoveredContact,onTraceRecvandonQueueSizeChanged.BaseChatMesh::sendLoginandsendRequest. The replies come back inonUnhandledResponseand areconsumed there: status is matched on the request tag, login on the sender,
because a login reply carries the server's clock in the tag field rather
than the request tag.
createTraceandsendDirect; sending usessendMessage,sendGroupMessageandsendCommandData.I read the "still a fair ways to go" note in #3431 and take it at face
value. This is built on the Listener as it stands today, to show what a
standalone UI actually needs from it, not to lock anything in. When the
abstraction moves I will move the UI with it. The two MyMesh changes below
are the spots where there is no public path yet (a scoped flood advert,
and saving contacts and channels), which may be useful input for that
work either way.
Shared files touched
examples/companion_radio/MyMesh.hadvert()gains afloodflag (default false);saveChannels,saveContactsandisValidClientRepeatFreqmove to the public section so the settings screen can reach themexamples/companion_radio/MyMesh.cppadvert(), doing whatCMD_SEND_SELF_ADVERTdoes with the default scopeExisting
advert()callers are unaffected. Nothing else outside the newdirectory changes, apart from the variant's own README, envs and map tools.
Layout
One translation unit per screen:
UIThread.cpp,UIContacts.cpp,UIRepeater.cpp,UIOverlays.cpp,MapView.cpp,SettingsUI.cpp, withUITask.cppholding the shell, the settings rows, the mesh events and themain loop.
UICommon.his the internal header they share;UITask.histhe only interface
main.cppsees.Dependencies
lvgl @ 9.2.2, pinned and pulled only by the standalone env. The UI buildson the existing wrappers:
LGFXDisplay,ESP32Board,MicroNMEALocationProvider,EnvironmentSensorManager,rtc_clock,StrHelper.Offline maps
The map reads the usual
/maps/{z}/{x}/{y}.pnglayout from a FAT32 card,so a tile folder prepared for any other device works unchanged. It also
understands packed tile columns and an optional
/maps_dark/night set;both are documented in the variant README and neither is required.
Testing
Builds:
Wio_Tracker_L2_standalone_lvgland the four variant envs, plusHeltec_v3_companion_radio_bleandRAK_4631_companion_radio_blefrom thematrix (they compile the touched
MyMeshfiles). The last commit adds thestandalone env to the PR build matrix; drop it if unwanted.
On hardware, this revision: boot and touch, direct messages both ways with
delivery ACK, hashtag channel messages, notification banner, repeater
administration (saved password, login, status, action buttons, CLI
replies), path trace with per-hop SNR over a two-byte-hash path, flood
advert, and the first-boot wizard. Earlier revisions also covered speaker,
wake button, GPS fix, offline maps in the loose tile layout and client
repeat mode on 918 MHz; none of that code changed in the rebase.
Packed tiles and the night tile set are not yet verified on hardware.