Switch top and bottom buttons on the pistol grip
Signed-off-by: Maxwell Henderson <mxwhenderson@gmail.com>
Change-Id: Ie1ac2b96c01217c2f09284b5c32ac880221369f6
diff --git a/frc971/control_loops/drivetrain/drivetrain_config.h b/frc971/control_loops/drivetrain/drivetrain_config.h
index 51f92b1..9c17fc8 100644
--- a/frc971/control_loops/drivetrain/drivetrain_config.h
+++ b/frc971/control_loops/drivetrain/drivetrain_config.h
@@ -13,6 +13,28 @@
namespace control_loops {
namespace drivetrain {
+// What to use the top two buttons for on the pistol grip.
+enum class PistolTopButtonUse {
+ // Normal shifting.
+ kShift,
+ // Line following (currently just uses top button).
+ kLineFollow,
+ // Don't use the top button
+ kNone,
+};
+
+enum class PistolSecondButtonUse {
+ kTurn1,
+ kShiftLow,
+ kNone,
+};
+
+enum class PistolBottomButtonUse {
+ kControlLoopDriving,
+ kSlowDown,
+ kNone,
+};
+
enum class ShifterType : int32_t {
HALL_EFFECT_SHIFTER = 0, // Detect when inbetween gears.
SIMPLE_SHIFTER = 1, // Switch gears without speedmatch logic.
@@ -145,6 +167,10 @@
LineFollowConfig line_follow_config{};
+ PistolTopButtonUse top_button_use = PistolTopButtonUse::kShift;
+ PistolSecondButtonUse second_button_use = PistolSecondButtonUse::kShiftLow;
+ PistolBottomButtonUse bottom_button_use = PistolBottomButtonUse::kSlowDown;
+
// Converts the robot state to a linear distance position, velocity.
static Eigen::Matrix<Scalar, 2, 1> LeftRightToLinear(
const Eigen::Matrix<Scalar, 7, 1> &left_right) {