Repository navigation
System: an at-a-glance check that scales from 240x240 to 1280x720 - #45
Merged
Merged
Conversation
The arc, frame rate and a tap button with the last touch's coordinates share one card; memory, boot, network, audio and the board's identity follow in order of importance, and a small screen drops rows from the end. stats() returns the same numbers from the REPL. The old page moves behind More. System gets a Home tile beside the gear. The shell's title fits narrow screens, and webrepl_on() sees a WebREPL main.py started.
On a 720x720 panel the three buttons ran off both edges at the main page's font. The apps reference describes the new screen.
A 720x720 panel lost five rows at the moving card's font. The rows now take the largest font at or below a twentieth of the short side that fits them all, and drop from the end only at the smallest.
A 720x720 panel's rows fit at 16 px with 8 px gaps but not 9, so they fell to 14 px with a strip of the card empty. Values too wide still end in dots.
Two like boards on different Pythons now tell apart on any screen; the moving card never drops, so the Python row goes.
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.
System becomes a one-screen check of whether a board is well. An arc turns once a second, stepping every frame, with the seconds counted in its middle, beside the display's frame rate, the interpreter and its version (so two like boards on different Pythons tell apart at a glance; that card never drops), and a Tap button that counts taps and shows where the last touch landed. Under or beside that card are rows in order of importance: memory and the time a collection takes, uptime and reset cause, the build date, IP and RSSI, WebREPL, the audio pump and its underruns, then the board, hostname, CPU with its clock and temperature, and the screen and rotation. The moving card's font is the largest Montserrat the firmware has at or below a twentieth of the screen's short side, probed rather than assumed. The rows take the largest font at or below that whose line height fits them all, closing the gap between rows to 2 pixels before giving up a size; a value too wide for its row ends in dots. Only a screen too short for them at the smallest font drops rows from the end (240x240 and 240x320 do; 480x480 shows eight of eleven). The cards sit side by side only on a screen more than 1.5 times wider than tall. The old page (switch history, restart counts, largest free block, Wi-Fi setup) moves behind a More button on screens 400 pixels or more on their short side. System also gets a tile on Home's Desk page beside the gear.
apps.system.stats()returns the same numbers as a dict, whether the screen is open or not, so they can be read from a REPL while the apps keep running. Two small touchkit changes come with it: the shell's title uses the smaller font on a narrow screen and ends in dots rather than running off the edge, andnet.webrepl_on()also reports a WebREPL thatmain.pystarted before the apps.Checked on CPython desktops at 240x240, 240x320, 320x480, 480x480, 480x800, 800x480, 1024x600 and 1280x720, looking at each screenshot (the More page too, at four sizes), with a synthetic tap counted and its coordinates shown. On an ESP32-P4 with a 720x720 touch panel and an ESP32-S3 with an 800x480 touch panel, both MicroPython 1.30 preview, System opened from Home,
stats()answered over the REPL with the screen open and closed, and a tap injected through the touch device's queue counted on the button and showed its coordinates. Nothing was tapped on the glass by hand, so rotated touch mapping is not yet checked on a real panel. Both boards show all eleven rows and the interpreter line (the P4's 720x720 panel at 16 px, the S3's 800x480 at 24 px). CircuitPython is not checked: System needs LVGL through touchkit. Opening System takes about 0.8 s on the P4 and 0.9 s on the S3 as a.py, mostly compiling it.