Remove some kludges for non-working shooter sensor.
diff --git a/bot3/autonomous/auto.cc b/bot3/autonomous/auto.cc
index 89f89a0..01cf0e3 100644
--- a/bot3/autonomous/auto.cc
+++ b/bot3/autonomous/auto.cc
@@ -30,11 +30,6 @@
.velocity(velocity).push(push).Send();
}
-void SpinUp() {
- LOG(INFO, "Tricking shooter into running at full power...\n");
- control_loops::shooter.position.MakeWithBuilder().velocity(0).Send();
-}
-
bool ShooterReady() {
bool ready = control_loops::shooter.status.FetchNextBlocking() && control_loops::shooter.status->ready;
LOG(DEBUG, "Shooter ready: %d\n", ready);
@@ -54,8 +49,6 @@
SetShooter(shooter_velocity, true);
::aos::time::SleepFor(::aos::time::Time::InSeconds(0.25));
SetShooter(shooter_velocity, false);
- // We just shot, trick it into spinning back up.
- SpinUp();
::aos::time::SleepFor(::aos::time::Time::InSeconds(2.0));
}
return;
diff --git a/bot3/input/joystick_reader.cc b/bot3/input/joystick_reader.cc
index dbfd92a..f9e9abc 100644
--- a/bot3/input/joystick_reader.cc
+++ b/bot3/input/joystick_reader.cc
@@ -96,17 +96,11 @@
shooter.status.FetchLatest();
bool push = false;
- bool full_power = false;
double velocity = 0.0;
double intake = 0.0;
if (data.IsPressed(kPush) && shooter.status->ready) {
push = true;
}
- if (!push && last_push_) {
- //Falling edge
- full_power = true;
- }
- last_push_ = push;
if (data.IsPressed(kFire)) {
velocity = 500;
}
@@ -134,10 +128,6 @@
if (abs(throttle) < 0.2 && !quickturn) {
shooting_ = true;
shooter.goal.MakeWithBuilder().intake(intake).velocity(velocity).push(push).Send();
- if (full_power) {
- LOG(DEBUG, "Zeroing position.velocity\n");
- shooter.position.MakeWithBuilder().velocity(0).Send();
- }
} else {
shooting_ = false;
}