Loading...
Searching...
No Matches
Dev Harness

Fixed fixtures and a theme walk for repeatable screenshots. More...

Files

file  src/plugins/dev/c/dev/dev_walk.c
 The shared dev harness. It seeds the stores from a fixed fixture and drives the theme walk. 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, using the store seed mechanism so no live source overwrites it, and drives an accelerometer-tap theme "walk". Each tap steps to the next theme and the next fixed set of readings, on the same fixed clock.

Data Structures

struct  [struct].s_fixed

Enumerations

enum  DevWalkMode { DEV_WALK_NONE , DEV_WALK_THEMES }
 Which walk a tap advances. The face works this out from its own toggles. More...

Functions

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. Call in place of those stores' live inits.
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. Either mode then paints. Call after engine_init.
void dev_walk_deinit (void)
 Drop the tap subscription. Call from deinit.

Detailed Description

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.

Enumeration Type Documentation

◆ DevWalkMode

Which walk a tap advances. The face works this out from its own toggles.

Enumerator
DEV_WALK_NONE 

Just pin the fixture, no tap handler.

DEV_WALK_THEMES 

A tap steps to the next theme.

Function Documentation

◆ dev_walk_init()

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. Either mode then paints. Call after engine_init.

Parameters
modeWhich walk to run.
apply_themeThe face's own theme-apply hook. It re-colours the zones and swaps the frame, and runs before the engine rebuilds so a theme change lands.

◆ dev_walk_seed_stores()

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. Call in place of those stores' live inits.

Parameters
hourThe pinned clock hour (0-23).
minThe pinned clock minute.