Repository navigation
feat(mqtt-data): show the screen title while connecting - #78
Conversation
|
Thanks @TooncesToo! The Core 1 implementation here is really clean—double-buffering Before adding a new schema field though, I'm not 100% sure I'm grasping the underlying problem you're running into—please correct me if I'm missing a scenario! Since MQTT Data payloads are published with If that's indeed what we're solving, wouldn't it be much simpler—and keep
That way users get a clean, contextual waiting screen out of the box without having to configure or keep a comma-aligned By the way, if you haven't tried them yet, definitely give the new Showcase engines a spin paired with https://github.com/red77290/dmd_media_showcase on your 256×64 and 128×32 signs—it's well worth checking out! |
|
so this is completely cosmetic and really only shows up on my old pi2 with
its cheap USB wifi. it can take a second or more to connect and fetch
weather data. Rather just seeing the word connecting, I wanted to see
Fetching Weather so I knew what it was doing. It's not really solving a
problem per se. Just letting me label the connection.
…On Fri, Nov 27, 2026, 2:52 PM red77290 ***@***.***> wrote:
*red77290* left a comment (red77290/ArcadeMatrix#78)
<#78 (comment)>
Thanks @TooncesToo <https://github.com/TooncesToo>! The Core 1
implementation here is really clean—double-buffering m_waitingLabels
behind m_topicsIdx with zero heap on the render path and swapping without
reconnecting when only labels change is super neat.
Before adding a new schema field though, I'm not 100% sure I'm grasping
the underlying problem you're running into—please correct me if I'm missing
a scenario! Since MQTT Data payloads are published with retain: true, my
understanding is that the only moment we are actually waiting is the brief
handshake right on slot entry (on Topic 0) while the fresh session connects
and receives the retained snapshot—because once CONNACK arrives, all
retained topics land within a few hundred ms while Topic 0 stays up for ~10
s, and after the 3 s NO_DATA_AFTER window any empty topic shows NO DATA
rather than CONNECTING.
If that's indeed what we're solving, wouldn't it be much simpler—and keep
mqttdata faithful to having topics as its only setting—to handle it
automatically the way we already do on the Showcase engines (
ShowcaseCardRenderer::drawWaitingPixelArt / media_showcase.rs)?
Specifically, during Notice::Connecting we could:
- Automatically pick up the label directly from the *topic itself*
(e.g. arcadematrix/weather/local -> WEATHER / LOCAL, or humanizing the
last segment) or from the screen_title that every screen tab already
has in instance.config,
- Pair it with a nice little zero-allocation waiting animation (e.g.
pulsing MQTT waves / tiny topic hint + animated ... dots, dropping
right back to 0-redraw static mode as soon as the retained payload arrives).
That way users get a clean, contextual waiting screen out of the box
without having to configure or keep a comma-aligned waiting_labels list
in sync. Let me know what you think, or if there's another use case I
missed!
By the way, if you haven't tried them yet, definitely give the new
Showcase engines a spin paired with
https://github.com/red77290/dmd_media_showcase on your 256×64 and 128×32
signs—it's well worth checking out!
—
Reply to this email directly, view it on GitHub
<#78?email_source=notifications&email_token=AZHXJBGMFWG7TBFFYYVMLMT53HZSZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMRSHA4DEOJSGIYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-7228829220>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZHXJBDA7S4YZZ54VVCSFZD53HZSZAVCNFSNUABGKJSXA33TNF2G64TZHMYTEOJXHA3TINJVHE5US43TOVSTWNRWGQ3TSNJXGMZTDILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AZHXJBCUZYTXVCRAICSBTVL53HZSZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMRSHA4DEOJSGIYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AZHXJBAJCTHKKA4IHOPOG3L53HZSZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMRSHA4DEOJSGIYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Just read your entire comment again. Yes, we could do it automatically by what service is connecting. Really the only time this is obvious is when the host is slow (pi2) or if you happen to lose connectivity during the rotation. Any way you'd want to do it is good. I was just wanting to know what I was connecting to. |
|
Awesome, glad we're on the same page! Looking at how the WebUI already works, every screen card actually already has a free-form Screen Title / Label input right at the top (saved in If you're up for updating #78 and #41 in that direction, the core change becomes super small: 1. Drop
|
While a page is still waiting for its first payload, a screen with a title shows "<TITLE> INCOMING..." (e.g. WEATHER INCOMING...) instead of the generic CONNECTING notice. No new setting: it reuses the screen_title every screen card already has. Screens with no title, or still titled with the engine's default name, keep CONNECTING. mqd::makeWaitingLabel() builds the label into a fixed 32-byte buffer (trimmed, uppercased, Latin-1 accents folded, title cut to 19 characters). It is double-buffered with m_topics and published by the m_topicsIdx release store; a title-only change swaps the buffer without reconnecting. A label too wide for G1 on the panel is drawn in the tiny font. No heap or lock on the render path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27f2d7e to
cbd0271
Compare
|
Done. I've updated both #78 and red77290/ArcadeMatrix_RPI#41 to work the way you suggested:
I went with plain text and left out the animation. One thing I found along the way: on RPi, Both are tested on my signs: the Pi 2 at 128×32 and the Waveshare S3 at 256×64. The weather screen titled "Weather" shows WEATHER INCOMING... until the retained payload lands. Thanks for the Showcase pointer too. I tried games and movies on both signs and it's impressive work. |
red77290
left a comment
There was a problem hiding this comment.
Super clean! Dropping waiting_labels in favor of a single double-buffered char m_waitingLabel[2][32] derived from screen_title keeps the mqttdata contract completely untouched, stays 100% zero-allocation on Core 1, and handles Latin-1 accent folding + the TINY font fallback on narrow panels very neatly. Great unit test coverage in test_native_core.cpp too.
And really glad you enjoyed trying out the Showcase engines on both of your signs! LGTM, merging.
What. While an MQTT Data page is still waiting for its first payload, a screen with a title shows
<TITLE> INCOMING...(for exampleWEATHER INCOMING...) instead of the generic CONNECTING notice. There is no new setting: it reuses thescreen_titlethat every screen card already has. Screens with no title, or still titled with the engine's default name (MQTT DATA / DONNEES MQTT / DATOS MQTT), keep CONNECTING. RPi counterpart: red77290/ArcadeMatrix_RPI#41.This replaces the earlier
waiting_labelsversion, as suggested in review.topicsis again the onlyConfigField, and there are no WebUI, i18n orWebUI.hchanges.How.
mqd::makeWaitingLabel()builds the label into a fixedchar[WAIT_LABEL_LEN](32 bytes), with no allocation. It trims, uppercases ASCII and folds Latin-1 accents to their base letter (so it suits the 5x7 font). It cuts the title to 19 characters and appendsINCOMING....char m_waitingLabel[2][32]is double-buffered withm_topics. It is written to the spare slot inonConfigChangedand published by the existingm_topicsIdxrelease store. Core 1 reads it with an acquire load. A title-only change swaps the buffer without reconnecting.panel_text::drawWaitingLabel()uses the CONNECTING layout and colour. If the label is wider than the panel in G1, it is drawn in the TINY font, clamped to x ≥ 0.Tests.
pio run -e esp32s3_waveshareand-e esp32devbuild.run_native_tests.pypasses, including the newtest_mqttdata_waiting_label_from_screen_title.validate_ui_and_i18n.py,validate_docs.py,validate_webinstaller.pyandtest_companion_sync.pypass.Hardware verification (ESP32-S3 Waveshare, 256×64). Installed by OTA on top of v4.3.3. A weather instance titled "Weather" shows
WEATHER INCOMING...on every slot activation until the retained payload arrives, then the weather page. Untitled instances still show CONNECTING. The rotation was byte-identical after the OTA, and heap was stable (about 130 KB free).🤖 Generated with Claude Code