1
1
package org .firstinspires .ftc .teamcode ;
2
2
3
+ import static org .firstinspires .ftc .teamcode .Robot .RobotConstants .CAROUSEL_CONNECTED ;
4
+ import static org .firstinspires .ftc .teamcode .Robot .RobotConstants .DEPOSIT_CONNECTED ;
5
+ import static org .firstinspires .ftc .teamcode .Robot .RobotConstants .DRIVE_CONNECTED ;
6
+ import static org .firstinspires .ftc .teamcode .Robot .RobotConstants .INTAKE_CONNECTED ;
7
+ import static org .firstinspires .ftc .teamcode .Robot .RobotConstants .LIFT_CONNECTED ;
8
+ import static org .firstinspires .ftc .teamcode .Robot .RobotConstants .VISION_CONNECTED ;
9
+
10
+ import com .qualcomm .robotcore .hardware .DcMotorEx ;
11
+ import com .technototes .library .hardware .motor .EncodedMotor ;
12
+ import com .technototes .library .hardware .motor .Motor ;
13
+ import com .technototes .library .hardware .sensor .IMU ;
14
+ import com .technototes .library .hardware .servo .Servo ;
15
+ import com .technototes .vision .hardware .Webcam ;
16
+
3
17
public class Hardware {
4
- }
18
+ public static EncodedMotor <DcMotorEx > liftMotor ;
19
+
20
+ public static Servo leftDepositServo ;
21
+ public static Servo rightDepositServo ;
22
+
23
+ public static EncodedMotor <DcMotorEx > flDriveMotor ;
24
+ public static EncodedMotor <DcMotorEx > frDriveMotor ;
25
+ public static EncodedMotor <DcMotorEx > rlDriveMotor ;
26
+ public static EncodedMotor <DcMotorEx > rrDriveMotor ;
27
+ public static IMU imu ;
28
+
29
+ public static Motor <DcMotorEx > intakeMotor ;
30
+
31
+ public static Motor <DcMotorEx > carouselMotor ;
32
+
33
+ public static Webcam camera ;
34
+
35
+ static {
36
+ if (LIFT_CONNECTED ) {
37
+ liftMotor = new EncodedMotor <>("lift" );
38
+ }
39
+ if (DEPOSIT_CONNECTED ) {
40
+ leftDepositServo = new Servo ("leftDeposit" ).invert ();
41
+
42
+ leftDepositServo = new Servo ("rightDeposit" );
43
+ }
44
+ if (DRIVE_CONNECTED ) {
45
+ flDriveMotor = new EncodedMotor <>("flMotor" );
46
+ frDriveMotor = new EncodedMotor <>("frMotor" );
47
+ rlDriveMotor = new EncodedMotor <>("rlMotor" );
48
+ rrDriveMotor = new EncodedMotor <>("rrMotor" );
49
+ }
50
+ if (CAROUSEL_CONNECTED ) {
51
+ carouselMotor = new EncodedMotor <>("carouselMotor" );
52
+ }
53
+ if (VISION_CONNECTED ) {
54
+ camera = new Webcam ("webcam1" );
55
+ }
56
+ if (INTAKE_CONNECTED ) {
57
+ intakeMotor = new Motor <>("intake" );
58
+ }
59
+
60
+ }
61
+ }
0 commit comments