Compare commits
No commits in common. "09919f372f4c484921dd7210c54e4eb7604feb15" and "main" have entirely different histories.
09919f372f
...
main
356
SE2/SE2/.gitignore → .gitignore
vendored
356
SE2/SE2/.gitignore → .gitignore
vendored
@ -1,178 +1,178 @@
|
|||||||
# This gitignore has been specially created by the WPILib team.
|
# This gitignore has been specially created by the WPILib team.
|
||||||
# If you remove items from this file, intellisense might break.
|
# If you remove items from this file, intellisense might break.
|
||||||
|
|
||||||
### C++ ###
|
### C++ ###
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
*.d
|
*.d
|
||||||
|
|
||||||
# Compiled Object files
|
# Compiled Object files
|
||||||
*.slo
|
*.slo
|
||||||
*.lo
|
*.lo
|
||||||
*.o
|
*.o
|
||||||
*.obj
|
*.obj
|
||||||
|
|
||||||
# Precompiled Headers
|
# Precompiled Headers
|
||||||
*.gch
|
*.gch
|
||||||
*.pch
|
*.pch
|
||||||
|
|
||||||
# Compiled Dynamic libraries
|
# Compiled Dynamic libraries
|
||||||
*.so
|
*.so
|
||||||
*.dylib
|
*.dylib
|
||||||
*.dll
|
*.dll
|
||||||
|
|
||||||
# Fortran module files
|
# Fortran module files
|
||||||
*.mod
|
*.mod
|
||||||
*.smod
|
*.smod
|
||||||
|
|
||||||
# Compiled Static libraries
|
# Compiled Static libraries
|
||||||
*.lai
|
*.lai
|
||||||
*.la
|
*.la
|
||||||
*.a
|
*.a
|
||||||
*.lib
|
*.lib
|
||||||
|
|
||||||
# Executables
|
# Executables
|
||||||
*.exe
|
*.exe
|
||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
### Java ###
|
### Java ###
|
||||||
# Compiled class file
|
# Compiled class file
|
||||||
*.class
|
*.class
|
||||||
|
|
||||||
# Log file
|
# Log file
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
# BlueJ files
|
# BlueJ files
|
||||||
*.ctxt
|
*.ctxt
|
||||||
|
|
||||||
# Mobile Tools for Java (J2ME)
|
# Mobile Tools for Java (J2ME)
|
||||||
.mtj.tmp/
|
.mtj.tmp/
|
||||||
|
|
||||||
# Package Files #
|
# Package Files #
|
||||||
*.jar
|
*.jar
|
||||||
*.war
|
*.war
|
||||||
*.nar
|
*.nar
|
||||||
*.ear
|
*.ear
|
||||||
*.zip
|
*.zip
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.rar
|
*.rar
|
||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
### Linux ###
|
### Linux ###
|
||||||
*~
|
*~
|
||||||
|
|
||||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||||
.fuse_hidden*
|
.fuse_hidden*
|
||||||
|
|
||||||
# KDE directory preferences
|
# KDE directory preferences
|
||||||
.directory
|
.directory
|
||||||
|
|
||||||
# Linux trash folder which might appear on any partition or disk
|
# Linux trash folder which might appear on any partition or disk
|
||||||
.Trash-*
|
.Trash-*
|
||||||
|
|
||||||
# .nfs files are created when an open file is removed but is still being accessed
|
# .nfs files are created when an open file is removed but is still being accessed
|
||||||
.nfs*
|
.nfs*
|
||||||
|
|
||||||
### macOS ###
|
### macOS ###
|
||||||
# General
|
# General
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.AppleDouble
|
.AppleDouble
|
||||||
.LSOverride
|
.LSOverride
|
||||||
|
|
||||||
# Icon must end with two \r
|
# Icon must end with two \r
|
||||||
Icon
|
Icon
|
||||||
|
|
||||||
# Thumbnails
|
# Thumbnails
|
||||||
._*
|
._*
|
||||||
|
|
||||||
# Files that might appear in the root of a volume
|
# Files that might appear in the root of a volume
|
||||||
.DocumentRevisions-V100
|
.DocumentRevisions-V100
|
||||||
.fseventsd
|
.fseventsd
|
||||||
.Spotlight-V100
|
.Spotlight-V100
|
||||||
.TemporaryItems
|
.TemporaryItems
|
||||||
.Trashes
|
.Trashes
|
||||||
.VolumeIcon.icns
|
.VolumeIcon.icns
|
||||||
.com.apple.timemachine.donotpresent
|
.com.apple.timemachine.donotpresent
|
||||||
|
|
||||||
# Directories potentially created on remote AFP share
|
# Directories potentially created on remote AFP share
|
||||||
.AppleDB
|
.AppleDB
|
||||||
.AppleDesktop
|
.AppleDesktop
|
||||||
Network Trash Folder
|
Network Trash Folder
|
||||||
Temporary Items
|
Temporary Items
|
||||||
.apdisk
|
.apdisk
|
||||||
|
|
||||||
### VisualStudioCode ###
|
### VisualStudioCode ###
|
||||||
.vscode/*
|
.vscode/*
|
||||||
!.vscode/settings.json
|
!.vscode/settings.json
|
||||||
!.vscode/tasks.json
|
!.vscode/tasks.json
|
||||||
!.vscode/launch.json
|
!.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
|
|
||||||
### Windows ###
|
### Windows ###
|
||||||
# Windows thumbnail cache files
|
# Windows thumbnail cache files
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
ehthumbs.db
|
ehthumbs.db
|
||||||
ehthumbs_vista.db
|
ehthumbs_vista.db
|
||||||
|
|
||||||
# Dump file
|
# Dump file
|
||||||
*.stackdump
|
*.stackdump
|
||||||
|
|
||||||
# Folder config file
|
# Folder config file
|
||||||
[Dd]esktop.ini
|
[Dd]esktop.ini
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
# Recycle Bin used on file shares
|
||||||
$RECYCLE.BIN/
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
# Windows Installer files
|
# Windows Installer files
|
||||||
*.cab
|
*.cab
|
||||||
*.msi
|
*.msi
|
||||||
*.msix
|
*.msix
|
||||||
*.msm
|
*.msm
|
||||||
*.msp
|
*.msp
|
||||||
|
|
||||||
# Windows shortcuts
|
# Windows shortcuts
|
||||||
*.lnk
|
*.lnk
|
||||||
|
|
||||||
### Gradle ###
|
### Gradle ###
|
||||||
.gradle
|
.gradle
|
||||||
/build/
|
/build/
|
||||||
|
|
||||||
# Ignore Gradle GUI config
|
# Ignore Gradle GUI config
|
||||||
gradle-app.setting
|
gradle-app.setting
|
||||||
|
|
||||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||||
!gradle-wrapper.jar
|
!gradle-wrapper.jar
|
||||||
|
|
||||||
# Cache of project
|
# Cache of project
|
||||||
.gradletasknamecache
|
.gradletasknamecache
|
||||||
|
|
||||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||||
# gradle/wrapper/gradle-wrapper.properties
|
# gradle/wrapper/gradle-wrapper.properties
|
||||||
|
|
||||||
# # VS Code Specific Java Settings
|
# # VS Code Specific Java Settings
|
||||||
# DO NOT REMOVE .classpath and .project
|
# DO NOT REMOVE .classpath and .project
|
||||||
.classpath
|
.classpath
|
||||||
.project
|
.project
|
||||||
.settings/
|
.settings/
|
||||||
bin/
|
bin/
|
||||||
|
|
||||||
# IntelliJ
|
# IntelliJ
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
*.iws
|
*.iws
|
||||||
.idea/
|
.idea/
|
||||||
out/
|
out/
|
||||||
|
|
||||||
# Fleet
|
# Fleet
|
||||||
.fleet
|
.fleet
|
||||||
|
|
||||||
# Simulation GUI and other tools window save file
|
# Simulation GUI and other tools window save file
|
||||||
*-window.json
|
*-window.json
|
||||||
|
|
||||||
# Simulation data log directory
|
# Simulation data log directory
|
||||||
logs/
|
logs/
|
||||||
|
|
||||||
# Folder that has CTRE Phoenix Sim device config storage
|
# Folder that has CTRE Phoenix Sim device config storage
|
||||||
ctre_sim/
|
ctre_sim/
|
@ -1,21 +1,21 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
// Use IntelliSense to learn about possible attributes.
|
||||||
// Hover to view descriptions of existing attributes.
|
// Hover to view descriptions of existing attributes.
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
|
||||||
{
|
{
|
||||||
"type": "wpilib",
|
"type": "wpilib",
|
||||||
"name": "WPILib Desktop Debug",
|
"name": "WPILib Desktop Debug",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"desktop": true,
|
"desktop": true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "wpilib",
|
"type": "wpilib",
|
||||||
"name": "WPILib roboRIO Debug",
|
"name": "WPILib roboRIO Debug",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"desktop": false,
|
"desktop": false,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,29 +1,29 @@
|
|||||||
{
|
{
|
||||||
"java.configuration.updateBuildConfiguration": "automatic",
|
"java.configuration.updateBuildConfiguration": "automatic",
|
||||||
"java.server.launchMode": "Standard",
|
"java.server.launchMode": "Standard",
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"**/.git": true,
|
"**/.git": true,
|
||||||
"**/.svn": true,
|
"**/.svn": true,
|
||||||
"**/.hg": true,
|
"**/.hg": true,
|
||||||
"**/CVS": true,
|
"**/CVS": true,
|
||||||
"**/.DS_Store": true,
|
"**/.DS_Store": true,
|
||||||
"bin/": true,
|
"bin/": true,
|
||||||
"**/.classpath": true,
|
"**/.classpath": true,
|
||||||
"**/.project": true,
|
"**/.project": true,
|
||||||
"**/.settings": true,
|
"**/.settings": true,
|
||||||
"**/.factorypath": true,
|
"**/.factorypath": true,
|
||||||
"**/*~": true
|
"**/*~": true
|
||||||
},
|
},
|
||||||
"java.test.config": [
|
"java.test.config": [
|
||||||
{
|
{
|
||||||
"name": "WPIlibUnitTests",
|
"name": "WPIlibUnitTests",
|
||||||
"workingDirectory": "${workspaceFolder}/build/jni/release",
|
"workingDirectory": "${workspaceFolder}/build/jni/release",
|
||||||
"vmargs": [ "-Djava.library.path=${workspaceFolder}/build/jni/release" ],
|
"vmargs": [ "-Djava.library.path=${workspaceFolder}/build/jni/release" ],
|
||||||
"env": {
|
"env": {
|
||||||
"LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release" ,
|
"LD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release" ,
|
||||||
"DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release"
|
"DYLD_LIBRARY_PATH": "${workspaceFolder}/build/jni/release"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"java.test.defaultConfig": "WPIlibUnitTests"
|
"java.test.defaultConfig": "WPIlibUnitTests"
|
||||||
}
|
}
|
@ -2,5 +2,5 @@
|
|||||||
"enableCppIntellisense": false,
|
"enableCppIntellisense": false,
|
||||||
"currentLanguage": "java",
|
"currentLanguage": "java",
|
||||||
"projectYear": "2024",
|
"projectYear": "2024",
|
||||||
"teamNumber": 2648
|
"teamNumber": 9999
|
||||||
}
|
}
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 2c4c1f24ea0dab1ca82d05f99bf7664b86bef040
|
|
@ -1,20 +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;
|
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
|
||||||
import edu.wpi.first.wpilibj2.command.Commands;
|
|
||||||
|
|
||||||
public class RobotContainer {
|
|
||||||
public RobotContainer() {
|
|
||||||
configureBindings();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void configureBindings() {}
|
|
||||||
|
|
||||||
public Command getAutonomousCommand() {
|
|
||||||
return Commands.print("No autonomous command configured");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
package frc.robot.constants;
|
|
||||||
|
|
||||||
public class DrivetrainConstants {
|
|
||||||
public static final int kLeftFrontID = 0;
|
|
||||||
public static final int kLeftRearID = 1;
|
|
||||||
public static final int kRightFrontID = 2;
|
|
||||||
public static final int kRightRearID = 3;
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
package frc.robot.constants;
|
|
||||||
|
|
||||||
public class ShooterConstants {
|
|
||||||
public static final int K1MotorPWM = 0;
|
|
||||||
public static final int K2MotorPWM = 0;
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
package frc.robot.subsystems;
|
|
||||||
|
|
||||||
import java.util.function.DoubleSupplier;
|
|
||||||
|
|
||||||
import com.revrobotics.CANSparkMax;
|
|
||||||
import com.revrobotics.CANSparkMaxLowLevel.MotorType;
|
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj.Encoder;
|
|
||||||
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
|
||||||
import edu.wpi.first.wpilibj.motorcontrol.MotorController;
|
|
||||||
import edu.wpi.first.wpilibj2.command.Command;
|
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
|
||||||
import frc.robot.constants.DrivetrainConstants;
|
|
||||||
public class Drivetrain extends SubsystemBase{
|
|
||||||
private MotorController leftFront;
|
|
||||||
private MotorController leftRear;
|
|
||||||
private MotorController rightFront;
|
|
||||||
private MotorController rightRear;
|
|
||||||
|
|
||||||
private DifferentialDrive drive;;
|
|
||||||
|
|
||||||
|
|
||||||
private Drivetrain() {
|
|
||||||
leftFront = new CANSparkMax(DrivetrainConstants.kLeftFrontID, MotorType.kBrushless);
|
|
||||||
rightFront = new CANSparkMax(DrivetrainConstants.kRightFrontID, MotorType.kBrushless);
|
|
||||||
leftRear = new CANSparkMax(DrivetrainConstants.kLeftRearID, MotorType.kBrushless);
|
|
||||||
rightRear = new CANSparkMax(DrivetrainConstants.kRightRearID, MotorType.kBrushless);
|
|
||||||
|
|
||||||
((CANSparkMax)leftRear).follow((CANSparkMax)leftFront);
|
|
||||||
((CANSparkMax)rightRear).follow((CANSparkMax)rightFront);
|
|
||||||
|
|
||||||
rightFront.setInverted(true);
|
|
||||||
|
|
||||||
drive = new DifferentialDrive(leftFront, rightFront);
|
|
||||||
Encoder Encoder = new Encoder(0,1);
|
|
||||||
}
|
|
||||||
public Command driveArcade(DoubleSupplier xSpeed, DoubleSupplier zRotation) {
|
|
||||||
return run (() -> {
|
|
||||||
drive.arcadeDrive(xSpeed.getAsDouble(), zRotation.getAsDouble());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
public Command driveTank(DoubleSupplier leftSpeed, DoubleSupplier rightSpeed) {
|
|
||||||
return run(() -> {
|
|
||||||
drive.tankDrive(leftSpeed.getAsDouble(), rightSpeed.getAsDouble());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
package frc.robot.subsystems;
|
|
||||||
|
|
||||||
|
|
||||||
import com.ctre.phoenix.motorcontrol.can.WPI_VictorSPX;
|
|
||||||
import com.ctre.phoenix6.controls.Follower;
|
|
||||||
|
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
|
||||||
import frc.robot.constants.ShooterConstants;
|
|
||||||
|
|
||||||
public class Shooter extends SubsystemBase{
|
|
||||||
private WPI_VictorSPX motor1;
|
|
||||||
private WPI_VictorSPX motor2;
|
|
||||||
|
|
||||||
public Shooter() {
|
|
||||||
motor1 = new WPI_VictorSPX(ShooterConstants.K1MotorPWM);
|
|
||||||
motor2 = new WPI_VictorSPX(ShooterConstants.K2MotorPWM);
|
|
||||||
|
|
||||||
motor1.follow(motor2);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,151 +0,0 @@
|
|||||||
{
|
|
||||||
"fileName": "Phoenix5.json",
|
|
||||||
"name": "CTRE-Phoenix (v5)",
|
|
||||||
"version": "5.33.1",
|
|
||||||
"frcYear": 2024,
|
|
||||||
"uuid": "ab676553-b602-441f-a38d-f1296eff6537",
|
|
||||||
"mavenUrls": [
|
|
||||||
"https://maven.ctr-electronics.com/release/"
|
|
||||||
],
|
|
||||||
"jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-frc2024-latest.json",
|
|
||||||
"requires": [
|
|
||||||
{
|
|
||||||
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
|
|
||||||
"errorMessage": "Phoenix 5 requires low-level libraries from Phoenix 6. Please add the Phoenix 6 vendordep before adding Phoenix 5.",
|
|
||||||
"offlineFileName": "Phoenix6.json",
|
|
||||||
"onlineUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2024-latest.json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"javaDependencies": [
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix",
|
|
||||||
"artifactId": "api-java",
|
|
||||||
"version": "5.33.1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix",
|
|
||||||
"artifactId": "wpiapi-java",
|
|
||||||
"version": "5.33.1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"jniDependencies": [
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix",
|
|
||||||
"artifactId": "cci",
|
|
||||||
"version": "5.33.1",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena"
|
|
||||||
],
|
|
||||||
"simMode": "hwsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix.sim",
|
|
||||||
"artifactId": "cci-sim",
|
|
||||||
"version": "5.33.1",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cppDependencies": [
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix",
|
|
||||||
"artifactId": "wpiapi-cpp",
|
|
||||||
"version": "5.33.1",
|
|
||||||
"libName": "CTRE_Phoenix_WPI",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena"
|
|
||||||
],
|
|
||||||
"simMode": "hwsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix",
|
|
||||||
"artifactId": "api-cpp",
|
|
||||||
"version": "5.33.1",
|
|
||||||
"libName": "CTRE_Phoenix",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena"
|
|
||||||
],
|
|
||||||
"simMode": "hwsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix",
|
|
||||||
"artifactId": "cci",
|
|
||||||
"version": "5.33.1",
|
|
||||||
"libName": "CTRE_PhoenixCCI",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena"
|
|
||||||
],
|
|
||||||
"simMode": "hwsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix.sim",
|
|
||||||
"artifactId": "wpiapi-cpp-sim",
|
|
||||||
"version": "5.33.1",
|
|
||||||
"libName": "CTRE_Phoenix_WPISim",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix.sim",
|
|
||||||
"artifactId": "api-cpp-sim",
|
|
||||||
"version": "5.33.1",
|
|
||||||
"libName": "CTRE_PhoenixSim",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix.sim",
|
|
||||||
"artifactId": "cci-sim",
|
|
||||||
"version": "5.33.1",
|
|
||||||
"libName": "CTRE_PhoenixCCISim",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,339 +0,0 @@
|
|||||||
{
|
|
||||||
"fileName": "Phoenix6.json",
|
|
||||||
"name": "CTRE-Phoenix (v6)",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"frcYear": 2024,
|
|
||||||
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
|
|
||||||
"mavenUrls": [
|
|
||||||
"https://maven.ctr-electronics.com/release/"
|
|
||||||
],
|
|
||||||
"jsonUrl": "https://maven.ctr-electronics.com/release/com/ctre/phoenix6/latest/Phoenix6-frc2024-latest.json",
|
|
||||||
"conflictsWith": [
|
|
||||||
{
|
|
||||||
"uuid": "3fcf3402-e646-4fa6-971e-18afe8173b1a",
|
|
||||||
"errorMessage": "The combined Phoenix-6-And-5 vendordep is no longer supported. Please remove the vendordep and instead add both the latest Phoenix 6 vendordep and Phoenix 5 vendordep.",
|
|
||||||
"offlineFileName": "Phoenix6And5.json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"javaDependencies": [
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6",
|
|
||||||
"artifactId": "wpiapi-java",
|
|
||||||
"version": "24.3.0"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"jniDependencies": [
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6",
|
|
||||||
"artifactId": "tools",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena"
|
|
||||||
],
|
|
||||||
"simMode": "hwsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "tools-sim",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simTalonSRX",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simTalonFX",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simVictorSPX",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simPigeonIMU",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simCANCoder",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simProTalonFX",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simProCANcoder",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simProPigeon2",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"isJar": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cppDependencies": [
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6",
|
|
||||||
"artifactId": "wpiapi-cpp",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_Phoenix6_WPI",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena"
|
|
||||||
],
|
|
||||||
"simMode": "hwsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6",
|
|
||||||
"artifactId": "tools",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_PhoenixTools",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena"
|
|
||||||
],
|
|
||||||
"simMode": "hwsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "wpiapi-cpp-sim",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_Phoenix6_WPISim",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "tools-sim",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_PhoenixTools_Sim",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simTalonSRX",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_SimTalonSRX",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simTalonFX",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_SimTalonFX",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simVictorSPX",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_SimVictorSPX",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simPigeonIMU",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_SimPigeonIMU",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simCANCoder",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_SimCANCoder",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simProTalonFX",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_SimProTalonFX",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simProCANcoder",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_SimProCANcoder",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.ctre.phoenix6.sim",
|
|
||||||
"artifactId": "simProPigeon2",
|
|
||||||
"version": "24.3.0",
|
|
||||||
"libName": "CTRE_SimProPigeon2",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": true,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"osxuniversal"
|
|
||||||
],
|
|
||||||
"simMode": "swsim"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,74 +0,0 @@
|
|||||||
{
|
|
||||||
"fileName": "REVLib.json",
|
|
||||||
"name": "REVLib",
|
|
||||||
"version": "2024.2.4",
|
|
||||||
"frcYear": "2024",
|
|
||||||
"uuid": "3f48eb8c-50fe-43a6-9cb7-44c86353c4cb",
|
|
||||||
"mavenUrls": [
|
|
||||||
"https://maven.revrobotics.com/"
|
|
||||||
],
|
|
||||||
"jsonUrl": "https://software-metadata.revrobotics.com/REVLib-2024.json",
|
|
||||||
"javaDependencies": [
|
|
||||||
{
|
|
||||||
"groupId": "com.revrobotics.frc",
|
|
||||||
"artifactId": "REVLib-java",
|
|
||||||
"version": "2024.2.4"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"jniDependencies": [
|
|
||||||
{
|
|
||||||
"groupId": "com.revrobotics.frc",
|
|
||||||
"artifactId": "REVLib-driver",
|
|
||||||
"version": "2024.2.4",
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"isJar": false,
|
|
||||||
"validPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"windowsx86",
|
|
||||||
"linuxarm64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena",
|
|
||||||
"linuxarm32",
|
|
||||||
"osxuniversal"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cppDependencies": [
|
|
||||||
{
|
|
||||||
"groupId": "com.revrobotics.frc",
|
|
||||||
"artifactId": "REVLib-cpp",
|
|
||||||
"version": "2024.2.4",
|
|
||||||
"libName": "REVLib",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"windowsx86",
|
|
||||||
"linuxarm64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena",
|
|
||||||
"linuxarm32",
|
|
||||||
"osxuniversal"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"groupId": "com.revrobotics.frc",
|
|
||||||
"artifactId": "REVLib-driver",
|
|
||||||
"version": "2024.2.4",
|
|
||||||
"libName": "REVLibDriver",
|
|
||||||
"headerClassifier": "headers",
|
|
||||||
"sharedLibrary": false,
|
|
||||||
"skipInvalidPlatforms": true,
|
|
||||||
"binaryPlatforms": [
|
|
||||||
"windowsx86-64",
|
|
||||||
"windowsx86",
|
|
||||||
"linuxarm64",
|
|
||||||
"linuxx86-64",
|
|
||||||
"linuxathena",
|
|
||||||
"linuxarm32",
|
|
||||||
"osxuniversal"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,24 +1,24 @@
|
|||||||
Copyright (c) 2009-2024 FIRST and other WPILib contributors
|
Copyright (c) 2009-2024 FIRST and other WPILib contributors
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions are met:
|
modification, are permitted provided that the following conditions are met:
|
||||||
* Redistributions of source code must retain the above copyright
|
* Redistributions of source code must retain the above copyright
|
||||||
notice, this list of conditions and the following disclaimer.
|
notice, this list of conditions and the following disclaimer.
|
||||||
* Redistributions in binary form must reproduce the above copyright
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
notice, this list of conditions and the following disclaimer in the
|
notice, this list of conditions and the following disclaimer in the
|
||||||
documentation and/or other materials provided with the distribution.
|
documentation and/or other materials provided with the distribution.
|
||||||
* Neither the name of FIRST, WPILib, nor the names of other WPILib
|
* Neither the name of FIRST, WPILib, nor the names of other WPILib
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
|
THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
|
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
|
||||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
|
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
|
||||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,101 +1,101 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "java"
|
id "java"
|
||||||
id "edu.wpi.first.GradleRIO" version "2024.3.2"
|
id "edu.wpi.first.GradleRIO" version "2024.3.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
def ROBOT_MAIN_CLASS = "frc.robot.Main"
|
def ROBOT_MAIN_CLASS = "frc.robot.Main"
|
||||||
|
|
||||||
// Define my targets (RoboRIO) and artifacts (deployable files)
|
// Define my targets (RoboRIO) and artifacts (deployable files)
|
||||||
// This is added by GradleRIO's backing project DeployUtils.
|
// This is added by GradleRIO's backing project DeployUtils.
|
||||||
deploy {
|
deploy {
|
||||||
targets {
|
targets {
|
||||||
roborio(getTargetTypeClass('RoboRIO')) {
|
roborio(getTargetTypeClass('RoboRIO')) {
|
||||||
// Team number is loaded either from the .wpilib/wpilib_preferences.json
|
// Team number is loaded either from the .wpilib/wpilib_preferences.json
|
||||||
// or from command line. If not found an exception will be thrown.
|
// or from command line. If not found an exception will be thrown.
|
||||||
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
|
// You can use getTeamOrDefault(team) instead of getTeamNumber if you
|
||||||
// want to store a team number in this file.
|
// want to store a team number in this file.
|
||||||
team = project.frc.getTeamNumber()
|
team = project.frc.getTeamNumber()
|
||||||
debug = project.frc.getDebugOrDefault(false)
|
debug = project.frc.getDebugOrDefault(false)
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
// First part is artifact name, 2nd is artifact type
|
// First part is artifact name, 2nd is artifact type
|
||||||
// getTargetTypeClass is a shortcut to get the class type using a string
|
// getTargetTypeClass is a shortcut to get the class type using a string
|
||||||
|
|
||||||
frcJava(getArtifactTypeClass('FRCJavaArtifact')) {
|
frcJava(getArtifactTypeClass('FRCJavaArtifact')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Static files artifact
|
// Static files artifact
|
||||||
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) {
|
||||||
files = project.fileTree('src/main/deploy')
|
files = project.fileTree('src/main/deploy')
|
||||||
directory = '/home/lvuser/deploy'
|
directory = '/home/lvuser/deploy'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def deployArtifact = deploy.targets.roborio.artifacts.frcJava
|
def deployArtifact = deploy.targets.roborio.artifacts.frcJava
|
||||||
|
|
||||||
// Set to true to use debug for JNI.
|
// Set to true to use debug for JNI.
|
||||||
wpi.java.debugJni = false
|
wpi.java.debugJni = false
|
||||||
|
|
||||||
// Set this to true to enable desktop support.
|
// Set this to true to enable desktop support.
|
||||||
def includeDesktopSupport = false
|
def includeDesktopSupport = false
|
||||||
|
|
||||||
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
|
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
|
||||||
// Also defines JUnit 5.
|
// Also defines JUnit 5.
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation wpi.java.deps.wpilib()
|
implementation wpi.java.deps.wpilib()
|
||||||
implementation wpi.java.vendor.java()
|
implementation wpi.java.vendor.java()
|
||||||
|
|
||||||
roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
|
roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
|
||||||
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)
|
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)
|
||||||
|
|
||||||
roborioRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.roborio)
|
roborioRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.roborio)
|
||||||
roborioRelease wpi.java.vendor.jniRelease(wpi.platforms.roborio)
|
roborioRelease wpi.java.vendor.jniRelease(wpi.platforms.roborio)
|
||||||
|
|
||||||
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop)
|
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop)
|
||||||
nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop)
|
nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop)
|
||||||
simulationDebug wpi.sim.enableDebug()
|
simulationDebug wpi.sim.enableDebug()
|
||||||
|
|
||||||
nativeRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.desktop)
|
nativeRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.desktop)
|
||||||
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
|
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
|
||||||
simulationRelease wpi.sim.enableRelease()
|
simulationRelease wpi.sim.enableRelease()
|
||||||
|
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
|
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
|
||||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
|
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simulation configuration (e.g. environment variables).
|
// Simulation configuration (e.g. environment variables).
|
||||||
wpi.sim.addGui().defaultEnabled = true
|
wpi.sim.addGui().defaultEnabled = true
|
||||||
wpi.sim.addDriverstation()
|
wpi.sim.addDriverstation()
|
||||||
|
|
||||||
// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
|
// Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar')
|
||||||
// in order to make them all available at runtime. Also adding the manifest so WPILib
|
// in order to make them all available at runtime. Also adding the manifest so WPILib
|
||||||
// knows where to look for our Robot Class.
|
// knows where to look for our Robot Class.
|
||||||
jar {
|
jar {
|
||||||
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
|
manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
|
||||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure jar and deploy tasks
|
// Configure jar and deploy tasks
|
||||||
deployArtifact.jarTask = jar
|
deployArtifact.jarTask = jar
|
||||||
wpi.java.configureExecutableTasks(jar)
|
wpi.java.configureExecutableTasks(jar)
|
||||||
wpi.java.configureTestTasks(test)
|
wpi.java.configureTestTasks(test)
|
||||||
|
|
||||||
// Configure string concat to always inline compile
|
// Configure string concat to always inline compile
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.compilerArgs.add '-XDstringConcat=inline'
|
options.compilerArgs.add '-XDstringConcat=inline'
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=permwrapper/dists
|
distributionPath=permwrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=permwrapper/dists
|
zipStorePath=permwrapper/dists
|
0
SE2/SE2/gradlew → gradlew
vendored
0
SE2/SE2/gradlew → gradlew
vendored
184
SE2/SE2/gradlew.bat → gradlew.bat
vendored
184
SE2/SE2/gradlew.bat → gradlew.bat
vendored
@ -1,92 +1,92 @@
|
|||||||
@rem
|
@rem
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem Copyright 2015 the original author or authors.
|
||||||
@rem
|
@rem
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@rem you may not use this file except in compliance with the License.
|
@rem you may not use this file except in compliance with the License.
|
||||||
@rem You may obtain a copy of the License at
|
@rem You may obtain a copy of the License at
|
||||||
@rem
|
@rem
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem
|
@rem
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
@rem This is normally unused
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
set EXIT_CODE=%ERRORLEVEL%
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
exit /b %EXIT_CODE%
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
@ -1,30 +1,30 @@
|
|||||||
import org.gradle.internal.os.OperatingSystem
|
import org.gradle.internal.os.OperatingSystem
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
String frcYear = '2024'
|
String frcYear = '2024'
|
||||||
File frcHome
|
File frcHome
|
||||||
if (OperatingSystem.current().isWindows()) {
|
if (OperatingSystem.current().isWindows()) {
|
||||||
String publicFolder = System.getenv('PUBLIC')
|
String publicFolder = System.getenv('PUBLIC')
|
||||||
if (publicFolder == null) {
|
if (publicFolder == null) {
|
||||||
publicFolder = "C:\\Users\\Public"
|
publicFolder = "C:\\Users\\Public"
|
||||||
}
|
}
|
||||||
def homeRoot = new File(publicFolder, "wpilib")
|
def homeRoot = new File(publicFolder, "wpilib")
|
||||||
frcHome = new File(homeRoot, frcYear)
|
frcHome = new File(homeRoot, frcYear)
|
||||||
} else {
|
} else {
|
||||||
def userFolder = System.getProperty("user.home")
|
def userFolder = System.getProperty("user.home")
|
||||||
def homeRoot = new File(userFolder, "wpilib")
|
def homeRoot = new File(userFolder, "wpilib")
|
||||||
frcHome = new File(homeRoot, frcYear)
|
frcHome = new File(homeRoot, frcYear)
|
||||||
}
|
}
|
||||||
def frcHomeMaven = new File(frcHome, 'maven')
|
def frcHomeMaven = new File(frcHome, 'maven')
|
||||||
maven {
|
maven {
|
||||||
name 'frcHome'
|
name 'frcHome'
|
||||||
url frcHomeMaven
|
url frcHomeMaven
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Properties props = System.getProperties();
|
Properties props = System.getProperties();
|
||||||
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
|
props.setProperty("org.gradle.internal.native.headers.unresolved.dependencies.ignore", "true");
|
64
shuffleboard.json
Normal file
64
shuffleboard.json
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"tabPane": [
|
||||||
|
{
|
||||||
|
"title": "SmartDashboard",
|
||||||
|
"autoPopulate": true,
|
||||||
|
"autoPopulatePrefix": "SmartDashboard/",
|
||||||
|
"widgetPane": {
|
||||||
|
"gridSize": 128.0,
|
||||||
|
"showGrid": true,
|
||||||
|
"hgap": 16.0,
|
||||||
|
"vgap": 16.0,
|
||||||
|
"titleType": 0,
|
||||||
|
"tiles": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "LiveWindow",
|
||||||
|
"autoPopulate": true,
|
||||||
|
"autoPopulatePrefix": "LiveWindow/",
|
||||||
|
"widgetPane": {
|
||||||
|
"gridSize": 128.0,
|
||||||
|
"showGrid": true,
|
||||||
|
"hgap": 16.0,
|
||||||
|
"vgap": 16.0,
|
||||||
|
"titleType": 0,
|
||||||
|
"tiles": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": " Sensor",
|
||||||
|
"autoPopulate": false,
|
||||||
|
"autoPopulatePrefix": "",
|
||||||
|
"widgetPane": {
|
||||||
|
"gridSize": 128.0,
|
||||||
|
"showGrid": true,
|
||||||
|
"hgap": 16.0,
|
||||||
|
"vgap": 16.0,
|
||||||
|
"titleType": 0,
|
||||||
|
"tiles": {
|
||||||
|
"0,0": {
|
||||||
|
"size": [
|
||||||
|
2,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"content": {
|
||||||
|
"_type": "Boolean Box",
|
||||||
|
"_title": "Frisbee Presence Sensor",
|
||||||
|
"_glyph": 148,
|
||||||
|
"_showGlyph": false,
|
||||||
|
"Colors/Color when true": "#7CFC00FF",
|
||||||
|
"Colors/Color when false": "#8B0000FF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"windowGeometry": {
|
||||||
|
"x": -7.199999809265137,
|
||||||
|
"y": -7.199999809265137,
|
||||||
|
"width": 1550.4000244140625,
|
||||||
|
"height": 830.4000244140625
|
||||||
|
}
|
||||||
|
}
|
71
src/main/java/frc/robot/RobotContainer.java
Normal file
71
src/main/java/frc/robot/RobotContainer.java
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
// 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;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.shuffleboard.BuiltInWidgets;
|
||||||
|
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
|
||||||
|
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
|
||||||
|
import frc.robot.constants.OIConstants;
|
||||||
|
import frc.robot.subsystems.Drivetrain;
|
||||||
|
import frc.robot.subsystems.Flicker;
|
||||||
|
import frc.robot.subsystems.Shooter;
|
||||||
|
|
||||||
|
public class RobotContainer {
|
||||||
|
private Flicker flicker;
|
||||||
|
private Shooter shooter;
|
||||||
|
|
||||||
|
private Drivetrain drivetrain;
|
||||||
|
|
||||||
|
private CommandXboxController driver;
|
||||||
|
public RobotContainer() {
|
||||||
|
//sets up controllers
|
||||||
|
drivetrain = new Drivetrain();
|
||||||
|
flicker = new Flicker();
|
||||||
|
driver = new CommandXboxController(OIConstants.kDriverUSB);
|
||||||
|
|
||||||
|
configureBindings();
|
||||||
|
configureShuffleboard();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void configureBindings() {
|
||||||
|
//manual controls for driving
|
||||||
|
drivetrain.setDefaultCommand(
|
||||||
|
drivetrain.driveArcade(
|
||||||
|
driver::getLeftY,
|
||||||
|
driver::getLeftX
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
flicker.setDefaultCommand(flicker.stop());
|
||||||
|
//manual controls for shooter and flicker
|
||||||
|
|
||||||
|
driver.a().whileTrue(flicker.setSpeed(() ->1 ));
|
||||||
|
|
||||||
|
shooter.setDefaultCommand(shooter.stop());
|
||||||
|
|
||||||
|
driver.rightBumper().whileTrue(shooter.setSpeed(() -> 1));
|
||||||
|
}
|
||||||
|
private void configureShuffleboard() {
|
||||||
|
//sets up the widget for the shuffboard
|
||||||
|
ShuffleboardTab robotIndicatorTab = Shuffleboard.getTab(OIConstants.kRobotIndicatorsTabName);
|
||||||
|
|
||||||
|
robotIndicatorTab.addBoolean("Frisbee Presence Sensor", flicker::frisbeeSensor)
|
||||||
|
.withPosition(0, 0)
|
||||||
|
.withSize(2, 1)
|
||||||
|
.withWidget(BuiltInWidgets.kBooleanBox);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command getAutonomousCommand() {
|
||||||
|
//sets up the autonomous command, it drives forward for 2 seconds, spins the shooter mototrs for 1 second, and both shooter and flicker for 3 seconds.
|
||||||
|
return drivetrain.driveTank(() -> .5,() -> .5).withTimeout(2).andThen(
|
||||||
|
shooter.setSpeed(()-> 1).withTimeout(1),
|
||||||
|
shooter.setSpeed(()->1).alongWith(flicker.setSpeed(()->1))
|
||||||
|
.withTimeout(3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package frc.robot.constants;
|
||||||
|
|
||||||
|
public class DrivetrainConstants {
|
||||||
|
public static final int kLeftFrontPWM = 0;
|
||||||
|
public static final int kLeftRearPWM = 1;
|
||||||
|
public static final int kRightFrontPWM = 2;
|
||||||
|
public static final int kRightRearPWM = 3;
|
||||||
|
}
|
7
src/main/java/frc/robot/constants/FlickerConstants.java
Normal file
7
src/main/java/frc/robot/constants/FlickerConstants.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package frc.robot.constants;
|
||||||
|
|
||||||
|
public class FlickerConstants {
|
||||||
|
public static final int k3MotorPWM = 6;
|
||||||
|
|
||||||
|
public static final int kFrisbeeSensor = 0;
|
||||||
|
}
|
7
src/main/java/frc/robot/constants/OIConstants.java
Normal file
7
src/main/java/frc/robot/constants/OIConstants.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package frc.robot.constants;
|
||||||
|
|
||||||
|
public class OIConstants {
|
||||||
|
public static final int kDriverUSB = 0;
|
||||||
|
|
||||||
|
public static final String kRobotIndicatorsTabName = "Sensors";
|
||||||
|
}
|
6
src/main/java/frc/robot/constants/ShooterConstants.java
Normal file
6
src/main/java/frc/robot/constants/ShooterConstants.java
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package frc.robot.constants;
|
||||||
|
|
||||||
|
public class ShooterConstants {
|
||||||
|
public static final int k1MotorPWM = 4;
|
||||||
|
public static final int k2MotorPWM = 5;
|
||||||
|
}
|
47
src/main/java/frc/robot/subsystems/Drivetrain.java
Normal file
47
src/main/java/frc/robot/subsystems/Drivetrain.java
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
|
import java.util.function.DoubleSupplier;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
|
||||||
|
import edu.wpi.first.wpilibj.motorcontrol.VictorSP;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
import frc.robot.constants.DrivetrainConstants;
|
||||||
|
|
||||||
|
public class Drivetrain extends SubsystemBase {
|
||||||
|
// tells the motors how much power they use
|
||||||
|
private VictorSP leftFront;
|
||||||
|
private VictorSP leftRear;
|
||||||
|
private VictorSP rightFront;
|
||||||
|
private VictorSP rightRear;
|
||||||
|
|
||||||
|
private DifferentialDrive drive;
|
||||||
|
|
||||||
|
public Drivetrain() {
|
||||||
|
//turns the code inputs (like how fast or how to turn) and make it a way that the motors will understand.
|
||||||
|
leftFront = new VictorSP(DrivetrainConstants.kLeftFrontPWM);
|
||||||
|
leftRear = new VictorSP(DrivetrainConstants.kLeftRearPWM);
|
||||||
|
rightFront = new VictorSP(DrivetrainConstants.kRightFrontPWM);
|
||||||
|
rightRear = new VictorSP(DrivetrainConstants.kRightRearPWM);
|
||||||
|
|
||||||
|
leftFront.addFollower(leftRear);
|
||||||
|
rightFront.addFollower(rightRear);
|
||||||
|
rightFront.setInverted(true);
|
||||||
|
|
||||||
|
drive = new DifferentialDrive(leftFront, rightFront);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command driveArcade(DoubleSupplier xSpeed, DoubleSupplier zRotation) {
|
||||||
|
return run(() -> {
|
||||||
|
//makes car like steering possible
|
||||||
|
drive.arcadeDrive(xSpeed.getAsDouble(), zRotation.getAsDouble());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command driveTank(DoubleSupplier leftSpeed, DoubleSupplier rightSpeed) {
|
||||||
|
return run(() -> {
|
||||||
|
//makes tank steering possible
|
||||||
|
drive.tankDrive(leftSpeed.getAsDouble(), rightSpeed.getAsDouble());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
44
src/main/java/frc/robot/subsystems/Flicker.java
Normal file
44
src/main/java/frc/robot/subsystems/Flicker.java
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.function.DoubleSupplier;
|
||||||
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
import edu.wpi.first.wpilibj.DigitalInput;
|
||||||
|
import edu.wpi.first.wpilibj.motorcontrol.VictorSP;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import frc.robot.constants.FlickerConstants;
|
||||||
|
|
||||||
|
public class Flicker extends SubsystemBase {
|
||||||
|
private VictorSP motor;
|
||||||
|
|
||||||
|
private DigitalInput frisbeeSensor;
|
||||||
|
|
||||||
|
public Flicker() {
|
||||||
|
//sets motors and the photo switch
|
||||||
|
motor = new VictorSP(FlickerConstants.k3MotorPWM);
|
||||||
|
|
||||||
|
frisbeeSensor = new DigitalInput(FlickerConstants.kFrisbeeSensor);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean frisbeeSensor() {
|
||||||
|
/*this uses a photoswitch to see if a frisbbe is there or not,
|
||||||
|
and if not where it is called in in RobotContrainer makes it so it won't shot if no frisbee*/
|
||||||
|
return frisbeeSensor.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command setSpeed(DoubleSupplier speed){
|
||||||
|
//makes it so the motor will run but if the photoswitch can't see the frisbee it will stop.
|
||||||
|
return run(() -> {
|
||||||
|
if (frisbeeSensor.get()) {
|
||||||
|
motor.set(speed.getAsDouble());
|
||||||
|
} else {
|
||||||
|
motor.set(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command stop() {
|
||||||
|
// stops the motor manually.
|
||||||
|
return setSpeed(() -> 0);
|
||||||
|
}
|
||||||
|
}
|
34
src/main/java/frc/robot/subsystems/Shooter.java
Normal file
34
src/main/java/frc/robot/subsystems/Shooter.java
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package frc.robot.subsystems;
|
||||||
|
|
||||||
|
import java.util.function.DoubleSupplier;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.motorcontrol.VictorSP;
|
||||||
|
import edu.wpi.first.wpilibj2.command.Command;
|
||||||
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
|
import frc.robot.constants.ShooterConstants;
|
||||||
|
|
||||||
|
public class Shooter extends SubsystemBase {
|
||||||
|
//makes the motors varables
|
||||||
|
private VictorSP motor1;
|
||||||
|
private VictorSP motor2;
|
||||||
|
|
||||||
|
public Shooter() {
|
||||||
|
//sets up the motors to be used in the code
|
||||||
|
motor1 = new VictorSP(ShooterConstants.k1MotorPWM);
|
||||||
|
motor2 = new VictorSP(ShooterConstants.k2MotorPWM);
|
||||||
|
|
||||||
|
motor1.addFollower(motor2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Command setSpeed(DoubleSupplier speed) {
|
||||||
|
//sets the motors speed
|
||||||
|
return run(() -> {
|
||||||
|
motor1.set(speed.getAsDouble());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public Command stop() {
|
||||||
|
//stops the motors
|
||||||
|
return setSpeed(() -> 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user