2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
|
Provides methods for interacting with the camera on a high level. More...
#include <shooter_subsystem.h>
Public Member Functions | |
CameraInterface () | |
std::optional< LimelightTarget > | GetHighestTarget () |
Get the highest target the camera can see CAN RETURN NONE. More... | |
units::angle::degree_t | VerticalPixelToAngle (int pixels) |
Converts vertical pixels to degrees. More... | |
units::angle::degree_t | HorizontalPixelToAngle (int pixels) |
Converts horizontal pixels to degrees. More... | |
units::angle::degree_t | GetNewPitch (units::degree_t cx, units::degree_t cy, int bboxHorizontalPixels, int bboxVerticalPixels, units::degree_t skew) |
Gets the new pitch for the top of the target. More... | |
void | SetDriverMode (bool mode) |
Turns the camera's driver mode on and off. More... | |
Public Attributes | |
LimelightTarget | m_target |
object that holds the current target seen by the camera More... | |
Provides methods for interacting with the camera on a high level.
CameraInterface::CameraInterface | ( | ) |
std::optional< LimelightTarget > CameraInterface::GetHighestTarget | ( | ) |
Get the highest target the camera can see CAN RETURN NONE.
units::angle::degree_t CameraInterface::GetNewPitch | ( | units::degree_t | cx, |
units::degree_t | cy, | ||
int | bboxHorizontalPixels, | ||
int | bboxVerticalPixels, | ||
units::degree_t | skew | ||
) |
Gets the new pitch for the top of the target.
units::angle::degree_t CameraInterface::HorizontalPixelToAngle | ( | int | pixels | ) |
Converts horizontal pixels to degrees.
void CameraInterface::SetDriverMode | ( | bool | mode | ) |
Turns the camera's driver mode on and off.
mode | True is drive control. False is no drive control |
units::angle::degree_t CameraInterface::VerticalPixelToAngle | ( | int | pixels | ) |
Converts vertical pixels to degrees.
LimelightTarget CameraInterface::m_target |
object that holds the current target seen by the camera