Accessories
Arduino for motors and lights library.
AccessoryMotorOneWay Class Reference

#include "AccessoryMotorOneWay.hpp"

Inheritance diagram for AccessoryMotorOneWay:
AccessoryMotor Accessory

Public Member Functions

 AccessoryMotorOneWay ()
 
- Public Member Functions inherited from AccessoryMotor
 AccessoryMotor ()
 
bool ActionEnded ()
 
bool IsLeft () const
 
bool IsRight () const
 
bool IsStopped () const
 
void begin (Port *inpPort, unsigned long inId, int inSpeed, unsigned long inDurationMilli = 0)
 
void Event (unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID, int inData = 0)
 
int EEPROMLoad (int inPos)
 
void Move (unsigned long inId)
 
virtual void MoveLeft (unsigned long inDuration = 0, int inSpeed = 0)
 
virtual void MoveStop ()
 
void ExternalMove (ACC_STATE inNewState)
 
- Public Member Functions inherited from Accessory
 Accessory ()
 
void begin (ACC_STATE inStartingState = STATE_NONE)
 
PortGetPort () const
 
ACC_STATE GetState () const
 
ACC_STATE GetPreviousState () const
 
bool IsNone () const
 
bool IsFirst () const
 
bool IsSecond () const
 
uint8_t AddMovingPosition (unsigned long inId, int inPosition)
 
unsigned int GetDebounceDelay () const
 
unsigned long GetLastMoveTime () const
 
unsigned long GetDuration () const
 
bool loop ()
 
virtual int EEPROMSave (int inPos, bool inSimulate = false)
 
void AdjustMovingPositionsSize (uint8_t inNewSize)
 
bool IsEmpty () const
 
uint8_t IndexOfMovingPosition (unsigned long inId) const
 
int GetMovingPosition (unsigned long inId) const
 
int GetMovingPositionByIndex (int inIndex) const
 
unsigned long GetMovingPositionIdByIndex (int inIndex) const
 
const uint8_t GetLastMovingPosition () const
 
const uint8_t GetMovingPositionSize () const
 
void SetLastMovingPosition (uint8_t inLastPositionIndex)
 
void SetDebounceDelay (unsigned int inDebounceDelay)
 
void SetLastMoveTime ()
 
void SetDuration (unsigned long inDuration)
 
void SetNextAccessory (Accessory *inAccessory)
 
Accessory * GetNextAccessory () const
 
unsigned long GetActionStartingMillis () const
 
virtual void StartAction ()
 
virtual void StartAction (ACC_STATE inState)
 
virtual void ResetAction ()
 
bool IsActionDelayPending () const
 
virtual bool IsGroupActionPending () const
 
virtual bool CanBePositional () const
 
virtual void MovePosition (int inPosition)
 
void SetStateRaw (ACC_STATE inNewState)
 
void SetStartingMillis ()
 
void ResetStartingMillis ()
 

Protected Member Functions

void MoveRight (unsigned long inDuration = 0, int inSpeed = 0)
 
ACC_STATE MoveToggle (unsigned long inDuration = 0, int inSpeed = 0)
 
- Protected Member Functions inherited from AccessoryMotor
void SetState (ACC_STATE instate)
 
ACC_STATE Toggle ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Accessory
static void ExecuteEvent (unsigned long inId, ACCESSORIES_EVENT_TYPE inEvent = ACCESSORIES_EVENT_MOVEPOSITIONID, int inData = 0)
 
static uint8_t GetCount ()
 
static bool IsActionPending ()
 
static Accessory * GetFirstAccessory ()
 
- Protected Attributes inherited from Accessory
PortpPort
 
ACC_STATE prevState
 

Detailed Description

This class describes a motor with only one moving direction : uncoupling motor, rotating motor for windmill sails...

Definition at line 12 of file AccessoryMotorOneWay.hpp.

Constructor & Destructor Documentation

AccessoryMotorOneWay::AccessoryMotorOneWay ( )
inline

Default constructor.

Definition at line 16 of file AccessoryMotorOneWay.hpp.

Member Function Documentation

void AccessoryMotorOneWay::MoveRight ( unsigned long  inDuration = 0,
int  inSpeed = 0 
)
inlineprotectedvirtual

Move the motor... There is only one direction, so MoveLeft() will do the same movement than MoveRight() !

Parameters
[in]inDurationDuration of the movement. If 0, the movement will not stop until a MoveStop(). Default is 0.
[in]inSpeedspeed for this movement. This speed becomes the default speed for next movements. If 0, the speed is not updated. Default is 0.

Reimplemented from AccessoryMotor.

Definition at line 23 of file AccessoryMotorOneWay.hpp.

ACC_STATE AccessoryMotorOneWay::MoveToggle ( unsigned long  inDuration = 0,
int  inSpeed = 0 
)
inlineprotectedvirtual

Change the direction. Huh ? There is only one direction ? OK, change the direction to ... the same !

Parameters
[in]inDurationDuration of the movement. If 0, the movement will not stop until a MoveStop(). Default is 0.
[in]inSpeedspeed for this movement. This speed becomes the default speed for next movements. If 0, the speed is not updated. Default is 0.
Returns
returns the new state.

Implements AccessoryMotor.

Definition at line 30 of file AccessoryMotorOneWay.hpp.


The documentation for this class was generated from the following file: