Fixed claw angle conversion bug and scaled the hall effect on the drivetrain propperly.
diff --git a/frc971/input/sensor_receiver.cc b/frc971/input/sensor_receiver.cc
index 8c4172d..f375f20 100644
--- a/frc971/input/sensor_receiver.cc
+++ b/frc971/input/sensor_receiver.cc
@@ -50,12 +50,9 @@
// TODO(brian): Fix this.
double adc_translate(uint16_t in) {
static const double kVcc = 5;
- static const double kR1 = 5, kR2 = 6.65;
+ //static const double kR1 = 5, kR2 = 6.65;
static const uint16_t kMaximumValue = 0x3FF;
- return (kVcc *
- (static_cast<double>(in) / static_cast<double>(kMaximumValue)) -
- kVcc * kR1) /
- kR2;
+ return (kVcc * static_cast<double>(in) / static_cast<double>(kMaximumValue));
}
double gyro_translate(int64_t in) {
@@ -77,7 +74,8 @@
/ (256.0 /*cpr*/ * 4.0 /*quad*/)
/ (18.0 / 48.0 /*encoder gears*/)
/ (12.0 / 60.0 /*chain reduction*/)
- * (M_PI / 180.0);
+ * (M_PI / 180.0)
+ * 2.0 /*TODO(austin): Debug this, encoders read too little*/;
}
double shooter_translate(int32_t in) {