Skip to content

Commit 81279b3

Browse files
committed
arm subs got rid of servo group and for some reason it spread to 16750 and 20403 files weird right
1 parent ebc44d6 commit 81279b3

File tree

10 files changed

+72
-68
lines changed

10 files changed

+72
-68
lines changed

Ptechnodactyl/src/main/java/org/firstinspires/ftc/ptechnodactyl/Hardware.java

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
import static org.firstinspires.ftc.ptechnodactyl.Hardware.HardwareConstants.*;
44
import static org.firstinspires.ftc.ptechnodactyl.Robot.SubsystemConstants.*;
55

6+
import com.qualcomm.hardware.rev.RevHubOrientationOnRobot;
67
import com.qualcomm.robotcore.hardware.DcMotorEx;
78
import com.technototes.library.hardware.motor.EncodedMotor;
89
import com.technototes.library.hardware.motor.Motor;
910
import com.technototes.library.hardware.sensor.ColorDistanceSensor;
1011
import com.technototes.library.hardware.sensor.IMU;
1112
import com.technototes.library.hardware.sensor.IMU.AxesSigns;
1213
import com.technototes.library.hardware.sensor.Rev2MDistanceSensor;
13-
import com.technototes.library.hardware.servo;
14-
import com.technototes.library.hardware.servo.ServoGroup;
14+
import com.technototes.library.hardware.servo.Servo;
1515
import com.technototes.library.logger.Loggable;
1616
import com.technototes.vision.hardware.Webcam;
1717
import org.firstinspires.ftc.ptechnodactyl.subsystems.ArmSubsystem;
@@ -57,11 +57,11 @@ public static class HardwareConstants {
5757

5858
public EncodedMotor<DcMotorEx> liftMotor;
5959

60-
public ServoGroup dumpServo;
61-
public ServoGroup armServo;
60+
public Servo dumpServo;
61+
public Servo armServo;
6262

63-
public ServoGroup turretServo;
64-
public ServoGroup slideServo;
63+
public Servo turretServo;
64+
public Servo slideServo;
6565

6666
public EncodedMotor<DcMotorEx> flDriveMotor;
6767
public EncodedMotor<DcMotorEx> frDriveMotor;
@@ -77,33 +77,33 @@ public static class HardwareConstants {
7777

7878
public Motor<DcMotorEx> carouselMotor;
7979

80-
public ServoGroup capServo;
80+
public Servo capServo;
8181

8282
public Webcam camera;
8383

84-
public ServoGroup brake;
84+
public Servo brake;
8585

86-
public ServoGroup capLeftArmServo;
87-
public ServoGroup capRightArmServo;
88-
public ServoGroup capArmServos;
86+
public Servo capLeftArmServo;
87+
public Servo capRightArmServo;
88+
public Servo capArmServos;
8989

90-
public ServoGroup capClawServo;
91-
public ServoGroup capTurretServo;
90+
public Servo capClawServo;
91+
public Servo capTurretServo;
9292

9393
public Hardware() {
9494
if (BRAKE_ENABLED) {
95-
brake = new ServoGroup(BRAKE).startAt(BrakeSubsystem.BrakeConstants.UP);
95+
brake = new Servo(BRAKE).startAt(BrakeSubsystem.BrakeConstants.UP);
9696
}
9797
if (LIFT_ENABLED) {
9898
liftMotor = new EncodedMotor<DcMotorEx>(LIFT).brake().tare();
9999
}
100100
if (ARM_ENABLED) {
101-
dumpServo = new ServoGroup(DUMP).invert().startAt(ArmSubsystem.ArmConstants.CARRY);
102-
armServo = new ServoGroup(ARM).startAt(ArmSubsystem.ArmConstants.UP);
101+
dumpServo = new Servo(DUMP).invert().startAt(ArmSubsystem.ArmConstants.CARRY);
102+
armServo = new Servo(ARM).startAt(ArmSubsystem.ArmConstants.UP);
103103
}
104104
if (EXTENSION_ENABLED) {
105-
slideServo = new ServoGroup(SLIDE).startAt(ExtensionSubsystem.ExtensionConstants.IN);
106-
turretServo = new ServoGroup(TURRET)
105+
slideServo = new Servo(SLIDE).startAt(ExtensionSubsystem.ExtensionConstants.IN);
106+
turretServo = new Servo(TURRET)
107107
.startAt(ExtensionSubsystem.ExtensionConstants.CENTER)
108108
.expandedRange();
109109
}
@@ -112,7 +112,11 @@ public Hardware() {
112112
frDriveMotor = new EncodedMotor<>(FR_MOTOR);
113113
rlDriveMotor = new EncodedMotor<>(RL_MOTOR);
114114
rrDriveMotor = new EncodedMotor<>(RR_MOTOR);
115-
imu = new IMU(HardwareConstants.IMU).remapAxes(AxesOrder.YXZ, AxesSigns.NPP);
115+
imu = new IMU(
116+
IMU,
117+
RevHubOrientationOnRobot.LogoFacingDirection.UP,
118+
RevHubOrientationOnRobot.UsbFacingDirection.BACKWARD
119+
).remapAxesAndSigns(AxesOrder.YXZ, AxesSigns.NPP);
116120
leftRangeSensor = new Rev2MDistanceSensor(L_RANGE).onUnit(DistanceUnit.INCH);
117121
rightRangeSensor = new Rev2MDistanceSensor(R_RANGE).onUnit(DistanceUnit.INCH);
118122
frontRangeSensor = new Rev2MDistanceSensor(F_RANGE).onUnit(DistanceUnit.INCH);
@@ -128,16 +132,16 @@ public Hardware() {
128132
intakeSensor = new ColorDistanceSensor(INTAKE_COLOR).onUnit(DistanceUnit.INCH);
129133
}
130134
if (CAP_ENABLED) {
131-
capLeftArmServo = new ServoGroup("caparml").onRange(0.25, 0.65).invert();
132-
capRightArmServo = new ServoGroup("caparmr").onRange(0.35, 0.75);
133-
capArmServos = new ServoGroup(capLeftArmServo, capRightArmServo).startAt(
134-
CapSubsystem.CapConstants.ARM_INIT
135-
);
136-
137-
capClawServo = new ServoGroup("capclaw").startAt(CapSubsystem.CapConstants.CLAW_CLOSE);
138-
capTurretServo = new ServoGroup("capturr").startAt(
139-
CapSubsystem.CapConstants.TURRET_INIT
140-
);
135+
capLeftArmServo = new Servo("caparml")
136+
.onRange(0.25, 0.65)
137+
.invert()
138+
.startAt(CapSubsystem.CapConstants.ARM_INIT);
139+
capRightArmServo = new Servo("caparmr")
140+
.onRange(0.35, 0.75)
141+
.startAt(CapSubsystem.CapConstants.ARM_INIT);
142+
143+
capClawServo = new Servo("capclaw").startAt(CapSubsystem.CapConstants.CLAW_CLOSE);
144+
capTurretServo = new Servo("capturr").startAt(CapSubsystem.CapConstants.TURRET_INIT);
141145
}
142146
}
143147
}

Ptechnodactyl/src/main/java/org/firstinspires/ftc/ptechnodactyl/subsystems/BrakeSubsystem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.firstinspires.ftc.ptechnodactyl.subsystems;
22

3-
import com.technototes.library.hardware.servo.ServoGroup;
3+
import com.technototes.library.hardware.servo.Servo;
44
import com.technototes.library.subsystem.Subsystem;
55
import java.util.function.Supplier;
66

@@ -13,9 +13,9 @@ public static class BrakeConstants {
1313
}
1414

1515
private boolean isBraking;
16-
public ServoGroup servo;
16+
public Servo servo;
1717

18-
public BrakeSubsystem(ServoGroup s) {
18+
public BrakeSubsystem(Servo s) {
1919
servo = s;
2020
isBraking = false;
2121
}

Ptechnodactyl/src/main/java/org/firstinspires/ftc/ptechnodactyl/subsystems/CapSubsystem.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import com.acmerobotics.dashboard.config.Config;
66
import com.technototes.library.command.CommandScheduler;
7-
import com.technototes.library.hardware.servo.ServoGroup;
7+
import com.technototes.library.hardware.servo.Servo;
88
import com.technototes.library.hardware.servo.ServoProfiler;
99
import com.technototes.library.subsystem.Subsystem;
1010
import java.util.function.Supplier;
@@ -30,15 +30,15 @@ public static class CapConstants {
3030
);
3131
}
3232

33-
public ServoGroup armServo;
34-
public ServoGroup clawServo;
33+
public Servo armServo;
34+
public Servo clawServo;
3535

36-
public ServoGroup turretServo;
36+
public Servo turretServo;
3737

3838
public ServoProfiler armProfiler;
3939
public ServoProfiler turretProfiler;
4040

41-
public CapSubsystem(ServoGroup arm, ServoGroup claw, ServoGroup turret) {
41+
public CapSubsystem(Servo arm, Servo claw, Servo turret) {
4242
CommandScheduler.register(this);
4343
armServo = arm;
4444
clawServo = claw;

Ptechnodactyl/src/main/java/org/firstinspires/ftc/ptechnodactyl/subsystems/ExtensionSubsystem.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.acmerobotics.dashboard.config.Config;
44
import com.qualcomm.robotcore.util.Range;
5-
import com.technototes.library.hardware.servo.ServoGroup;
5+
import com.technototes.library.hardware.servo.Servo;
66
import com.technototes.library.subsystem.Subsystem;
77
import java.util.function.Supplier;
88

@@ -19,10 +19,10 @@ public static class ExtensionConstants {
1919
0.75;
2020
}
2121

22-
public ServoGroup slideServo;
23-
public ServoGroup turretServo;
22+
public Servo slideServo;
23+
public Servo turretServo;
2424

25-
public ExtensionSubsystem(ServoGroup s, ServoGroup t) {
25+
public ExtensionSubsystem(Servo s, Servo t) {
2626
slideServo = s;
2727
turretServo = t;
2828
}

Ptechnodactyl/src/main/java/org/firstinspires/ftc/ptechnodactyl/subsystems/VisionSubsystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import com.technototes.library.subsystem.Subsystem;
1313
import com.technototes.library.util.Color;
1414
import com.technototes.vision.hardware.Webcam;
15-
import org.firstinspires.ftc.ptechnodactyl.opmodes.TeleOpBase;
15+
import org.firstinspires.ftc.ptechnodactyl.opmodes.tele.TeleOpBase;
1616
import org.firstinspires.ftc.robotcore.external.hardware.camera.WebcamName;
1717
import org.openftc.easyopencv.OpenCvCamera;
1818
import org.openftc.easyopencv.OpenCvCameraFactory;
@@ -31,7 +31,7 @@ public static class VisionConstants {
3131

3232
@LogConfig.DenyList({ TeleOpBase.RedTeleOp.class, TeleOpBase.BlueTeleOp.class })
3333
@LogConfig.Run(duringRun = false, duringInit = true)
34-
@Log.Number(name = "Barcode", color = Color.GREEN)
34+
@Log.Number(name = "Barcode")
3535
public BarcodePipeline barcodePipeline = new BarcodePipeline();
3636

3737
public Webcam camera;

Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/Hardware.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.technototes.library.hardware.sensor.IGyro;
1010
import com.technototes.library.hardware.sensor.IMU;
1111
import com.technototes.library.hardware.sensor.encoder.MotorEncoder;
12-
import com.technototes.library.hardware.servo.ServoGroup;
12+
import com.technototes.library.hardware.servo.Servo;
1313
import com.technototes.library.logger.Loggable;
1414
import java.util.List;
1515
import org.firstinspires.ftc.robotcore.external.navigation.VoltageUnit;
@@ -22,12 +22,12 @@ public class Hardware implements Loggable {
2222
public EncodedMotor<DcMotorEx> fl, fr, rl, rr;
2323
public EncodedMotor suspend;
2424
public EncodedMotor suspend2;
25-
public ServoGroup clawservo;
26-
public ServoGroup wristservo;
27-
public ServoGroup linkservo;
25+
public Servo clawservo;
26+
public Servo wristservo;
27+
public Servo linkservo;
2828
public EncodedMotor<DcMotorEx> slidemotor;
29-
public ServoGroup armservo;
30-
public ServoGroup bucketservo;
29+
public Servo armservo;
30+
public Servo bucketservo;
3131
public MotorEncoder odoF, odoR;
3232

3333
/* Put other hardware here! */
@@ -50,13 +50,13 @@ public Hardware(HardwareMap hwmap) {
5050
rr = new EncodedMotor<DcMotorEx>(Setup.HardwareNames.RR_DRIVE_MOTOR);
5151
}
5252
if (Setup.Connected.HORIZONTALSLIDESUBSYSTEM) {
53-
clawservo = new ServoGroup(Setup.HardwareNames.CLAWSERVO);
54-
wristservo = new ServoGroup(Setup.HardwareNames.WRISTSERVO);
55-
linkservo = new ServoGroup(Setup.HardwareNames.LINKSERVO);
53+
clawservo = new Servo(Setup.HardwareNames.CLAWSERVO);
54+
wristservo = new Servo(Setup.HardwareNames.WRISTSERVO);
55+
linkservo = new Servo(Setup.HardwareNames.LINKSERVO);
5656
}
5757
if (Setup.Connected.VERTICALSLIDESUBSYSTEM) {
58-
armservo = new ServoGroup(Setup.HardwareNames.ARMSERVO);
59-
bucketservo = new ServoGroup(Setup.HardwareNames.BUCKETSERVO);
58+
armservo = new Servo(Setup.HardwareNames.ARMSERVO);
59+
bucketservo = new Servo(Setup.HardwareNames.BUCKETSERVO);
6060
slidemotor = new EncodedMotor<>(Setup.HardwareNames.SLIDEMOTOR);
6161
}
6262
if (Setup.Connected.ODOSUBSYSTEM) {

Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/HorizontalSlidesSubsystem.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.acmerobotics.dashboard.config.Config;
44
import com.qualcomm.robotcore.util.Range;
5-
import com.technototes.library.hardware.servo.ServoGroup;
5+
import com.technototes.library.hardware.servo.Servo;
66
import com.technototes.library.logger.Log;
77
import com.technototes.library.logger.Loggable;
88
import com.technototes.library.subsystem.Subsystem;
@@ -48,9 +48,9 @@ public class HorizontalSlidesSubsystem implements Subsystem, Loggable {
4848
@Log(name = "horizontalSlide")
4949
public double slidePos;
5050

51-
public ServoGroup wristServo;
52-
public ServoGroup clawServo;
53-
public ServoGroup linkServo;
51+
public Servo wristServo;
52+
public Servo clawServo;
53+
public Servo linkServo;
5454
private final boolean isHardware; //not currently used, is there a use for it or should we delete?
5555

5656
public HorizontalSlidesSubsystem(Hardware hw) {

Sixteen750/src/main/java/org/firstinspires/ftc/sixteen750/subsystems/VerticalSlidesSubsystem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import com.qualcomm.robotcore.util.Range;
99
import com.technototes.library.command.WaitCommand;
1010
import com.technototes.library.hardware.motor.EncodedMotor;
11-
import com.technototes.library.hardware.servo.ServoGroup;
11+
import com.technototes.library.hardware.servo.Servo;
1212
import com.technototes.library.logger.Log;
1313
import com.technototes.library.logger.Loggable;
1414
import com.technototes.library.subsystem.Subsystem;
@@ -49,8 +49,8 @@ public class VerticalSlidesSubsystem implements Subsystem, Loggable {
4949
@Log(name = "bucketTarget")
5050
public double bucketTargetPos;
5151

52-
public ServoGroup bucketServo;
53-
public ServoGroup armServo;
52+
public Servo bucketServo;
53+
public Servo armServo;
5454
public EncodedMotor<DcMotorEx> slideMotor;
5555
private boolean isHardware;
5656
public static PIDCoefficients slidePID = new PIDCoefficients(0.0047, 0.0, 0.0);

Twenty403/src/main/java/org/firstinspires/ftc/twenty403/Hardware.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import com.technototes.library.hardware.sensor.AdafruitIMU;
1212
import com.technototes.library.hardware.sensor.IGyro;
1313
import com.technototes.library.hardware.sensor.IMU;
14-
import com.technototes.library.hardware.servo.ServoGroup;
14+
import com.technototes.library.hardware.servo.Servo;
1515
import com.technototes.library.logger.Loggable;
1616
import java.util.List;
1717
import org.firstinspires.ftc.robotcore.external.navigation.VoltageUnit;
@@ -25,7 +25,7 @@ public class Hardware implements Loggable {
2525
public IGyro imu;
2626
public EncodedMotor<DcMotorEx> fl, fr, rl, rr, armL, armR;
2727
public IEncoder odoF, odoR;
28-
public ServoGroup retainer, jaw, wrist;
28+
public Servo retainer, jaw, wrist;
2929
public CRServo intake;
3030
public Motor suspend;
3131
public EncodedMotor<DcMotorEx> rotate1, rotate2, slides;
@@ -53,9 +53,9 @@ public Hardware(HardwareMap hwmap) {
5353
}
5454
if (Setup.Connected.KIDSSHAMPOOSUBSYSTEM) {
5555
intake = new CRServo(Setup.HardwareNames.INTAKE);
56-
retainer = new ServoGroup(Setup.HardwareNames.RETAINER);
57-
wrist = new ServoGroup(Setup.HardwareNames.WRIST);
58-
jaw = new ServoGroup(Setup.HardwareNames.JAW);
56+
retainer = new Servo(Setup.HardwareNames.RETAINER);
57+
wrist = new Servo(Setup.HardwareNames.WRIST);
58+
jaw = new Servo(Setup.HardwareNames.JAW);
5959
}
6060
if (Setup.Connected.HANGSUBSYSTEM) {
6161
suspend = new Motor(Setup.HardwareNames.SUSPEND);

Twenty403/src/main/java/org/firstinspires/ftc/twenty403/subsystems/KidShampooSubsystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.acmerobotics.dashboard.config.Config;
44
import com.technototes.library.hardware.motor.CRServo;
5-
import com.technototes.library.hardware.servo.ServoGroup;
5+
import com.technototes.library.hardware.servo.Servo;
66
import com.technototes.library.logger.Log;
77
import com.technototes.library.logger.Loggable;
88
import com.technototes.library.subsystem.Subsystem;
@@ -11,7 +11,7 @@
1111
@Config
1212
public class KidShampooSubsystem implements Subsystem, Loggable {
1313

14-
private ServoGroup retainer, jaw, wrist;
14+
private Servo retainer, jaw, wrist;
1515
private CRServo intake;
1616

1717
private boolean isHardware;

0 commit comments

Comments
 (0)