From 7c927477d131f4504552f03f9acb183f429e3607 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 8 Feb 2023 18:29:43 -0500 Subject: [PATCH 1/5] xvcbnm, --- src/main/java/frc/robot/commands/Drive.java | 32 --------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/main/java/frc/robot/commands/Drive.java diff --git a/src/main/java/frc/robot/commands/Drive.java b/src/main/java/frc/robot/commands/Drive.java deleted file mode 100644 index 4288b6a..0000000 --- a/src/main/java/frc/robot/commands/Drive.java +++ /dev/null @@ -1,32 +0,0 @@ -// 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.commands; - -import edu.wpi.first.wpilibj2.command.CommandBase; - -public class Drive extends CommandBase { - /** Creates a new Drive. */ - public Drive() { - // Use addRequirements() here to declare subsystem dependencies. - } - - // Called when the command is initially scheduled. - @Override - public void initialize() {} - - // Called every time the scheduler runs while the command is scheduled. - @Override - public void execute() {} - - // Called once the command ends or is interrupted. - @Override - public void end(boolean interrupted) {} - - // Returns true when the command should end. - @Override - public boolean isFinished() { - return false; - } -} From 6d7ee56942736f1410c90b58a0184b0634656738 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 8 Feb 2023 18:53:26 -0500 Subject: [PATCH 2/5] zdxfgvcbnm, --- .../java/frc/robot/subsystems/bras/Pivot.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/bras/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index 2742df8..ec2f376 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -5,11 +5,25 @@ 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 { - /** Creates a new Pivot. */ - public Pivot() {} + // moteur + private CANSparkMax pivot = new CANSparkMax(actuateur, MotorType.kBrushless); + // function + public void monteDescendredroit(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 From bca78522e582144201aa28aaf1184dc372c059be Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 8 Feb 2023 18:54:01 -0500 Subject: [PATCH 3/5] j --- src/main/java/frc/robot/Constants.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index fe07cb5..cc28426 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -5,9 +5,5 @@ public class Constants { public static int avantgauche = 1; public static int arrieredroit = 2; public static int arrieregauche = 3; - - - - - + public static int actuateur = 4; } From e49e8683e6b132448db358f1bcbb77ebba2ef88d Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 8 Feb 2023 18:58:29 -0500 Subject: [PATCH 4/5] vh --- src/main/java/frc/robot/subsystems/Gratte.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/main/java/frc/robot/subsystems/Gratte.java diff --git a/src/main/java/frc/robot/subsystems/Gratte.java b/src/main/java/frc/robot/subsystems/Gratte.java new file mode 100644 index 0000000..5baa6b8 --- /dev/null +++ b/src/main/java/frc/robot/subsystems/Gratte.java @@ -0,0 +1,17 @@ +// 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; + +public class Gratte extends SubsystemBase { + /** Creates a new Gratte. */ + public Gratte() {} + + @Override + public void periodic() { + // This method will be called once per scheduler run + } +} From 91d5a71d52bad9fc56b40c68d78207113e16cd21 Mon Sep 17 00:00:00 2001 From: Antoine PerreaultE Date: Wed, 8 Feb 2023 18:59:45 -0500 Subject: [PATCH 5/5] j --- src/main/java/frc/robot/subsystems/bras/Pivot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/subsystems/bras/Pivot.java b/src/main/java/frc/robot/subsystems/bras/Pivot.java index ec2f376..e8d5dbb 100644 --- a/src/main/java/frc/robot/subsystems/bras/Pivot.java +++ b/src/main/java/frc/robot/subsystems/bras/Pivot.java @@ -14,7 +14,7 @@ public class Pivot extends SubsystemBase { private CANSparkMax pivot = new CANSparkMax(actuateur, MotorType.kBrushless); // function - public void monteDescendredroit(double vitesse) { + public void monteDescendre(double vitesse) { pivot.set (vitesse); } // encoder