Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,8 @@ public Hardware(HardwareMap hwmap) {
// }
}
if (Setup.Connected.CLAWSUBSYSTEM) {
if (Setup.Connected.CLAWSERVO) {
this.clawServo = new Servo(Setup.HardwareNames.CLAWSERVO);
}
if (Setup.Connected.ARM) {
this.arm = new EncodedMotor<>(Setup.HardwareNames.ARM);
}
this.clawServo = new Servo(Setup.HardwareNames.CLAWSERVO);
this.arm = new EncodedMotor<>(Setup.HardwareNames.ARM);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.technototes.library.logger.Loggable;
import com.technototes.library.util.Alliance;
import org.firstinspires.ftc.ptechnodactyl.Hardware;
import org.firstinspires.ftc.ptechnodactyl.helpers.StartingPosition;
import org.firstinspires.ftc.ptechnodactyl.subsystems.ClawSubsystem;
import org.firstinspires.ftc.ptechnodactyl.subsystems.DrivebaseSubsystem;
Expand All @@ -25,5 +26,8 @@ public Robot(Hardware hw) {
hw.imu
);
}
if (Setup.Connected.CLAWSUBSYSTEM) {
this.clawSubsystem = new ClawSubsystem(hw);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class Connected {
public static boolean COLOR_SENSOR = false;
public static boolean FLYWHEEL = false;
public static boolean WEBCAM = false;
public static boolean EXTERNAL_IMU = true;
public static boolean EXTERNAL_IMU = false;
}

@Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.technototes.library.command.CommandScheduler;
import com.technototes.library.logger.Loggable;
import com.technototes.library.structure.CommandOpMode;
import com.technototes.library.util.Alliance;
import org.firstinspires.ftc.ptechnodactyl.Hardware;
Expand All @@ -16,7 +17,7 @@

@TeleOp(name = "Driving w/Turbo!")
@SuppressWarnings("unused")
public class JustDrivingTeleOp extends CommandOpMode {
public class JustDrivingTeleOp extends CommandOpMode implements Loggable {

public Robot robot;
public DriverController controlsDriver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
import com.acmerobotics.roadrunner.control.PIDCoefficients;
import com.acmerobotics.roadrunner.control.PIDFController;
import com.qualcomm.robotcore.hardware.DcMotorEx;
import com.qualcomm.robotcore.util.Range;
import com.technototes.library.hardware.motor.EncodedMotor;
import com.technototes.library.hardware.servo.Servo;
import com.technototes.library.logger.Log;
import com.technototes.library.logger.Loggable;
import com.technototes.library.subsystem.Subsystem;
import org.firstinspires.ftc.ptechnodactyl.Hardware;

@Config
public class ClawSubsystem implements Subsystem, Loggable {
public class ClawSubsystem implements Subsystem {

private Servo clawServo;
private EncodedMotor<DcMotorEx> arm;
Expand Down Expand Up @@ -105,6 +103,12 @@ The downward torque due to gravity is cos(T) * Gravity (9.8m/s^2)
setArmPos(INITIAL_POSITION);
}

public ClawSubsystem() {
isHardware = false;
clawServo = null;
arm = null;
}

public void increment(double value) {
int newArmPos = (int) (armTargetPos + value * INCREMENT_DECREMENT);
// if (newArmPos > ARM_MAX) {
Expand Down