Tune end effector to hold cones
Adjust current limits and signs. It has now held a cube!
Change-Id: Ibb0a605b082a01e9dadd15fe43bd038610431da9
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2023/joystick_reader.cc b/y2023/joystick_reader.cc
index 4e65dc4..112c209 100644
--- a/y2023/joystick_reader.cc
+++ b/y2023/joystick_reader.cc
@@ -39,7 +39,9 @@
// TODO(milind): add correct locations
const ButtonLocation kIntake(4, 5);
const ButtonLocation kScore(4, 4);
-const ButtonLocation kSpit(3, 3);
+const ButtonLocation kSpit(4, 13);
+
+const ButtonLocation kSuck(4, 12);
const ButtonLocation kWrist(4, 10);
@@ -73,10 +75,6 @@
// TODO(milind): add more actions and paths
if (data.IsPressed(kIntake)) {
- roller_goal = RollerGoal::INTAKE;
- arm_goal_position_ = arm::ScorePosIndex();
- } else if (data.IsPressed(kSpit)) {
- roller_goal = RollerGoal::SPIT;
arm_goal_position_ = arm::ScorePosIndex();
} else if (data.IsPressed(kScore)) {
arm_goal_position_ = arm::ScorePosIndex();
@@ -84,6 +82,12 @@
arm_goal_position_ = arm::NeutralPosIndex();
}
+ if (data.IsPressed(kSuck)) {
+ roller_goal = RollerGoal::INTAKE;
+ } else if (data.IsPressed(kSpit)) {
+ roller_goal = RollerGoal::SPIT;
+ }
+
double wrist_goal = 0.1;
if (data.IsPressed(kWrist)) {