diff --git a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/Constants.cpp b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/Constants.cpp new file mode 100644 index 0000000000..bc6751f059 --- /dev/null +++ b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/Constants.cpp @@ -0,0 +1,18 @@ +/*----------------------------------------------------------------------------*/ +/* Copyright (c) 2019 FIRST. All Rights Reserved. */ +/* Open Source Software - may be modified and shared by FRC teams. The code */ +/* must be accompanied by the FIRST BSD license file in the root directory of */ +/* the project. */ +/*----------------------------------------------------------------------------*/ + +#include "Constants.h" + +namespace DriveConstants { + +const frc::MecanumDriveKinematics kDriveKinematics{ + frc::Translation2d(kWheelBase / 2, kTrackWidth / 2), + frc::Translation2d(kWheelBase / 2, -kTrackWidth / 2), + frc::Translation2d(-kWheelBase / 2, kTrackWidth / 2), + frc::Translation2d(-kWheelBase / 2, -kTrackWidth / 2)}; + +} // namespace DriveConstants diff --git a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/RobotContainer.cpp b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/RobotContainer.cpp index c7379cbacd..756deaae6a 100644 --- a/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/RobotContainer.cpp +++ b/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand/cpp/RobotContainer.cpp @@ -22,12 +22,6 @@ using namespace DriveConstants; -const frc::MecanumDriveKinematics DriveConstants::kDriveKinematics{ - frc::Translation2d(kWheelBase / 2, kTrackWidth / 2), - frc::Translation2d(kWheelBase / 2, -kTrackWidth / 2), - frc::Translation2d(-kWheelBase / 2, kTrackWidth / 2), - frc::Translation2d(-kWheelBase / 2, -kTrackWidth / 2)}; - RobotContainer::RobotContainer() { // Initialize all of your commands and subsystems here