RSeries astromech firmware
ServoSequencer.h File Reference
#include "ReelTwo.h"
#include "core/AnimatedEvent.h"
#include "ServoDispatch.h"
+ Include dependency graph for ServoSequencer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ServoStep
 Single frame of servo animation. Time is specified in centi seconds (1/100th of a second) More...
 
class  ServoSequencer
 Plays a sequence of servo commands using a servo group mask. More...
 

Macros

#define SEQUENCE_RANGE_LIMIT(offsetFromMin, offsetFromMax)   { uint16_t(~0), (((offsetFromMin)>>8)&0xFF), (((offsetFromMin)>>0)&0xFF), (((offsetFromMax)>>8)&0xFF), (((offsetFromMax)>>0)&0xFF) },
 
#define SEQUENCE_PLAY_ONCE(sequencer, sequence, groupMask)   (sequencer).play(sequence, SizeOfArray(sequence), groupMask)
 
#define SEQUENCE_PLAY_ONCE_SPEED(sequencer, sequence, groupMask, speed)   (sequencer).play(sequence, SizeOfArray(sequence), groupMask, speed)
 
#define SEQUENCE_PLAY_ONCE_VARSPEED(sequencer, sequence, groupMask, minspeed, maxspeed)   (sequencer).playVariableSpeed(sequence, SizeOfArray(sequence), groupMask, minspeed, maxspeed)
 
#define SEQUENCE_PLAY_RANDOM_STEP(sequencer, sequence, groupMask)   (sequencer).play(&sequence[random(SizeOfArray(sequence))], 1, groupMask)
 
#define SEQUENCE_PLAY_ONCE_VARSPEED_EASING(sequencer, sequence, groupMask, minspeed, maxspeed, onEasing, offEasing)   (sequencer).playVariableSpeed(sequence, SizeOfArray(sequence), groupMask, minspeed, maxspeed, 0.0, 1.0, onEasing, offEasing)
 

Typedefs

typedef struct ServoStep ServoSequence[]
 

Macro Definition Documentation

◆ SEQUENCE_PLAY_ONCE

#define SEQUENCE_PLAY_ONCE (   sequencer,
  sequence,
  groupMask 
)    (sequencer).play(sequence, SizeOfArray(sequence), groupMask)

◆ SEQUENCE_PLAY_ONCE_SPEED

#define SEQUENCE_PLAY_ONCE_SPEED (   sequencer,
  sequence,
  groupMask,
  speed 
)    (sequencer).play(sequence, SizeOfArray(sequence), groupMask, speed)

◆ SEQUENCE_PLAY_ONCE_VARSPEED

#define SEQUENCE_PLAY_ONCE_VARSPEED (   sequencer,
  sequence,
  groupMask,
  minspeed,
  maxspeed 
)    (sequencer).playVariableSpeed(sequence, SizeOfArray(sequence), groupMask, minspeed, maxspeed)

◆ SEQUENCE_PLAY_ONCE_VARSPEED_EASING

#define SEQUENCE_PLAY_ONCE_VARSPEED_EASING (   sequencer,
  sequence,
  groupMask,
  minspeed,
  maxspeed,
  onEasing,
  offEasing 
)    (sequencer).playVariableSpeed(sequence, SizeOfArray(sequence), groupMask, minspeed, maxspeed, 0.0, 1.0, onEasing, offEasing)

◆ SEQUENCE_PLAY_RANDOM_STEP

#define SEQUENCE_PLAY_RANDOM_STEP (   sequencer,
  sequence,
  groupMask 
)    (sequencer).play(&sequence[random(SizeOfArray(sequence))], 1, groupMask)

◆ SEQUENCE_RANGE_LIMIT

#define SEQUENCE_RANGE_LIMIT (   offsetFromMin,
  offsetFromMax 
)    { uint16_t(~0), (((offsetFromMin)>>8)&0xFF), (((offsetFromMin)>>0)&0xFF), (((offsetFromMax)>>8)&0xFF), (((offsetFromMax)>>0)&0xFF) },

Typedef Documentation

◆ ServoSequence

typedef struct ServoStep ServoSequence[]