4cf7a786d6
The shell (shell.dart): a drawer from the left edge or each page's menu button. Dash, Signals, Captures; Tools (Camera, Link test, Orin power options), the rarely used ones, after pirate-station-aide; Settings (gateway address, dark/bright, build-time theme and landing). Landing view at build time: YUKART_HOME=dash|signals, signals for now. Dash, Signals and Captures stay alive while hidden; Captures has its own navigator, so a run survives switching views. Back goes inside Captures, then to the landing view, then out. The mock banner sits over every page. main.dart is startup only; the old home screen is pages/signals.dart; dialogs and sheets moved to actions/; the protocol client, USB binding and Reading to link/. lib/README.md catalogues it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
3.4 KiB
3.4 KiB
type
| type |
|---|
| reference |
The app's code: a catalogue
Laid out like smart-serow's HUD (pi/ui/lib/), which several pieces come from; the menu follows
pirate-station-aide's (main views, then the rarely used ones grouped as Tools).
Folders
| Where | Holds |
|---|---|
main.dart |
Startup: the link to the Orin, the theme, then the shell |
shell.dart |
The shell: a menu that swipes in from the left; Dash, Signals, Captures, then Tools (Camera, Link test, Orin power options), then Settings. Dash, Signals and Captures stay alive while hidden |
shell_scope.dart |
What a page needs from the shell: MenuButton, ShellView, the landing view (--dart-define=YUKART_HOME=dash|signals, signals for now) |
pages/ |
One file per view: dash, signals (values and raw traffic), checklist (Captures), camera, link_test, settings |
actions/ |
Things done from anywhere, as dialogs and sheets: marks (free-form mark), orin_power (power off / reboot), server_url (gateway address) |
link/ |
Talking to the Orin: boundary (the protocol client), net (binding to the USB link), reading (one signal's state as a display needs it) |
theme/ |
palette.dart: the palette roles and hudFont |
widgets/ |
Reusable display widgets, one per file, each fed values, never the boundary (link_status takes it whole: it shows the link) |
Widgets
| Widget | File | Shows | From |
|---|---|---|---|
StatBox, StatBoxMain |
widgets/stat_box.dart |
A value, its unit and label, sized from its box's height; alarm on warning, subdued when dim | smart-serow |
Telltale |
widgets/telltale.dart |
An on/off lamp: a label or an icon, lit or dark, "—" when missing | Yukart |
WhiskeyMark |
widgets/whiskey_mark.dart |
Attitude: a horizon tilting with roll, ladder moving with pitch | smart-serow |
AccelGraph |
widgets/accel_graph.dart |
G-meter: a dot for lateral/longitudinal g, a trace and a peak marker over a window | smart-serow |
GpsCompass |
widgets/gps_compass.dart |
Heading arrow and bearing; "ACQ" while acquiring, "N/A" without | smart-serow, from gps-speedo |
LinkChip, LinkDetails |
widgets/link_status.dart |
The link's state in good / caution / alarm; address, last-message age, clock offset, USB link | Yukart |
MockBanner |
widgets/mock_banner.dart |
"MOCK DATA — NOT FROM THE CAR" in caution, over every page while the gateway is mocking | Yukart |
Conventions
- The boxed pattern. A widget takes its share of a row and sizes its type from its own height, so a layout is a grid of boxes and a value gaining a digit never moves anything. Labels shrink to fit, never wrap.
- Colours by meaning.
AppTheme.of(context)gives seven roles:background,foreground,subdued(muted, missing, stale),accent(emphasis without danger: buttons, links, the current item), and the state gradientgood→caution→alarm; plus the derivedsurface(raised bars) andonFill(colour)(text on a fill). No widget names a colour. Themes are JSON inassets/themes/,reiby default; smart-serow's four-key files still load (theirhighlightisalarm). - Cosmetic fonts are opt-in. A widget that wants the HUD face names
fontFamily: hudFontin its ownTextStyle; everything else keeps the basic font, which covers CJK where DIN 1451 does not. - Missing is a state (app guideline 2): a widget given no value draws "—" or subdued, never an error.