From 9cf48ac5e362bd6da5fd383e0a3f3dbf7cb7a65c Mon Sep 17 00:00:00 2001 From: CoryNessCTR Date: Fri, 1 Dec 2023 14:18:51 -0500 Subject: [PATCH] Fix velocity/position requests --- java/PositionClosedLoop/src/main/java/frc/robot/Robot.java | 4 ++-- java/VelocityClosedLoop/src/main/java/frc/robot/Robot.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/PositionClosedLoop/src/main/java/frc/robot/Robot.java b/java/PositionClosedLoop/src/main/java/frc/robot/Robot.java index 847e6eb3..b56aa19d 100644 --- a/java/PositionClosedLoop/src/main/java/frc/robot/Robot.java +++ b/java/PositionClosedLoop/src/main/java/frc/robot/Robot.java @@ -25,9 +25,9 @@ public class Robot extends TimedRobot { /* Be able to switch which control request to use based on a button press */ /* Start at position 0, enable FOC, no feed forward, use slot 0 */ - private final PositionVoltage m_voltagePosition = new PositionVoltage(0, 0, true, 0, 0, false); + private final PositionVoltage m_voltagePosition = new PositionVoltage(0, 0, true, 0, 0, false, false, false); /* Start at position 0, no feed forward, use slot 1 */ - private final PositionTorqueCurrentFOC m_torquePosition = new PositionTorqueCurrentFOC(0, 0, 0, 1, false); + private final PositionTorqueCurrentFOC m_torquePosition = new PositionTorqueCurrentFOC(0, 0, 0, 1, false, false, false); /* Keep a brake request so we can disable the motor */ private final NeutralOut m_brake = new NeutralOut(); diff --git a/java/VelocityClosedLoop/src/main/java/frc/robot/Robot.java b/java/VelocityClosedLoop/src/main/java/frc/robot/Robot.java index a025f9ce..450b5375 100644 --- a/java/VelocityClosedLoop/src/main/java/frc/robot/Robot.java +++ b/java/VelocityClosedLoop/src/main/java/frc/robot/Robot.java @@ -27,9 +27,9 @@ public class Robot extends TimedRobot { /* Be able to switch which control request to use based on a button press */ /* Start at velocity 0, enable FOC, no feed forward, use slot 0 */ - private final VelocityVoltage m_voltageVelocity = new VelocityVoltage(0, 0, true, 0, 0, false); + private final VelocityVoltage m_voltageVelocity = new VelocityVoltage(0, 0, true, 0, 0, false, false, false); /* Start at velocity 0, no feed forward, use slot 1 */ - private final VelocityTorqueCurrentFOC m_torqueVelocity = new VelocityTorqueCurrentFOC(0, 0, 0, 1, false); + private final VelocityTorqueCurrentFOC m_torqueVelocity = new VelocityTorqueCurrentFOC(0, 0, 0, 1, false, false, false); /* Keep a neutral out so we can disable the motor */ private final NeutralOut m_brake = new NeutralOut();