From 38c1a1f3e0f6040333dbd0c7e8eb57b88add38d8 Mon Sep 17 00:00:00 2001 From: Modelmat Date: Wed, 20 Jan 2021 06:57:41 +0000 Subject: [PATCH] [examples] Fix feildRelative -> fieldRelative typo in XControllerCommand examples (#3104) * MecanumControllerCommand * SwerveControllerCommand --- .../cpp/subsystems/DriveSubsystem.cpp | 4 ++-- .../include/subsystems/DriveSubsystem.h | 2 +- .../include/subsystems/DriveSubsystem.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/subsystems/DriveSubsystem.cpp b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/subsystems/DriveSubsystem.cpp index bd80ad9284..8d357f429f 100644 --- a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/subsystems/DriveSubsystem.cpp +++ b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/subsystems/DriveSubsystem.cpp @@ -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); diff --git a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/subsystems/DriveSubsystem.h b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/subsystems/DriveSubsystem.h index 3313596f77..f27155be93 100644 --- a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/subsystems/DriveSubsystem.h +++ b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/include/subsystems/DriveSubsystem.h @@ -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. diff --git a/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/subsystems/DriveSubsystem.h b/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/subsystems/DriveSubsystem.h index 9fd548cffd..4cabdc67c1 100644 --- a/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/subsystems/DriveSubsystem.h +++ b/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand/include/subsystems/DriveSubsystem.h @@ -43,7 +43,7 @@ class DriveSubsystem : public frc2::SubsystemBase { */ void Drive(units::meters_per_second_t xSpeed, units::meters_per_second_t ySpeed, units::radians_per_second_t rot, - bool feildRelative); + bool fieldRelative); /** * Resets the drive encoders to currently read a position of 0.