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 MecanumDrive_Polar(float magnitude, float direction, float rotation)
void Drive(float outputMagnitude, float curve)
void RotateVector(double &x, double &y, double angle)
void TankDrive(GenericHID *leftStick, GenericHID *rightStick, bool squaredInputs=true)
virtual void SetLeftRightMotorOutputs(float leftOutput, float rightOutput)
void HolonomicDrive(float magnitude, float direction, float rotation)
void Normalize(double *wheelSpeeds)
void ArcadeDrive(GenericHID *stick, bool squaredInputs=true)
RobotDrive(uint32_t leftMotorChannel, uint32_t rightMotorChannel)
void SetSensitivity(float sensitivity)
void SetMaxOutput(double maxOutput)
void MecanumDrive_Cartesian(float x, float y, float rotation, float gyroAngle=0.0)