RSeries astromech firmware
PeriscopeI2C Class Reference

#include <i2c/PeriscopeI2C.h>

Detailed Description

Encapsulates the available i2c commands that can be sent to the ia-parts.com periscope lifter and periscope light kight.

+ Inheritance diagram for PeriscopeI2C:
+ Collaboration diagram for PeriscopeI2C:

Public Member Functions

 PeriscopeI2C (const byte i2cAddress=0x20)
 Constructor. More...
 
bool readyForNewCmd ()
 Only allow a new command every 4 seconds. More...
 
bool isPeriscopeUp ()
 
void setToggleMode (bool toggleMode)
 
void up ()
 
void down ()
 Down just means down no toggle. More...
 
void randomFast ()
 
void randomSlow ()
 
void searchLightCW ()
 
void searchLightCCW ()
 
void faceForward ()
 
virtual void handleCommand (const char *cmd) override
 Periscope Commands start with 'PS'. More...
 
- Public Member Functions inherited from CommandEvent
 CommandEvent ()
 Default Constructor. More...
 
virtual void handleCommand (String cmd)
 Subclasses should implement this function to process commands specific to their device. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CommandEvent
static void process (char *cmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 
static void process (const char *cmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 
static void process (PROGMEMString pcmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 

Constructor & Destructor Documentation

◆ PeriscopeI2C()

PeriscopeI2C::PeriscopeI2C ( const byte  i2cAddress = 0x20)
inline

Constructor.

Default i2c address for the periscope is 0x20

Member Function Documentation

◆ down()

void PeriscopeI2C::down ( )
inline

Down just means down no toggle.

◆ faceForward()

void PeriscopeI2C::faceForward ( )
inline

◆ handleCommand()

virtual void PeriscopeI2C::handleCommand ( const char *  cmd)
inlineoverridevirtual

Periscope Commands start with 'PS'.

Implements CommandEvent.

◆ isPeriscopeUp()

bool PeriscopeI2C::isPeriscopeUp ( )
inline

◆ randomFast()

void PeriscopeI2C::randomFast ( )
inline

◆ randomSlow()

void PeriscopeI2C::randomSlow ( )
inline

◆ readyForNewCmd()

bool PeriscopeI2C::readyForNewCmd ( )
inline

Only allow a new command every 4 seconds.

◆ searchLightCCW()

void PeriscopeI2C::searchLightCCW ( )
inline

◆ searchLightCW()

void PeriscopeI2C::searchLightCW ( )
inline

◆ setToggleMode()

void PeriscopeI2C::setToggleMode ( bool  toggleMode)
inline

◆ up()

void PeriscopeI2C::up ( )
inline

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