added button to overhang level 2 with stilts
Change-Id: I2b8fc7d2c05d11599b9eaa1e3ce1a4f5afe2ccbf
diff --git a/y2019/joystick_reader.cc b/y2019/joystick_reader.cc
index 26a8ce1..203f315 100644
--- a/y2019/joystick_reader.cc
+++ b/y2019/joystick_reader.cc
@@ -33,6 +33,7 @@
const ButtonLocation kSuctionBall(3, 13);
const ButtonLocation kSuctionHatch(3, 12);
const ButtonLocation kDeployStilt(3, 8);
+const ButtonLocation kHalfStilt(3, 6);
const ButtonLocation kFallOver(3, 9);
struct ElevatorWristPosition {
@@ -158,6 +159,10 @@
} else {
new_superstructure_goal->stilts.profile_params.max_acceleration = 2.0;
}
+ } else if (data.IsPressed(kHalfStilt)) {
+ new_superstructure_goal->stilts.unsafe_goal = 0.345;
+ new_superstructure_goal->stilts.profile_params.max_velocity = 0.65;
+ new_superstructure_goal->stilts.profile_params.max_acceleration = 0.75;
} else {
new_superstructure_goal->stilts.unsafe_goal = 0.01;
new_superstructure_goal->stilts.profile_params.max_velocity = 0.25;