Repository navigation
feat: seven more colour themes and four retro Now Playing faces - #73
Merged
Merged
Conversation
The player had two colour themes and one Now Playing layout. Settings, Display, Theme now offers nine themes, and Settings, Display, Now Playing adds Cassette, VU meters, Turntable and LCD deck faces in the spirit of the stock Echo Mini screen, with original drawings. Standard stays the default and draws exactly as before; a test pins its pixels. Each face has its own fixed palette and dresses the header and status bar to match. Faces move only while a track plays, on 100 ms ticks of the position, so a paused face sends no rows and the player keeps sleeping. The VU needles and LCD spectrum are decorative, since the firmware has no level data. The code window has too little room for the faces, so they live in a .np_faces section loaded from the image into the free top of the overlay RAM on the first face frame. The loader re-checks the section's header on every call and draws Standard if it is missing, and a rescan or USB session marks it stale. The image build fails if main code reaches into that range, and a source check keeps face code inside its section. The face choice takes the next free option slot. Co-Authored-By: Claude <noreply@anthropic.com>
PlayerStatus moved to playback/player_status.h here, so the chapter fields from main move with it. Regenerates the language packs.
6 tasks
|
For light themes, I suggest that the album art background on the home screen also be light, in keeping with the theme—it looks better that way. Having a light theme with a black album art background on the home screen undermines the theme's overall aesthetic. Still, they all turned out very nicely! |
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.
The player had two colour themes and one Now Playing layout. This adds seven colour themes and four retro Now Playing "faces" in the spirit of the stock Echo Mini screen. All the artwork is original and drawn in code, with no bitmaps. Dark, Light and the Standard Now Playing look exactly as before.
This branch is based on
mainand is independent of #70 (playback speed). The two branches touch some of the same files, so whichever merges second needs a small rebase (see Settings file below).Colour themes
Settings → Display → Theme now has nine themes:
Settings → Display hides the rows that don't apply to the current theme:
Switching themes keeps the stored accent and highlight for when you come back. Cover Flow and the Home cover panel stay dark on every theme.
Both settings are under Settings → Display:
Now Playing faces
Settings → Display → Now Playing offers four faces besides Standard, which stays the default:
These GIFs were rendered by the firmware's own drawing code through the test HAL, one frame per 100 ms of playback.
Every face also has a portrait layout:
All four faces in landscape and portrait
Common to every face:
How it works
docs/architecture.mdhas the full description, under "Now Playing faces" and the High RAM map.src/app/default_theme.c,src/ui/theme.c,src/ui/list_view.c):ThemeChoice {theme, accent, flat}replaces the light flag, anddefault_theme_stagekeeps Cover Flow dark.ThemeSelectionadds an outline style (Neon) to the gradient and flat bars. Phosphor, Olive and High contrast use flat blocks, andtheme_selected_textpicks the selected row's text colour.PALETTESbecame a resident table to save code-window space.src/np_faces(echo_np_faces). It depends on core, gfx, ui, playback and settings, never on app, soPlayerStatusmoved toplayback/player_status.h.now_playing_screen.cbuilds aNowPlayingFramefor each strip and calls the face'sdraw. A face is aNowPlayingFaces {magic, draw, chrome[]}table.draw().face_shapes.c: anti-aliased spans, rings, rounded rectangles, trapezoids, spokes from a 65-entry quarter-sine table, leaning 7-segment digits and a lattice. Text helpers are inface_text.c. There is no float and no.bss.marquee_frame_request(wait_ms)asks for the next frame at the next 100 ms boundary of the position, only while the track plays..np_facessection of the main ELF, linked under LTO into the free top of the overlay RAM (0x0308BA00–0x0308EFFF, 13,824 B). The image stores them at offset0x23CA00, behind anENPFheader.hal_system_load_faces()loads them on the first face frame and re-checks the header on every call. If the load fails, Now Playing draws Standard.make_image.pyfails the build if the main code window branches into or loads a pointer from the face range. It decodes Thumb only at$tmapping symbols and checks literal words in$druns.NOW_PLAYING_FACESto be defined.tools/check_np_faces_sections.py(ctestnp_faces_sections) fails if face code or data is missing its section marker.size_report.pyprintsnp_facesand.high_ramlines.tools/lang_pack.py. The Now Playing row reuses the existing "Now Playing" label.Settings file
OPTION_THEME, with values 0 to 8. Firmware that knows only Dark and Light rejects a file with a value of 2 or more and starts from defaults, so going back after choosing a new theme resets all settings. This is listed indocs/known-issues.md.OPTION_NOW_PLAYING_FACE, byte 41). There's no version bump, and an older firmware ignores the slot.OPTION_COUNTSallows 8 values, so a newer face reads as Standard instead of rejecting the file.SettingOption(slots 21 and 22), and both PRs edit the Settings rows, the string catalogue, the packs and the docs. If feat: books and podcasts play at 0.75x to 2x #70 lands first, I'll rebase this PR, and the face moves to slot 23.Size
mainreleasepresetdevicepresetrelease/device.np_faces(new region).high_ramfree (region 86,016 → 72,192 B)target_audit)The face code isn't in the code window; it loads into RAM that was free.
Tests
New tests:
tests/np_faces/, covering the primitives (including golden hashes), text, per-face behaviour and the face-wide rules:tests/ui/test_theme.candtests/device/test_np_faces_gate.c.Extended tests:
test_app,test_settings,test_settings_screens,test_list_view,test_equalizer_screen,test_marquee,test_spoken_word(frame pacing), and themake_imageandsize_reporttool tests.Standard and the existing themes:
the_standard_now_playing_keeps_its_pixelsfingerprints Standard in 3 layouts and 7 states.mainand from this branch in the headless simulator, with the same keys. The screenshots are byte-identical.ctest --preset dev: 174 of 176 pass, built with clang 21, clang-format 21, arm-none-eabi-gcc 14.2.1 and Python 3.12. The two failures also fail onmainhere, as in #70:format: the same 6 warnings in the same 6 files as onmain. The changed lines are clean.sort_fold_up_to_date: Python 3.12'sunicodedata.device_image_passes_the_updater_check,target_audit,no_comments,np_faces_sections,language_packs_up_to_dateandtools_unit_testspass. Thedeviceandreleaseimages build.Not yet tested on a player
ROADMAP.mdmarks both features assim, anddocs/known-issues.mdlists the limits. To check on hardware:s%), and that a paused face lets the player sleepTry it
The release image is
build/release/HIFIEC90.IMG. Choose a face in Settings → Display → Now Playing, then play a track.The version number and release notes are unchanged, left for a release commit.