mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Rename Gyro to AnalogGyro and make Gyro an interface.
Refactor common implementation parts of AnalogGyro into GyroBase. This will make it possible to add digital gyros in a similar way to how digital accelerometers were added. Change-Id: I437ef259e9ecb81f18a91a95c5a58b6607db5e15
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
DriveTrain::DriveTrain()
|
||||
: Subsystem("DriveTrain"), left_encoder(new Encoder(1, 2)),
|
||||
right_encoder(new Encoder(3, 4)), rangefinder(new AnalogInput(6)),
|
||||
gyro(new Gyro(1)) {
|
||||
gyro(new AnalogGyro(1)) {
|
||||
drive = new RobotDrive(new Talon(1), new Talon(2),
|
||||
new Talon(3), new Talon(4));
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ private:
|
||||
RobotDrive* drive;
|
||||
std::shared_ptr<Encoder> left_encoder, right_encoder;
|
||||
std::shared_ptr<AnalogInput> rangefinder;
|
||||
std::shared_ptr<Gyro> gyro;
|
||||
std::shared_ptr<AnalogGyro> gyro;
|
||||
|
||||
public:
|
||||
DriveTrain();
|
||||
|
||||
Reference in New Issue
Block a user