RSeries astromech firmware
StealthController Class Reference

#include <core/StealthController.h>

Detailed Description

Stealth Controller directly attached to the Arduino to read J1/J2 and S1/S2 status header and using an external DAC via i2c to set the dome AutoDome position.

+ Inheritance diagram for StealthController:
+ Collaboration diagram for StealthController:

Public Member Functions

 StealthController (const byte pinS1=26, const byte pinJ1=28, const byte pinS2=27, const byte pinJ2=29, const byte pinLegMotors=10, const byte pinDomeMotor=11)
 Default Constructor. More...
 
virtual void setup () override
 Setup pin mode for analog read. More...
 
void setDomePosition (uint16_t degrees)
 
bool getS1 ()
 
bool getS2 ()
 
bool getJ1 ()
 
bool getJ2 ()
 
byte getStatusFlags ()
 
bool getStatusChanged ()
 
bool didLegMotorsStart ()
 
bool didLegMotorsStop ()
 
bool getLegMotorsMoving ()
 
bool didDomeMotorStart ()
 
bool didDomeMotorStop ()
 
bool getDomeMotorMoving ()
 
virtual void animate () override
 Read the pot once through the loop. More...
 
- Public Member Functions inherited from SetupEvent
 SetupEvent ()
 Default Constructor. More...
 

Public Attributes

const byte S1_FLAG = 1<<0
 
const byte S2_FLAG = 1<<1
 
const byte J1_FLAG = 1<<2
 
const byte J2_FLAG = 1<<3
 
const byte LEGMOTORS_FLAG = 1<<4
 
const byte DOMEMOTOR_FLAG = 1<<5
 

Additional Inherited Members

- Static Public Member Functions inherited from SetupEvent
static void ready ()
 Calls setup() for each created AnimatedEvent subclass. More...
 

Constructor & Destructor Documentation

◆ StealthController()

StealthController::StealthController ( const byte  pinS1 = 26,
const byte  pinJ1 = 28,
const byte  pinS2 = 27,
const byte  pinJ2 = 29,
const byte  pinLegMotors = 10,
const byte  pinDomeMotor = 11 
)
inline

Default Constructor.

Stealth Controller.

Member Function Documentation

◆ animate()

virtual void StealthController::animate ( )
inlineoverridevirtual

Read the pot once through the loop.

Implements AnimatedEvent.

◆ didDomeMotorStart()

bool StealthController::didDomeMotorStart ( )
inline

◆ didDomeMotorStop()

bool StealthController::didDomeMotorStop ( )
inline

◆ didLegMotorsStart()

bool StealthController::didLegMotorsStart ( )
inline

◆ didLegMotorsStop()

bool StealthController::didLegMotorsStop ( )
inline

◆ getDomeMotorMoving()

bool StealthController::getDomeMotorMoving ( )
inline

◆ getJ1()

bool StealthController::getJ1 ( )
inline

◆ getJ2()

bool StealthController::getJ2 ( )
inline

◆ getLegMotorsMoving()

bool StealthController::getLegMotorsMoving ( )
inline

◆ getS1()

bool StealthController::getS1 ( )
inline

◆ getS2()

bool StealthController::getS2 ( )
inline

◆ getStatusChanged()

bool StealthController::getStatusChanged ( )
inline

◆ getStatusFlags()

byte StealthController::getStatusFlags ( )
inline

◆ setDomePosition()

void StealthController::setDomePosition ( uint16_t  degrees)
inline

◆ setup()

virtual void StealthController::setup ( )
inlineoverridevirtual

Setup pin mode for analog read.

Implements SetupEvent.

Member Data Documentation

◆ DOMEMOTOR_FLAG

const byte StealthController::DOMEMOTOR_FLAG = 1<<5

◆ J1_FLAG

const byte StealthController::J1_FLAG = 1<<2

◆ J2_FLAG

const byte StealthController::J2_FLAG = 1<<3

◆ LEGMOTORS_FLAG

const byte StealthController::LEGMOTORS_FLAG = 1<<4

◆ S1_FLAG

const byte StealthController::S1_FLAG = 1<<0

◆ S2_FLAG

const byte StealthController::S2_FLAG = 1<<1

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