Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 1 | #include "y2014/control_loops/drivetrain/drivetrain_base.h" |
| 2 | |
| 3 | #include "frc971/control_loops/drivetrain/drivetrain_config.h" |
| 4 | |
| 5 | #include "y2014/control_loops/drivetrain/drivetrain_dog_motor_plant.h" |
| 6 | #include "y2014/control_loops/drivetrain/polydrivetrain_dog_motor_plant.h" |
| 7 | #include "y2014/control_loops/drivetrain/kalman_drivetrain_motor_plant.h" |
| 8 | #include "y2014/constants.h" |
| 9 | |
| 10 | using ::frc971::control_loops::drivetrain::DrivetrainConfig; |
| 11 | |
| 12 | namespace y2014 { |
| 13 | namespace control_loops { |
| 14 | |
| 15 | const DrivetrainConfig &GetDrivetrainConfig() { |
| 16 | static DrivetrainConfig kDrivetrainConfig{ |
| 17 | ::frc971::control_loops::drivetrain::ShifterType::HALL_EFFECT_SHIFTER, |
Comran Morshed | 76ca8f5 | 2016-02-21 17:26:28 +0000 | [diff] [blame] | 18 | ::frc971::control_loops::drivetrain::LoopType::CLOSED_LOOP, |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 19 | |
| 20 | ::y2014::control_loops::drivetrain::MakeDrivetrainLoop, |
| 21 | ::y2014::control_loops::drivetrain::MakeVelocityDrivetrainLoop, |
| 22 | ::y2014::control_loops::drivetrain::MakeKFDrivetrainLoop, |
| 23 | |
Comran Morshed | 3708f09 | 2016-02-20 16:23:51 +0000 | [diff] [blame] | 24 | drivetrain::kDt, |
| 25 | drivetrain::kRobotRadius, |
| 26 | drivetrain::kWheelRadius, |
| 27 | drivetrain::kV, |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 28 | |
Austin Schuh | 3130b37 | 2016-02-17 00:34:51 -0800 | [diff] [blame] | 29 | constants::GetValues().high_gear_ratio, |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 30 | constants::GetValues().low_gear_ratio, |
Comran Morshed | 3708f09 | 2016-02-20 16:23:51 +0000 | [diff] [blame] | 31 | constants::GetValues().left_drive, |
Adam Snaider | bc918b6 | 2016-02-27 21:03:39 -0800 | [diff] [blame] | 32 | constants::GetValues().right_drive, |
Austin Schuh | 093535c | 2016-03-05 23:21:00 -0800 | [diff] [blame^] | 33 | true, |
| 34 | // TODO(austin): Switch over to using the profle. |
| 35 | false}; |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 36 | |
| 37 | return kDrivetrainConfig; |
| 38 | }; |
| 39 | |
| 40 | } // namespace control_loops |
| 41 | } // namespace y2014 |