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/constants.h b/y2023/constants.h
index 0451293..6494953 100644
--- a/y2023/constants.h
+++ b/y2023/constants.h
@@ -142,8 +142,8 @@
 
   // Rollers
   static constexpr double kRollerSupplyCurrentLimit() { return 30.0; }
-  static constexpr double kRollerStatorCurrentLimit() { return 60.0; }
-  static constexpr double kRollerVoltage() { return 12.0; }
+  static constexpr double kRollerStatorCurrentLimit() { return 100.0; }
+  static constexpr double kRollerVoltage() { return 6.0; }
 
   // Game object is fed into end effector for at least this time
   static constexpr std::chrono::milliseconds kExtraIntakingTime() {
diff --git a/y2023/control_loops/superstructure/end_effector.cc b/y2023/control_loops/superstructure/end_effector.cc
index 4a3fc8e..04189d2 100644
--- a/y2023/control_loops/superstructure/end_effector.cc
+++ b/y2023/control_loops/superstructure/end_effector.cc
@@ -19,7 +19,7 @@
     double *roller_voltage) {
   *roller_voltage = 0.0;
 
-  constexpr double kMinCurrent = 20.0;
+  constexpr double kMinCurrent = 40.0;
   constexpr double kMaxConePosition = 0.92;
 
   bool beambreak_status = (beambreak || (falcon_current > kMinCurrent &&
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)) {
diff --git a/y2023/wpilib_interface.cc b/y2023/wpilib_interface.cc
index 45d93d9..8e29355 100644
--- a/y2023/wpilib_interface.cc
+++ b/y2023/wpilib_interface.cc
@@ -354,10 +354,10 @@
       superstructure::CANFalconT roller_falcon_data;
       roller_falcon_data.id = roller_falcon_->device_id();
       roller_falcon_data.supply_current = roller_falcon_->supply_current();
-      roller_falcon_data.torque_current = roller_falcon_->torque_current();
+      roller_falcon_data.torque_current = -roller_falcon_->torque_current();
       roller_falcon_data.supply_voltage = roller_falcon_->supply_voltage();
       roller_falcon_data.device_temp = roller_falcon_->device_temp();
-      roller_falcon_data.position = roller_falcon_->position();
+      roller_falcon_data.position = -roller_falcon_->position();
       roller_falcon_data_ =
           std::make_optional<superstructure::CANFalconT>(roller_falcon_data);
     }