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) {
73
73
// }
74
74
}
75
75
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 );
82
78
}
83
79
}
84
80
Original file line number Diff line number Diff line change 2
2
3
3
import com .technototes .library .logger .Loggable ;
4
4
import com .technototes .library .util .Alliance ;
5
+ import org .firstinspires .ftc .ptechnodactyl .Hardware ;
5
6
import org .firstinspires .ftc .ptechnodactyl .helpers .StartingPosition ;
6
7
import org .firstinspires .ftc .ptechnodactyl .subsystems .ClawSubsystem ;
7
8
import org .firstinspires .ftc .ptechnodactyl .subsystems .DrivebaseSubsystem ;
@@ -25,5 +26,8 @@ public Robot(Hardware hw) {
25
26
hw .imu
26
27
);
27
28
}
29
+ if (Setup .Connected .CLAWSUBSYSTEM ) {
30
+ this .clawSubsystem = new ClawSubsystem (hw );
31
+ }
28
32
}
29
33
}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public static class Connected {
18
18
public static boolean COLOR_SENSOR = false ;
19
19
public static boolean FLYWHEEL = false ;
20
20
public static boolean WEBCAM = false ;
21
- public static boolean EXTERNAL_IMU = true ;
21
+ public static boolean EXTERNAL_IMU = false ;
22
22
}
23
23
24
24
@ Config
Original file line number Diff line number Diff line change 4
4
import com .acmerobotics .dashboard .telemetry .MultipleTelemetry ;
5
5
import com .qualcomm .robotcore .eventloop .opmode .TeleOp ;
6
6
import com .technototes .library .command .CommandScheduler ;
7
+ import com .technototes .library .logger .Loggable ;
7
8
import com .technototes .library .structure .CommandOpMode ;
8
9
import com .technototes .library .util .Alliance ;
9
10
import org .firstinspires .ftc .ptechnodactyl .Hardware ;
16
17
17
18
@ TeleOp (name = "Driving w/Turbo!" )
18
19
@ SuppressWarnings ("unused" )
19
- public class JustDrivingTeleOp extends CommandOpMode {
20
+ public class JustDrivingTeleOp extends CommandOpMode implements Loggable {
20
21
21
22
public Robot robot ;
22
23
public DriverController controlsDriver ;
Original file line number Diff line number Diff line change 4
4
import com .acmerobotics .roadrunner .control .PIDCoefficients ;
5
5
import com .acmerobotics .roadrunner .control .PIDFController ;
6
6
import com .qualcomm .robotcore .hardware .DcMotorEx ;
7
- import com .qualcomm .robotcore .util .Range ;
8
7
import com .technototes .library .hardware .motor .EncodedMotor ;
9
8
import com .technototes .library .hardware .servo .Servo ;
10
9
import com .technototes .library .logger .Log ;
11
- import com .technototes .library .logger .Loggable ;
12
10
import com .technototes .library .subsystem .Subsystem ;
13
11
import org .firstinspires .ftc .ptechnodactyl .Hardware ;
14
12
15
13
@ Config
16
- public class ClawSubsystem implements Subsystem , Loggable {
14
+ public class ClawSubsystem implements Subsystem {
17
15
18
16
private Servo clawServo ;
19
17
private EncodedMotor <DcMotorEx > arm ;
@@ -105,6 +103,12 @@ The downward torque due to gravity is cos(T) * Gravity (9.8m/s^2)
105
103
setArmPos (INITIAL_POSITION );
106
104
}
107
105
106
+ public ClawSubsystem () {
107
+ isHardware = false ;
108
+ clawServo = null ;
109
+ arm = null ;
110
+ }
111
+
108
112
public void increment (double value ) {
109
113
int newArmPos = (int ) (armTargetPos + value * INCREMENT_DECREMENT );
110
114
// if (newArmPos > ARM_MAX) {
You can’t perform that action at this time.
0 commit comments