Helpers for writing Igniter installers for BB add-on packages.
Only available when :igniter is loaded.
Summary
Functions
Adds a controller entry to the robot's controllers do … end section.
Adds a nested group hierarchy to the robot's parameters do … end section.
Adds a bridge entry to the robot's parameters do … end section.
Returns the robot module to operate on.
Ensures the robot's child spec in the application module carries the given opts.
Functions
Adds a controller entry to the robot's controllers do … end section.
code is the full DSL call as a string, e.g.
controller :dynamixel, {BB.Servo.Robotis.Controller, port: ...}The section is created if it doesn't already exist. Idempotent on name:
if a controller with the same name is already present, the igniter is
returned unchanged.
Adds a nested group hierarchy to the robot's parameters do … end section.
group_path is a list of atoms describing the path of nested groups to
create, e.g. [:config, :feetech] produces:
group :config do
group :feetech do
<body_code>
end
endbody_code is the contents of the innermost group (typically one or more
param ... declarations) as a string.
The parameters section and intermediate groups are created as needed.
Idempotent: if the full group path already exists, the body is not added a
second time (so manually-edited param contents are preserved).
Adds a bridge entry to the robot's parameters do … end section.
code is the full DSL call as a string, e.g.
bridge :robotis_bridge, {BB.Servo.Robotis.Bridge, controller: :dynamixel}The section is created if it doesn't already exist. Idempotent on name.
Returns the robot module to operate on.
Resolution order:
- The
--robotoption fromigniter.args.options(parsed module name) {AppPrefix}.Robot(e.g.MyApp.Robot)
Add robot: :string (and ideally aliases: [r: :robot]) to your task's
schema to support the --robot flag.
Ensures the robot's child spec in the application module carries the given opts.
For new robot children, the opts are inserted directly. For existing children, the existing opts are replaced. This is a coarse operation; if multiple installers need to set different keys, the last one to run wins.