10 #include "ErrorBase.h"
13 #include "MotorSafety.h"
14 #include "MotorSafetyHelper.h"
38 RobotDrive(uint32_t leftMotorChannel, uint32_t rightMotorChannel);
39 RobotDrive(uint32_t frontLeftMotorChannel, uint32_t rearLeftMotorChannel,
40 uint32_t frontRightMotorChannel, uint32_t rearRightMotorChannel);
49 void Drive(
float outputMagnitude,
float curve);
54 void TankDrive(
float leftValue,
float rightValue,
bool squaredInputs =
true);
59 void ArcadeDrive(
float moveValue,
float rotateValue,
bool squaredInputs =
true);
62 void HolonomicDrive(
float magnitude,
float direction,
float rotation);
64 void SetInvertedMotor(MotorType motor,
bool isInverted);
68 void SetExpiration(
float timeout);
69 float GetExpiration();
72 bool IsSafetyEnabled();
73 void SetSafetyEnabled(
bool enabled);
74 void GetDescription(
char *desc);
78 float Limit(
float num);
82 static const int32_t kMaxNumberOfMotors = 4;
84 int32_t m_invertedMotors[kMaxNumberOfMotors];
87 bool m_deleteSpeedControllers;
95 int32_t GetNumMotors()
98 if (m_frontLeftMotor) motors++;
99 if (m_frontRightMotor) motors++;
100 if (m_rearLeftMotor) motors++;
101 if (m_rearRightMotor) motors++;
void TankDrive(GenericHID *leftStick, GenericHID *rightStick, bool squaredInputs=true)
Definition: RobotDrive.cpp:241
Definition: MotorSafety.h:11
virtual void SetLeftRightMotorOutputs(float leftOutput, float rightOutput)
Definition: RobotDrive.cpp:592
void RotateVector(double &x, double &y, double angle)
Definition: RobotDrive.cpp:651
void SetMaxOutput(double maxOutput)
Definition: RobotDrive.cpp:694
void SetSensitivity(float sensitivity)
Definition: RobotDrive.cpp:685
Definition: ErrorBase.h:37
float Limit(float num)
Definition: RobotDrive.cpp:614
void InitRobotDrive()
Definition: RobotDrive.cpp:34
virtual ~RobotDrive()
Definition: RobotDrive.cpp:176
Definition: SpeedController.h:16
Definition: MotorSafetyHelper.h:16
Definition: RobotDrive.h:27
void HolonomicDrive(float magnitude, float direction, float rotation)
Definition: RobotDrive.cpp:580
void ArcadeDrive(GenericHID *stick, bool squaredInputs=true)
Definition: RobotDrive.cpp:333
void Drive(float outputMagnitude, float curve)
Definition: RobotDrive.cpp:200
RobotDrive(uint32_t leftMotorChannel, uint32_t rightMotorChannel)
Definition: RobotDrive.cpp:52
void MecanumDrive_Polar(float magnitude, float direction, float rotation)
Definition: RobotDrive.cpp:533
void Normalize(double *wheelSpeeds)
Definition: RobotDrive.cpp:630
void MecanumDrive_Cartesian(float x, float y, float rotation, float gyroAngle=0.0)
Definition: RobotDrive.cpp:484
Definition: GenericHID.h:14