Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magazine #18

Merged
merged 11 commits into from
Feb 2, 2024
27 changes: 27 additions & 0 deletions Robot2024/src/main/java/com/team2813/subsystems/Magazine.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.team2813.subsystems;

import com.ctre.phoenix.motorcontrol.TalonFXInvertType;
import com.team2813.lib2813.control.motors.TalonFXWrapper;
import com.team2813.lib2813.control.ControlMode;
import com.team2813.lib2813.control.Motor;

import edu.wpi.first.wpilibj2.command.SubsystemBase;

import static com.team2813.Constants.*;
public class Magazine extends SubsystemBase {
Motor kickerMotor;

public Magazine() {
TalonFXWrapper kickerMotor = new TalonFXWrapper(KICKER, TalonFXInvertType.CounterClockwise);
kickerMotor.addFollower(MAGAZINE, TalonFXInvertType.FollowMaster);
this.kickerMotor = kickerMotor;
}

public void run() {
kickerMotor.set(ControlMode.DUTY_CYCLE, 0.5);
}

public void stop() {
kickerMotor.set(ControlMode.DUTY_CYCLE, 0);
}
}
Loading