mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[examples] Rename DriveTrain classes to Drivetrain (#3594)
Drivetrain is one word, not two.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "commands/Autonomous.h"
|
||||
#include "subsystems/Claw.h"
|
||||
#include "subsystems/DriveTrain.h"
|
||||
#include "subsystems/Drivetrain.h"
|
||||
#include "subsystems/Elevator.h"
|
||||
#include "subsystems/Wrist.h"
|
||||
|
||||
@@ -33,7 +33,7 @@ class RobotContainer {
|
||||
Claw m_claw;
|
||||
Wrist m_wrist;
|
||||
Elevator m_elevator;
|
||||
DriveTrain m_drivetrain;
|
||||
Drivetrain m_drivetrain;
|
||||
|
||||
Autonomous m_autonomousCommand;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <frc2/command/SequentialCommandGroup.h>
|
||||
|
||||
#include "subsystems/Claw.h"
|
||||
#include "subsystems/DriveTrain.h"
|
||||
#include "subsystems/Drivetrain.h"
|
||||
#include "subsystems/Elevator.h"
|
||||
#include "subsystems/Wrist.h"
|
||||
|
||||
@@ -19,5 +19,5 @@ class Autonomous
|
||||
: public frc2::CommandHelper<frc2::SequentialCommandGroup, Autonomous> {
|
||||
public:
|
||||
Autonomous(Claw* claw, Wrist* wrist, Elevator* elevator,
|
||||
DriveTrain* drivetrain);
|
||||
Drivetrain* drivetrain);
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <frc2/command/CommandHelper.h>
|
||||
#include <frc2/command/PIDCommand.h>
|
||||
|
||||
#include "subsystems/DriveTrain.h"
|
||||
#include "subsystems/Drivetrain.h"
|
||||
|
||||
/**
|
||||
* Drive the given distance straight (negative values go backwards).
|
||||
@@ -18,10 +18,10 @@
|
||||
class DriveStraight
|
||||
: public frc2::CommandHelper<frc2::PIDCommand, DriveStraight> {
|
||||
public:
|
||||
explicit DriveStraight(double distance, DriveTrain* drivetrain);
|
||||
explicit DriveStraight(double distance, Drivetrain* drivetrain);
|
||||
void Initialize() override;
|
||||
bool IsFinished() override;
|
||||
|
||||
private:
|
||||
DriveTrain* m_drivetrain;
|
||||
Drivetrain* m_drivetrain;
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <frc2/command/CommandHelper.h>
|
||||
#include <frc2/command/PIDCommand.h>
|
||||
|
||||
#include "subsystems/DriveTrain.h"
|
||||
#include "subsystems/Drivetrain.h"
|
||||
|
||||
/**
|
||||
* Drive until the robot is the given distance away from the box. Uses a local
|
||||
@@ -18,10 +18,10 @@
|
||||
class SetDistanceToBox
|
||||
: public frc2::CommandHelper<frc2::PIDCommand, SetDistanceToBox> {
|
||||
public:
|
||||
explicit SetDistanceToBox(double distance, DriveTrain* drivetrain);
|
||||
explicit SetDistanceToBox(double distance, Drivetrain* drivetrain);
|
||||
void Initialize() override;
|
||||
bool IsFinished() override;
|
||||
|
||||
private:
|
||||
DriveTrain* m_drivetrain;
|
||||
Drivetrain* m_drivetrain;
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <frc2/command/CommandBase.h>
|
||||
#include <frc2/command/CommandHelper.h>
|
||||
|
||||
#include "subsystems/DriveTrain.h"
|
||||
#include "subsystems/Drivetrain.h"
|
||||
|
||||
/**
|
||||
* Have the robot drive tank style using the PS3 Joystick until interrupted.
|
||||
@@ -15,7 +15,7 @@
|
||||
class TankDrive : public frc2::CommandHelper<frc2::CommandBase, TankDrive> {
|
||||
public:
|
||||
TankDrive(std::function<double()> left, std::function<double()> right,
|
||||
DriveTrain* drivetrain);
|
||||
Drivetrain* drivetrain);
|
||||
void Execute() override;
|
||||
bool IsFinished() override;
|
||||
void End(bool interrupted) override;
|
||||
@@ -23,5 +23,5 @@ class TankDrive : public frc2::CommandHelper<frc2::CommandBase, TankDrive> {
|
||||
private:
|
||||
std::function<double()> m_left;
|
||||
std::function<double()> m_right;
|
||||
DriveTrain* m_drivetrain;
|
||||
Drivetrain* m_drivetrain;
|
||||
};
|
||||
|
||||
@@ -17,13 +17,13 @@ class Joystick;
|
||||
} // namespace frc
|
||||
|
||||
/**
|
||||
* The DriveTrain subsystem incorporates the sensors and actuators attached to
|
||||
* The Drivetrain subsystem incorporates the sensors and actuators attached to
|
||||
* the robots chassis. These include four drive motors, a left and right encoder
|
||||
* and a gyro.
|
||||
*/
|
||||
class DriveTrain : public frc2::SubsystemBase {
|
||||
class Drivetrain : public frc2::SubsystemBase {
|
||||
public:
|
||||
DriveTrain();
|
||||
Drivetrain();
|
||||
|
||||
/**
|
||||
* The log method puts interesting information to the SmartDashboard.
|
||||
@@ -31,7 +31,7 @@ class DriveTrain : public frc2::SubsystemBase {
|
||||
void Log();
|
||||
|
||||
/**
|
||||
* Tank style driving for the DriveTrain.
|
||||
* Tank style driving for the Drivetrain.
|
||||
* @param left Speed in range [-1,1]
|
||||
* @param right Speed in range [-1,1]
|
||||
*/
|
||||
Reference in New Issue
Block a user