lanceur encodeur
This commit is contained in:
parent
18e16d5621
commit
787251658c
@ -11,6 +11,8 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
|
||||
import com.revrobotics.CANSparkMax;
|
||||
import com.revrobotics.CANSparkLowLevel.MotorType;
|
||||
|
||||
import edu.wpi.first.wpilibj.Encoder;
|
||||
|
||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||
|
||||
public class Lanceur extends SubsystemBase {
|
||||
@ -20,6 +22,10 @@ public class Lanceur extends SubsystemBase {
|
||||
final WPI_TalonSRX lanceur1 = new WPI_TalonSRX(0);
|
||||
final WPI_TalonSRX lanceur2 = new WPI_TalonSRX(1);
|
||||
final CANSparkMax tourel = new CANSparkMax(2, MotorType.kBrushed);
|
||||
Encoder encoder = new Encoder(0, 1);
|
||||
public void encodeur(double distance){
|
||||
encoder.getDistance();
|
||||
}
|
||||
public void lance(double vitesse){
|
||||
lanceur1.set(vitesse);
|
||||
lanceur2.set(-vitesse);
|
||||
|
Loading…
x
Reference in New Issue
Block a user