summaryrefslogtreecommitdiff
path: root/src/main/java/frc/robot/Constants.java
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2024-02-11 22:48:38 +0200
committerkartofen <mladenovnasko0@gmail.com>2024-02-11 22:48:38 +0200
commit7b58370a6d4174f2e007264c58bebe7868e7fdc3 (patch)
treeb06eafa18052c9dcd8b67579755f2f55dbd216ba /src/main/java/frc/robot/Constants.java
parentde82bb11825e8bc5087f10605b3fe2fd926f1909 (diff)
imu added
Diffstat (limited to 'src/main/java/frc/robot/Constants.java')
-rw-r--r--src/main/java/frc/robot/Constants.java35
1 files changed, 15 insertions, 20 deletions
diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java
index f517f08..41c9689 100644
--- a/src/main/java/frc/robot/Constants.java
+++ b/src/main/java/frc/robot/Constants.java
@@ -1,37 +1,32 @@
package frc.robot;
-import edu.wpi.first.math.controller.SimpleMotorFeedforward;
-import edu.wpi.first.wpilibj.AnalogGyro;
+import com.revrobotics.CANSparkMax;
+import com.revrobotics.CANSparkLowLevel.MotorType;
+
import edu.wpi.first.wpilibj.Encoder;
-import edu.wpi.first.wpilibj.drive.DifferentialDrive;
-import edu.wpi.first.wpilibj.motorcontrol.PWMSparkMax;
+import edu.wpi.first.wpilibj.I2C;
+import edu.wpi.first.wpilibj.I2C.Port;
+import frc.robot.util.IMUGyro;
public class Constants
{
- // other constants
-
public static final int PortDriverController = 0;
- public static final double DriveMaxSpeed = 0;
- public static final double DriveMaxAngular = 0;
+ public static final double DriveMaxSpeed = 20; // m/s
+ public static final double DriveMaxAngular = Math.PI; // rad/s?
public static final double WheelRadius = 0; // in meters
public static final double TrackWidth = 0; // in meters
public static final double EncoderResolution = 4096;
-
- // public static final DifferentialDrive drive = new DifferentialDrive(...);
- public static final AnalogGyro gyro = new AnalogGyro(...);
-
- public static final PWMSparkMax motorL_leader = new PWMSparkMax(...);
- public static final PWMSparkMax motorL_follower = new PWMSparkMax(...);
- public static final PWMSparkMax motorR_leader = new PWMSparkMax(...);
- public static final PWMSparkMax motorR_follower = new PWMSparkMax(...);
-
+ public static final IMUGyro gyro = new IMUGyro(new I2C(Port.kOnboard, 0x68));
- public static final Encoder encoderL = new Encoder(...);
- public static final Encoder encoderR = new Encoder(...);
+ public static final CANSparkMax motorL_leader = new CANSparkMax(40, MotorType.kBrushed);
+ public static final CANSparkMax motorL_follower = new CANSparkMax(41, MotorType.kBrushed);
+ public static final CANSparkMax motorR_leader = new CANSparkMax(42, MotorType.kBrushed);
+ public static final CANSparkMax motorR_follower = new CANSparkMax(43, MotorType.kBrushed);
- public static final SimpleMotorFeedforward feedforward = new SimpleMotorFeedforward(...);
+ public static final Encoder encoderL = new Encoder(0, 1);
+ public static final Encoder encoderR = new Encoder(2, 3);
}