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. More...
#include <pebble.h>Go to the source code of this file.
Enumerations | |
| 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... | |
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. 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. | |
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.
It drives an accelerometer-tap "walk". The theme walk steps to the next theme and the next fixed set of readings on each tap, on the same fixed clock. A walk the config lays out steps to its next screen on each tap, with the screen's own settings, clock, date, and readings, and the stores seeded again so nothing from the screen before is left behind.
The dev plugin owns the walk, the fixture, and the switches, which the build sets from --dev and the unit's paf.dev.config.json. A face calls it through the hooks in dev/dev_hooks.h rather than straight. Compiled for any face that lists the dev plugin, but never called by a release build, so the linker drops it all.