This commit is contained in:
Antoine PerreaultE
2024-01-23 18:41:52 -05:00
8 changed files with 166 additions and 11 deletions

View File

@ -17,10 +17,8 @@ public class Accumulateur extends SubsystemBase {
final WPI_TalonSRX Moteuracc2 = new WPI_TalonSRX(Constants.Moteuracc2);
final WPI_TalonSRX Moteuracc = new WPI_TalonSRX(Constants.Moteuracc);
final DigitalInput limitacc = new DigitalInput(0);
public void Deaccumuler(double vitesse){
Moteuracc2.set(vitesse);}
public void Deaccumuler(double vitesse){Moteuracc2.set(vitesse);}
public void moteuraccfollow(){Moteuracc.follow(Moteuracc2); Moteuracc.setInverted(true);}
@Override
public void periodic() {

View File

@ -18,11 +18,9 @@ public class Grimpeur extends SubsystemBase {
public Grimpeur() {}
final CANSparkMax grimpeurd = new CANSparkMax(Constants.grimpeurd,MotorType.kBrushless);
final CANSparkMax grimpeurg = new CANSparkMax(Constants.grimpeurg,MotorType.kBrushless);
// limit switch
final DigitalInput limitdroite = new DigitalInput(Constants.limithaut);
final DigitalInput limitgauche = new DigitalInput(Constants.limitbas);
//fonction
public void droit(double vitesse){
grimpeurd.set(vitesse);
@ -42,14 +40,10 @@ public void resetencodeurd(){
public void resetencodeurg(){
grimpeurg.getEncoder().setPosition(0);
}
public void grimpeur(){
grimpeurg.follow(grimpeurd);
}
public AHRS gyroscope = new AHRS();
public double getpitch(){
return gyroscope.getPitch();
}
@Override
public void periodic() {
// This method will be called once per scheduler run

View File

@ -0,0 +1,18 @@
// 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.
package frc.robot.subsystem;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class Pixy extends SubsystemBase {
/** Creates a new Pixy. */
public Pixy() {}
@Override
public void periodic() {
// This method will be called once per scheduler run
}
}