Frames

DogeCommander 2

0
1
2
3
4
1class Arm implements Subsystem {
2 private DcMotor motor;
3 private double targetPower;
4
5 public Subsystem(DcMotor motor) {
6 this.motor = motor;
7 }
8
9 public void setTargetPower(double power) {
10 this.targetPower = power;
11 }
12
13 @Override
14 void initHardware() {
15 motor.setPower(0);
16 }
17
18 @Override
19 void periodic() {
20 motor.setPower(targetPower);
21 }
22}