Merge branch 'main' of https://git.demerso.net/pls5618/2024/robot
This commit is contained in:
@ -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() {
|
||||
|
@ -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
|
||||
|
18
src/main/java/frc/robot/subsystem/Pixy.java
Normal file
18
src/main/java/frc/robot/subsystem/Pixy.java
Normal 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
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user