yaq/traits/is-homeable


Exposes a homing procedure

requires

has-position

state

Daemons with the is-homeable trait will provide the following state information:

position (number)
from has-position

destination (number)
from has-position

methods

Daemons with the is-homeable trait expose the following public methods:

home
Initiates the homing procedure. The daemon will report as busy during the homing procedure. After the homing procedure is complete, the daemon will return to the current destination.

get_destination ➜ number
Get current daemon destination.
from has-position

get_units ➜ string
Get units of daemon. These units apply to the position and destination fields.
from has-position

get_position ➜ number
Get current daemon position.
from has-position

set_position
Give the daemon a new destination, and begin motion towards that destination.
from has-position
Arguments:

position, {'type': 'number'}

set_relative ➜ number
Give the daemon a new destination relative to its current position. Daemon will immediately begin motion towards new destination. Returns new destination.
from has-position
Arguments:

distance, {'type': 'number'}

daemons

The following daemons implement the is-homeable trait:

adafruit-stepper-motor-hat
micro-hr
wright-wl-motor