File tree Expand file tree Collapse file tree 5 files changed +16
-11
lines changed
Ptechnodactyl/src/main/java/org/firstinspires/ftc/ptechnodactyl Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,8 @@ public Hardware(HardwareMap hwmap) {
7373 // }
7474 }
7575 if (Setup .Connected .CLAWSUBSYSTEM ) {
76- if (Setup .Connected .CLAWSERVO ) {
77- this .clawServo = new Servo (Setup .HardwareNames .CLAWSERVO );
78- }
79- if (Setup .Connected .ARM ) {
80- this .arm = new EncodedMotor <>(Setup .HardwareNames .ARM );
81- }
76+ this .clawServo = new Servo (Setup .HardwareNames .CLAWSERVO );
77+ this .arm = new EncodedMotor <>(Setup .HardwareNames .ARM );
8278 }
8379 }
8480
Original file line number Diff line number Diff line change 22
33import com .technototes .library .logger .Loggable ;
44import com .technototes .library .util .Alliance ;
5+ import org .firstinspires .ftc .ptechnodactyl .Hardware ;
56import org .firstinspires .ftc .ptechnodactyl .helpers .StartingPosition ;
67import org .firstinspires .ftc .ptechnodactyl .subsystems .ClawSubsystem ;
78import org .firstinspires .ftc .ptechnodactyl .subsystems .DrivebaseSubsystem ;
@@ -25,5 +26,8 @@ public Robot(Hardware hw) {
2526 hw .imu
2627 );
2728 }
29+ if (Setup .Connected .CLAWSUBSYSTEM ) {
30+ this .clawSubsystem = new ClawSubsystem (hw );
31+ }
2832 }
2933}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public static class Connected {
1818 public static boolean COLOR_SENSOR = false ;
1919 public static boolean FLYWHEEL = false ;
2020 public static boolean WEBCAM = false ;
21- public static boolean EXTERNAL_IMU = true ;
21+ public static boolean EXTERNAL_IMU = false ;
2222 }
2323
2424 @ Config
Original file line number Diff line number Diff line change 44import com .acmerobotics .dashboard .telemetry .MultipleTelemetry ;
55import com .qualcomm .robotcore .eventloop .opmode .TeleOp ;
66import com .technototes .library .command .CommandScheduler ;
7+ import com .technototes .library .logger .Loggable ;
78import com .technototes .library .structure .CommandOpMode ;
89import com .technototes .library .util .Alliance ;
910import org .firstinspires .ftc .ptechnodactyl .Hardware ;
1617
1718@ TeleOp (name = "Driving w/Turbo!" )
1819@ SuppressWarnings ("unused" )
19- public class JustDrivingTeleOp extends CommandOpMode {
20+ public class JustDrivingTeleOp extends CommandOpMode implements Loggable {
2021
2122 public Robot robot ;
2223 public DriverController controlsDriver ;
Original file line number Diff line number Diff line change 44import com .acmerobotics .roadrunner .control .PIDCoefficients ;
55import com .acmerobotics .roadrunner .control .PIDFController ;
66import com .qualcomm .robotcore .hardware .DcMotorEx ;
7- import com .qualcomm .robotcore .util .Range ;
87import com .technototes .library .hardware .motor .EncodedMotor ;
98import com .technototes .library .hardware .servo .Servo ;
109import com .technototes .library .logger .Log ;
11- import com .technototes .library .logger .Loggable ;
1210import com .technototes .library .subsystem .Subsystem ;
1311import org .firstinspires .ftc .ptechnodactyl .Hardware ;
1412
1513@ Config
16- public class ClawSubsystem implements Subsystem , Loggable {
14+ public class ClawSubsystem implements Subsystem {
1715
1816 private Servo clawServo ;
1917 private EncodedMotor <DcMotorEx > arm ;
@@ -105,6 +103,12 @@ The downward torque due to gravity is cos(T) * Gravity (9.8m/s^2)
105103 setArmPos (INITIAL_POSITION );
106104 }
107105
106+ public ClawSubsystem () {
107+ isHardware = false ;
108+ clawServo = null ;
109+ arm = null ;
110+ }
111+
108112 public void increment (double value ) {
109113 int newArmPos = (int ) (armTargetPos + value * INCREMENT_DECREMENT );
110114 // if (newArmPos > ARM_MAX) {
You can’t perform that action at this time.
0 commit comments