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:
Peter Johnson
2015-11-06 12:05:40 -08:00
parent e2a4556669
commit c20d34c2b6
22 changed files with 391 additions and 210 deletions

View File

@@ -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));

View File

@@ -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();