mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[examples] Fix feildRelative -> fieldRelative typo in XControllerCommand examples (#3104)
* MecanumControllerCommand * SwerveControllerCommand
This commit is contained in:
@@ -48,8 +48,8 @@ void DriveSubsystem::Periodic() {
|
||||
}
|
||||
|
||||
void DriveSubsystem::Drive(double xSpeed, double ySpeed, double rot,
|
||||
bool feildRelative) {
|
||||
if (feildRelative) {
|
||||
bool fieldRelative) {
|
||||
if (fieldRelative) {
|
||||
m_drive.DriveCartesian(ySpeed, xSpeed, rot, -m_gyro.GetAngle());
|
||||
} else {
|
||||
m_drive.DriveCartesian(ySpeed, xSpeed, rot);
|
||||
|
||||
@@ -39,7 +39,7 @@ class DriveSubsystem : public frc2::SubsystemBase {
|
||||
* @param fieldRelative Whether the provided x and y speeds are relative to
|
||||
* the field.
|
||||
*/
|
||||
void Drive(double xSpeed, double ySpeed, double rot, bool feildRelative);
|
||||
void Drive(double xSpeed, double ySpeed, double rot, bool fieldRelative);
|
||||
|
||||
/**
|
||||
* Resets the drive encoders to currently read a position of 0.
|
||||
|
||||
Reference in New Issue
Block a user