implement button to regrip a poorly held can
Change-Id: I435ba7943790feb85f548ca79c2de26ea4abe6eb
diff --git a/frc971/joystick_reader.cc b/frc971/joystick_reader.cc
index 6311100..4ff9684 100644
--- a/frc971/joystick_reader.cc
+++ b/frc971/joystick_reader.cc
@@ -60,8 +60,8 @@
// globally changed easier.
// preset motion limits
-constexpr actors::ProfileParams kArmMove{1.00, 1.0};
-constexpr actors::ProfileParams kElevatorMove{1.00, 3.2};
+constexpr actors::ProfileParams kArmMove{0.5, 1.0};
+constexpr actors::ProfileParams kElevatorMove{0.3, 1.0};
const JoystickAxis kSteeringWheel(1, 1), kDriveThrottle(2, 2);
const ButtonLocation kShiftHigh(2, 1), kShiftLow(2, 3);
@@ -98,7 +98,7 @@
const ButtonLocation kCoopBottom(3, 6);
const ButtonLocation kCoopBottomRetract(3, 9);
-const ButtonLocation kRetractFromScore(4, 12);
+const ButtonLocation kCanReset(4, 12);
const POVLocation kFridgeToggle(4, 270);
const ButtonLocation kSpit(4, 3);
@@ -241,6 +241,12 @@
fridge_closed_ = true;
}
+ if (data.PosEdge(kCanReset)) {
+ action_queue_.CancelAllActions();
+ elevator_goal_ = 0.3;
+ arm_goal_ = 0.0;
+ }
+
// Tote chute pull in when button is pressed, pack when done.
if (data.IsPressed(kToteChute)) {
claw_goal_ = 0.8;