35 lines
957 B
Java
Raw Normal View History

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-02-01 18:09:36 -05:00
2024-01-18 19:27:11 -05:00
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
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 20:02:00 -05:00
final WPI_TalonSRX roue = new WPI_TalonSRX(Constants.roue);
2024-01-24 19:34:02 -05:00
final WPI_TalonSRX etoile = new WPI_TalonSRX(Constants.etoile);
2024-01-23 20:20:37 -05:00
2024-01-24 19:34:02 -05:00
public void Accumulation(double vitesse){
roue.set(vitesse);
}
public void balayeuse(){
etoile.follow(roue);
etoile.setInverted(true);
}
public void balaye(double vitesse){
roue.set(vitesse);
etoile.set(vitesse);
}
2024-01-17 19:56:57 -05:00
@Override
public void periodic() {
// This method will be called once per scheduler run
}
}