Ravens Robotics FRC 2015
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Robot Class Reference
Inheritance diagram for Robot:

Public Member Functions

 Robot ()
 

Private Member Functions

void RobotInit ()
 
void DisabledInit ()
 
void DisabledPeriodic ()
 
void AutonomousInit ()
 
void AutonomousPeriodic ()
 
void TeleopInit ()
 
void TeleopPeriodic ()
 
void TestInit ()
 
void TestPeriodic ()
 

Private Attributes

Camera m_Camera
 Camera RobotComponent. More...
 
MecanumDrive m_Drive
 MecanumDrive RobotComponent. More...
 
Encoder encoder
 
Ultrasonic Sonic
 
DigitalInput bottomSwitch
 
DigitalInput topSwitch
 
DigitalInput frontSwitch
 
LiveWindow * lw
 
int autoLoopCounter
 

Detailed Description

Our primary Robot class, based on IterativeRobot.

Definition at line 18 of file Robot.cpp.

Constructor & Destructor Documentation

Robot::Robot ( )
inline

Constructor - According to the docs for IterativeRobot, the initialization being done here should instead be in a RobotInit() function, to ensure that all base-level init is completed before we try using any hardware.

Definition at line 38 of file Robot.cpp.

Member Function Documentation

void Robot::AutonomousInit ( )
inlineprivate

Called each and every time autonomous is entered from another mode

Definition at line 78 of file Robot.cpp.

void Robot::AutonomousPeriodic ( )
inlineprivate

Called periodically during autonomous phase.

Periodic() functions – each of these functions is called iteratively at the appropriate periodic rate (aka the "slow loop"). The default period of the iterative robot is synced to the driver station control packets, giving a periodic frequency of about 50Hz (50 times per second).

Definition at line 93 of file Robot.cpp.

void Robot::DisabledInit ( )
inlineprivate

Called only when first disabled

Definition at line 63 of file Robot.cpp.

void Robot::DisabledPeriodic ( )
inlineprivate

Called periodically during disabled phase

Definition at line 70 of file Robot.cpp.

void Robot::RobotInit ( )
inlineprivate

Provide for initialization at robot power-on

Definition at line 53 of file Robot.cpp.

References MecanumDrive::ComponentInit(), and Camera::ComponentInit().

void Robot::TeleopInit ( )
inlineprivate

Called each and every time teleop is entered from another mode

Definition at line 107 of file Robot.cpp.

void Robot::TeleopPeriodic ( )
inlineprivate

Called periodically during teleop phase.

< Divides the value taken from the encoder by gear ratio of 71.164, it then divides the result by encoder ratio of 7:1, it will output the # of motor rotations.

Definition at line 114 of file Robot.cpp.

References Camera::DoWork(), MecanumDrive::DoWork(), MecanumDrive::Sense(), and Camera::Sense().

void Robot::TestInit ( )
inlineprivate

Called each and every time test is entered from another mode

Definition at line 184 of file Robot.cpp.

void Robot::TestPeriodic ( )
inlineprivate

Called periodically during test phase.

Definition at line 191 of file Robot.cpp.

Member Data Documentation

int Robot::autoLoopCounter
private

Definition at line 30 of file Robot.cpp.

DigitalInput Robot::bottomSwitch
private

Definition at line 26 of file Robot.cpp.

Encoder Robot::encoder
private

Definition at line 24 of file Robot.cpp.

DigitalInput Robot::frontSwitch
private

Definition at line 28 of file Robot.cpp.

LiveWindow* Robot::lw
private

Definition at line 29 of file Robot.cpp.

Camera Robot::m_Camera
private

Camera RobotComponent.

Definition at line 21 of file Robot.cpp.

MecanumDrive Robot::m_Drive
private

MecanumDrive RobotComponent.

Definition at line 22 of file Robot.cpp.

Ultrasonic Robot::Sonic
private

Definition at line 25 of file Robot.cpp.

DigitalInput Robot::topSwitch
private

Definition at line 27 of file Robot.cpp.


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