module

Quartz::Macro

Macro: a scripted sequence of RPC actions persisted as YAML.

Library of addons (recordable/editable/replayable) for driving a Flipper from the host. Each step is one of:

  • press: <up|down|left|right|ok|back> (press+short+release burst)
  • long: <key> (press+long+release)
  • sleep: <milliseconds>
  • screenshot: <out_path.pbm|xbm|raw>
  • alert: true
  • app_start: "name" (or: {name: "...", args: "..."})
  • app_load: "/ext/apps/Tools/foo.fap"
  • app_exit: true

Instance methods

delete(name : String) : Bool
Source
ensure_library_dir
Source
library_dir

Default macro library lives next to the user config. Override with QUARTZ_MACRO_DIR for portable / project-local libraries.

Source
list
Source
load(name : String) : YAML::Any
Source
pack_pbm(data : Bytes) : Bytes
Source
path_for(name : String) : String
Source
play(client : Quartz::RPC::Client, name : String, speed : Float64 = 1.0, & : String -> ) : Nil

Replay name against an open RPC client. speed > 1.0 compresses sleep durations (2.0 = twice as fast); <1.0 slows them down.

Source
render_xbm(data : Bytes, path : String) : String
Source
save(name : String, steps : Array(Hash(String, YAML::Any)), description : String = "") : String

Persist steps as YAML. Overwrites any existing macro with the same name.

Source

Nested types