Table Of Contents

Previous topic

motion.LookForward

Next topic

motion.Orientation

This Page

motion.Motion

Constructor

class motion.Motion(presence, fn, period)
Arguments:
  • presence (presence) – The presence to control. This may be changed later by assigning to <code>controller.presence</code>.
  • fn (function(presence)->undefined) – The callback function to call repeatedly, with the presence as a parameter
  • period (number) – (optional =defaultPeriod) The period at which the callback is called

Methods

isSuspended()
Returns:<code>true</code> if the controller is currently suspended, <code>false</code> otherwise.
Return type:boolean
reset()

Restarts the controller, resuming if suspended.

suspend()

Pauses the operation of the controller. The controller can be resumed at any time by calling <code>reset</code>.

Attributes

presence

presence

The presence the motion controller controls.