Skip to content

Commit

Permalink
fix issues with generic MotorSet (this does literally nothing after c…
Browse files Browse the repository at this point in the history
…ompilation)
  • Loading branch information
penguinencounter committed Jan 7, 2024
1 parent c68db03 commit 9aa4228
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public double StrafeOdoDist() {
}

RobotConfiguration robot;
MotorSet driveMotors;
MotorSet<DcMotor> driveMotors;

public double sumOfError = 0;
public static final double kp = 0.2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public class TurnPID {
RobotConfiguration robot;
MotorSet driveMotors;
MotorSet<DcMotor> driveMotors;
DcMotor para1;
DcMotor para2;
DcMotor perp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.hardware.DcMotor;

import org.firstinspires.ftc.teamcode.configurations.RobotConfiguration;
import org.firstinspires.ftc.teamcode.odo.DriveForwardPID;
import org.firstinspires.ftc.teamcode.odo.TurnPID;
import org.firstinspires.ftc.teamcode.utilities.MotorPowers;
import org.firstinspires.ftc.teamcode.utilities.MotorSet;

@Autonomous
Expand All @@ -17,7 +17,7 @@ public class DriveForward extends LinearOpMode {
public void runOpMode() {
telemetry = new MultipleTelemetry(telemetry, FtcDashboard.getInstance().getTelemetry());
RobotConfiguration robot = RobotConfiguration.currentConfiguration().invoke(hardwareMap);
MotorSet driveMotors = robot.driveMotors();
MotorSet<DcMotor> driveMotors = robot.driveMotors();
DriveForwardPID pidDrive = new DriveForwardPID(robot);
TurnPID pidTurn = new TurnPID(robot);
robot.clearEncoders();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void testMotor(String label, DcMotor theMotor) {
void testMotors() {
if (!confirm("Test motors?")) return;
alert("Lift the robot so that the wheels don't\ntouch the ground for the duration of\nthe test.");
MotorSet motors = robot.driveMotors();
MotorSet<DcMotor> motors = robot.driveMotors();
testMotor("Front Left", motors.frontLeft);
testMotor("Front Right", motors.frontRight);
testMotor("Back Left", motors.backLeft);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void runOpMode() {
robot.purpleDropper().setPosition(Var.PixelDropper.back);

// we don't want to have to call driveMotors() every time because it gets tedious
MotorSet driveMotors = robot.driveMotors();
MotorSet<DcMotor> driveMotors = robot.driveMotors();

Servo dumperServo = robot.dumperRotate();
Servo latch = robot.dumperLatch();
Expand Down

0 comments on commit 9aa4228

Please sign in to comment.