// 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.subsystems; import edu.wpi.first.wpilibj2.command.SubsystemBase; import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import edu.wpi.first.wpilibj.DigitalInput; import frc.robot.Constants; public class Gratte extends SubsystemBase { private WPI_TalonSRX baisserGratte = new WPI_TalonSRX(Constants.leverGratte); private WPI_TalonSRX leverGratte = new WPI_TalonSRX(Constants.baisserGratte); private DigitalInput limithd = new DigitalInput(Constants.limithd); private DigitalInput limithg = new DigitalInput(Constants.limithg); private DigitalInput limitbd = new DigitalInput(Constants.limitbd); private DigitalInput limitbg = new DigitalInput(Constants.limitbg); public boolean hautd(){ return limithd.get(); } public boolean hautg(){ return limithg.get(); } public boolean basd(){ return limitbd.get(); } public boolean basg(){ return limitbg.get(); } /** Creates a new Gratte. */ public Gratte() {} public void BaisserLever(double vitesse){ baisserGratte.set(vitesse); leverGratte.set(vitesse); } @Override public void periodic() { // This method will be called once per scheduler run } }