This commit is contained in:
Antoine PerreaultE 2023-02-15 19:53:39 -05:00
commit 856a2295be
6 changed files with 14 additions and 18 deletions

View File

@ -1,14 +0,0 @@
default:
image: gradle:jdk11
tags:
- robot
stages: # List of stages for jobs, and their order of execution
- build
build-job: # This job runs in the build stage, which runs first.
stage: build
script:
- chmod +x gradlew
- ./gradlew build

View File

@ -4,7 +4,10 @@
package frc.robot; package frc.robot;
import edu.wpi.first.wpilibj.TimedRobot; import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.CommandScheduler; import edu.wpi.first.wpilibj2.command.CommandScheduler;
@ -35,7 +38,6 @@ public class Robot extends TimedRobot {
@Override @Override
public void autonomousInit() { public void autonomousInit() {
m_autonomousCommand = m_robotContainer.getAutonomousCommand(); m_autonomousCommand = m_robotContainer.getAutonomousCommand();
if (m_autonomousCommand != null) { if (m_autonomousCommand != null) {
m_autonomousCommand.schedule(); m_autonomousCommand.schedule();
} }

View File

@ -5,6 +5,7 @@
package frc.robot.commands; package frc.robot.commands;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.CommandBase; import edu.wpi.first.wpilibj2.command.CommandBase;
import frc.robot.subsystems.BasePilotable; import frc.robot.subsystems.BasePilotable;
@ -26,7 +27,7 @@ public class Reculer extends CommandBase {
// Called every time the scheduler runs while the command is scheduled. // Called every time the scheduler runs while the command is scheduled.
@Override @Override
public void execute() { public void execute() {
basePilotable.drive(0.2, 0); basePilotable.drive(SmartDashboard.getNumber("vitesse auto", -0.3), 0);
} }
// Called once the command ends or is interrupted. // Called once the command ends or is interrupted.

View File

@ -7,6 +7,7 @@ package frc.robot.subsystems;
import edu.wpi.first.wpilibj2.command.SubsystemBase; import edu.wpi.first.wpilibj2.command.SubsystemBase;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import frc.robot.Constants; import frc.robot.Constants;
public class Gratte extends SubsystemBase { public class Gratte extends SubsystemBase {
@ -42,6 +43,9 @@ public class Gratte extends SubsystemBase {
} }
@Override @Override
public void periodic() { public void periodic() {
// This method will be called once per scheduler run Shuffleboard.getTab("SmartDashBoard") .add("limithd",0.1);
Shuffleboard.getTab("SmartDashBoard") .add("limitbd",0.1);
Shuffleboard.getTab("SmartDashBoard") .add("limithg",0.1);
Shuffleboard.getTab("SmartDashBoard") .add("limitbg",0.1);
} }
} }

View File

@ -4,6 +4,8 @@
package frc.robot.subsystems; package frc.robot.subsystems;
import edu.wpi.first.cameraserver.CameraServer;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import org.photonvision.PhotonCamera; import org.photonvision.PhotonCamera;
import org.photonvision.common.hardware.VisionLEDMode; import org.photonvision.common.hardware.VisionLEDMode;
@ -40,6 +42,7 @@ public class Limelight extends SubsystemBase {
@Override @Override
public void periodic() { public void periodic() {
// This method will be called once per scheduler run CameraServer.startAutomaticCapture();
Shuffleboard.getTab("SmartDashBoard") .add("limelight",0.1);
} }
} }