Ravens Robotics FRC 2015
|
#include <Camera.h>
Public Member Functions | |
Camera () | |
virtual | ~Camera () |
virtual void | ComponentInit () |
virtual void | Sense () |
virtual void | DoWork () |
![]() | |
RobotComponent () | |
virtual | ~RobotComponent () |
Private Attributes | |
Joystick * | m_Stick |
joystick controller More... | |
Servo * | m_Camera |
camera servo instance More... | |
float | m_CameraServoPosition |
current camera servo position More... | |
uint32_t | m_CameraMove |
command value received More... | |
The Camera RobotComponent provides control of the camera servo.
No functioning of the camera itself is controlled by this component.
Buttons 3 and 4 on the Auxiliary controller are mapped to servo up and down, respetively.
Upon initialization, the camera is moved to its starting position, defined by kCameraFirstPos
.
Range of motion is contained between kMaxCameraServoPosition
and temp=kMinCameraServoPosition
.
Camera::Camera | ( | ) |
Definition at line 13 of file Camera.cpp.
References m_Camera, m_CameraMove, m_CameraServoPosition, and m_Stick.
|
virtual |
Definition at line 21 of file Camera.cpp.
|
virtual |
Called once, to perform initialization that isn't appropriate for constructor.
Camera servo is moved to its starting position, kCameraFirstPos
.
Reimplemented from RobotComponent.
Definition at line 30 of file Camera.cpp.
References kStickChannel, m_Camera, m_CameraServoPosition, and m_Stick.
Referenced by Robot::RobotInit().
|
virtual |
Component-specific worker function. Move camera servo according to last info from Sense()
. Range of motion is contained between kMaxCameraServoPosition
and temp=kMinCameraServoPosition
. Report operation to SmartDashboard.
Reimplemented from RobotComponent.
Definition at line 57 of file Camera.cpp.
References m_Camera, m_CameraMove, and m_CameraServoPosition.
Referenced by Robot::TeleopPeriodic().
|
virtual |
Component-specific sensory input collector. Joystick buttons are read, and stored for use by DoWork()
.
Reimplemented from RobotComponent.
Definition at line 44 of file Camera.cpp.
References m_CameraMove, and m_Stick.
Referenced by Robot::TeleopPeriodic().
|
private |
|
private |
|
private |
current camera servo position
Definition at line 60 of file Camera.h.
Referenced by Camera(), ComponentInit(), and DoWork().
|
private |