2024-01-17 19:56:57 -05:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
|
2024-01-18 18:44:55 -05:00
|
|
|
package frc.robot.subsystem;
|
2024-01-17 19:56:57 -05:00
|
|
|
|
2024-01-18 19:27:11 -05:00
|
|
|
import com.ctre.phoenix.motorcontrol.can.TalonSRX;
|
|
|
|
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
|
|
|
|
import com.revrobotics.CANSparkMax;
|
|
|
|
|
2024-01-17 19:56:57 -05:00
|
|
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
2024-01-18 19:33:53 -05:00
|
|
|
import frc.robot.Constants;
|
2024-01-17 19:56:57 -05:00
|
|
|
|
|
|
|
public class Balayeuse extends SubsystemBase {
|
2024-01-18 19:27:11 -05:00
|
|
|
/** Creates a new Balayeuse. */
|
|
|
|
|
2024-01-17 19:56:57 -05:00
|
|
|
public Balayeuse() {}
|
2024-01-18 19:34:03 -05:00
|
|
|
final WPI_TalonSRX roue = new WPI_TalonSRX(Constants.roue);
|
|
|
|
final TalonSRX etoile = new TalonSRX(Constants.etoile);
|
2024-01-17 19:56:57 -05:00
|
|
|
|
2024-01-18 19:27:11 -05:00
|
|
|
public void Accumulation(double vitesse){
|
2024-01-18 19:34:03 -05:00
|
|
|
roue.set(vitesse);
|
2024-01-18 19:27:11 -05:00
|
|
|
}
|
|
|
|
public void balayeuse(){
|
2024-01-18 19:34:03 -05:00
|
|
|
etoile.follow(roue);
|
|
|
|
etoile.setInverted(true);
|
2024-01-18 19:27:11 -05:00
|
|
|
}
|
2024-01-17 19:56:57 -05:00
|
|
|
@Override
|
|
|
|
public void periodic() {
|
|
|
|
// This method will be called once per scheduler run
|
|
|
|
}
|
|
|
|
}
|