// 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.bras;

import edu.wpi.first.wpilibj2.command.SubsystemBase;
import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMaxLowLevel.MotorType; 
import static frc.robot.Constants.*;

public class Pivot extends SubsystemBase {
  // moteur
  private CANSparkMax pivot = new CANSparkMax(actuateur, MotorType.kBrushless);

  // function
  public void monteDescendre(double vitesse) {
    pivot.set (vitesse);
  } 
  // encoder
  public double distance(){
    return (pivot.getEncoder().getPosition());
  }
  public void Reset(){
    pivot.getEncoder().setPosition(0);
  }
  @Override
  public void periodic() {
    // This method will be called once per scheduler run
  }
}