commit | 9993fb33c207645f68b63bc3ed4dffb52cca0604 | [log] [tgz] |
---|---|---|
author | Austin Schuh <austin.linux@gmail.com> | Wed Mar 15 20:17:46 2017 -0700 |
committer | Austin Schuh <austin.linux@gmail.com> | Wed Mar 22 21:00:54 2017 -0700 |
tree | 230a9760ababc7ba009c2ac6e69e6092be03ce82 | |
parent | 69f8a4f249a0a1e22aa02b166cf3ca10cbbd9e5f [diff] [blame] |
Drivetrain now resets the saved gyro value if it is stale. Change-Id: I624f4c035babe8c22a633fd16dccc9b960d055c7
diff --git a/frc971/control_loops/drivetrain/drivetrain.h b/frc971/control_loops/drivetrain/drivetrain.h index 3483b60..2b4c1f7 100644 --- a/frc971/control_loops/drivetrain/drivetrain.h +++ b/frc971/control_loops/drivetrain/drivetrain.h
@@ -46,6 +46,8 @@ StateFeedbackLoop<7, 2, 3> kf_; PolyDrivetrain dt_openloop_; DrivetrainMotorsSS dt_closedloop_; + ::aos::monotonic_clock::time_point last_gyro_time_ = + ::aos::monotonic_clock::min_time; StateFeedbackLoop<2, 1, 1> down_estimator_; Eigen::Matrix<double, 1, 1> down_U_;