various small tweaks/fixes from Madtown
diff --git a/frc971/control_loops/drivetrain/drivetrain.cc b/frc971/control_loops/drivetrain/drivetrain.cc
index 921fab0..71af487 100644
--- a/frc971/control_loops/drivetrain/drivetrain.cc
+++ b/frc971/control_loops/drivetrain/drivetrain.cc
@@ -106,7 +106,6 @@
_gyro = gyro;
_control_loop_driving = control_loop_driving;
SetRawPosition(left, right);
- //LOG(DEBUG, "Left %f->%f Right %f->%f Gyro %f aerror %f ioff %f\n", left + _offset, _left_goal, right - _offset, _right_goal, gyro, angle_error, _integral_offset);
}
void Update(bool update_observer, bool stop_motors) {
@@ -524,8 +523,6 @@
}
void SendMotors(Drivetrain::Output *output) {
- LOG(DEBUG, "left pwm: %f right pwm: %f wheel: %f throttle: %f\n",
- loop_->U(0, 0), loop_->U(1, 0), wheel_, throttle_);
if (output != NULL) {
output->left_voltage = loop_->U(0, 0);
output->right_voltage = loop_->U(1, 0);
@@ -738,6 +735,7 @@
const double left_encoder = position->left_encoder;
const double right_encoder = position->right_encoder;
if (gyro.FetchLatest()) {
+ LOG(DEBUG, "gyro %f\n", gyro->angle);
dt_closedloop.SetPosition(left_encoder, right_encoder, gyro->angle,
control_loop_driving);
} else {
diff --git a/frc971/control_loops/index/index.cc b/frc971/control_loops/index/index.cc
index b36d517..9a03657 100644
--- a/frc971/control_loops/index/index.cc
+++ b/frc971/control_loops/index/index.cc
@@ -110,7 +110,7 @@
/*static*/ const int IndexMotor::kGrabbingDelay = 5;
/*static*/ const int IndexMotor::kLiftingDelay = 5;
/*static*/ const int IndexMotor::kLiftingTimeout = 100;
-/*static*/ const int IndexMotor::kShootingDelay = 10;
+/*static*/ const int IndexMotor::kShootingDelay = 25;
/*static*/ const int IndexMotor::kLoweringDelay = 4;
/*static*/ const int IndexMotor::kLoweringTimeout = 120;
diff --git a/frc971/control_loops/zeroed_joint.h b/frc971/control_loops/zeroed_joint.h
index 0fbe33e..26dfc91 100644
--- a/frc971/control_loops/zeroed_joint.h
+++ b/frc971/control_loops/zeroed_joint.h
@@ -263,7 +263,7 @@
template <int kNumZeroSensors>
const ::aos::time::Time ZeroedJoint<kNumZeroSensors>::kRezeroTime =
- ::aos::time::Time::InSeconds(10);
+ ::aos::time::Time::InSeconds(2);
template <int kNumZeroSensors>
/*static*/ const double ZeroedJoint<kNumZeroSensors>::dt = 0.01;