|
| file | src/plugins/dev/c/dev/dev_config.c |
| | The part of the dev harness the unit's paf.dev.config.json lays out: the settings applied at launch, the clock, date, and readings each screen shows in place of the fixture, and the walks the config lists. It reads them out of the header paf build –dev writes, so with dev mode off it compiles to nothing.
|
| file | src/plugins/dev/c/dev/dev_config.h |
| | What a dev build takes from the unit's paf.dev.config.json beyond the walk: the clock and date each screen pins, the settings it applies at launch, the readings it seeds in place of the fixture, and the steps of a walk the file lays out as a list.
|
| file | src/plugins/dev/c/dev/dev_hooks.h |
| | The calls a face makes to run the dev harness, and the switches they read. The build sets the switches from paf build <face> --dev and the unit's paf.dev.config.json, beside its paf.config.json, so a face writes none of them and main.c calls the hooks without any #if of its own.
|
| file | src/plugins/dev/c/dev/dev_walk.c |
| | The shared dev harness. It seeds the stores from a fixed fixture, or from the unit's paf.dev.config.json for a store the config seeds, and drives the theme walk or a walk the config lays out. Compiled for any face that lists the dev plugin, and the linker drops it from any face that never calls it, which is every release build.
|
| file | src/plugins/dev/c/dev/dev_walk.h |
| | Shared dev harness for screenshots. It seeds the clock, weather, health, system, and location stores with a fixed fixture, and the stock and calendar stores empty, using the store seed mechanism so no live source overwrites it. A store the unit's paf.dev.config.json gives readings for takes those instead.
|
|
| enum | DevValueType { DEV_VALUE_NUMBER
, DEV_VALUE_TEXT
} |
| | How a setting's value travels, the way the settings page sends it. More...
|
| enum | DevStore {
DEV_STORE_WEATHER
, DEV_STORE_HEALTH
, DEV_STORE_SYSTEM
, DEV_STORE_PHONE
,
DEV_STORE_MUSIC
, DEV_STORE_STOCKS
, DEV_STORE_CALENDAR
, DEV_STORE_LOCATION
,
DEV_STORE_COUNT
} |
| | The stores a dev build seeds, for asking whether the config seeds one. More...
|
| enum | DevWalkMode { DEV_WALK_NONE
, DEV_WALK_THEMES
, DEV_WALK_CONFIG
} |
| | Which walk a tap advances. dev_start picks it from the walk the dev switches name. More...
|
|
| void | dev_show_panel (int panel, int size) |
| | Shows one panel on its own at one size, for a walk that lists panels. The face defines it, and the dev plugin calls it on each step of the walk, then runs the face's theme hook and rebuilds.
|
| void | dev_show_layout (const char *layout) |
| | Shows one whole layout, for a walk with a step that has one. The face defines it, and the dev plugin calls it on each step that has a layout, after the step's settings, then seeds the stores, runs the face's theme hook, and rebuilds. A face whose walks have no layouts leaves it out.
|
|
static void | dev_config_apply_settings (void) |
| | Does nothing with dev mode off.
|
| static uint8_t | dev_config_pick (DevStore store) |
| | Has no seeds with dev mode off.
|
| static void | dev_config_pin (struct tm *when) |
| | Leaves the time alone with dev mode off.
|
| static bool | dev_config_seed (DevStore store) |
| | Seeds nothing with dev mode off.
|
| static uint16_t | dev_config_walk_count (void) |
| | Has no walk with dev mode off.
|
| static void | dev_config_walk_show (uint16_t step) |
| | Does nothing with dev mode off.
|
| static bool | dev_seed_stores (void) |
| | Applies the config's settings, then seeds the stores on the pinned clock, when dev mode is on. A store the config seeds takes the config's readings, and the rest take the dev fixture. Call it after settings_init and in place of the live store inits, and skip them when it returns true.
|
| static void | dev_start (void(*apply_theme)(void)) |
| | Starts the walk when dev mode is on. With the theme walk picked it forces the first theme and steps to the next on each tap. With a walk the config lays out it shows the first step and steps to the next on each tap. Any other walk, or none, just paints the fixture once and leaves the taps to the face. Call after engine_init.
|
|
static void | dev_stop (void) |
| | Drops the walk's tap subscription when dev mode is on. Call from deinit.
|
| static void | dev_force_time (struct tm *when) |
| | Sets a time to the pinned clock when dev mode is on, and to the pinned date when the config has one. Both follow the screen on show, so a step of a walk with a clock of its own moves them. A panel that builds its own time, such as a second time zone, calls it so a screenshot shows the same time and day in every panel.
|
| void | dev_walk_seed_stores (int hour, int min) |
| | Inits the clock, weather, health, system, and location stores from the default fixture, with live set to false and a pinned clock, so the face shows fixed data that no live reading can stomp. Weather and location are only filled for a face that declares their keys, and left empty otherwise. The stock and calendar stores start empty with live false for a face that declares STOCK_STRIP or CALENDAR_STRIP, so a settings save cannot start them fetching. The phone battery and now playing stores start empty with live false for a face that declares their keys, since the seeded system store tells them nothing about the link. Call it after settings_init, so the weather seed takes the wearer's temperature unit, in place of those stores' live inits, and before any store init of the face's own, then seed the face's own data after it.
|
| void | dev_walk_init (DevWalkMode mode, void(*apply_theme)(void)) |
| | Starts the walk. A theme walk forces the first theme and subscribes the accelerometer tap, and a walk the config lays out shows its first screen and subscribes it. Every mode then paints. Call after engine_init.
|
|
void | dev_walk_deinit (void) |
| | Drop the tap subscription. Call from deinit.
|
Fixed fixtures and a theme walk for repeatable screenshots.
It comes with the dev plugin, in src/plugins/dev/c/dev, apart from the runtime. The frame faces share it. It fills the stores with fixed fixtures and steps through the themes on a tap, so a face's screenshots come out the same every time. The weather and location stores are filled only for a face that declares their message keys, and left empty otherwise.
| void dev_walk_seed_stores |
( |
int | hour, |
|
|
int | min ) |
Inits the clock, weather, health, system, and location stores from the default fixture, with live set to false and a pinned clock, so the face shows fixed data that no live reading can stomp. Weather and location are only filled for a face that declares their keys, and left empty otherwise. The stock and calendar stores start empty with live false for a face that declares STOCK_STRIP or CALENDAR_STRIP, so a settings save cannot start them fetching. The phone battery and now playing stores start empty with live false for a face that declares their keys, since the seeded system store tells them nothing about the link. Call it after settings_init, so the weather seed takes the wearer's temperature unit, in place of those stores' live inits, and before any store init of the face's own, then seed the face's own data after it.
- Parameters
-
| hour | The pinned clock hour (0-23). |
| min | The pinned clock minute. |