Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Commit

Permalink
Revert "cleaning for next season"
Browse files Browse the repository at this point in the history
This reverts commit dfce82e.
  • Loading branch information
garrettsummerfi3ld committed Dec 14, 2023
1 parent dfce82e commit 6aea4a4
Show file tree
Hide file tree
Showing 11 changed files with 236 additions and 10 deletions.
13 changes: 13 additions & 0 deletions .github/Contrroller Commands/things to know
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
SUBJECT TO CHANGE!
Main Driver=joysticks big joystick for driving
2nd Drriver PS4 controller button not yet detrimend for arm.
To get code on robot
1st Start robot.
2nd one you have a blue or orange light on wifi on radio go into wifi seettings and look for 8719,8719B,and 9999. or 8719dnamicco
one you are configured goo grab a USB-B cable.
goo into roborio imaging tool and find 8719 for unde roborio.
build code. if build is sucessfull then deploy code if build failed see garrett or tony.
once opened and sucessfull. once on the field unload robot and put cart away. once all of the announcementts have been made tthen they will say "drivers behind the lines in 3,2,1 go this is 30 second autonomous.
ALWAYS make sure that the driverr station is on autonomous. it will automaticly switch to teleoporated. if your robot is disabled. that was a FIRST voluenteer becuase they found somethign wrong.
when done disable robots put back on cart turrn off robot and when you have the robot on the cart anyone in your way Loudly scream ROBOT! in a nerdy voice
Good luck and I hope you do great.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Maintain dependencies for Gradle
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This is a basic workflow to build robot code.

name: Build

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# This grabs the WPILib docker container
container: wpilib/roborio-cross-ubuntu:2023-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Declares the repository safe and not under dubious ownership.
- name: Add repository to git safe directories
run: git config --global --add safe.directory $GITHUB_WORKSPACE

# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Runs a single command using the runners shell
- name: Compile and run tests on robot code
run: ./gradlew build
54 changes: 54 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "CodeQL Scanning"

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest

permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java, ruby

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ✏️ If the Autobuild fails above, remove it and uncomment the following
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
19 changes: 19 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Validate Gradle Wrapper"

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
37 changes: 37 additions & 0 deletions .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Qodana is a code quality analysis tool that helps you to improve your code quality and find bugs and security vulnerabilities.
# This helps with keeping code quality high and reducing the number of bugs and security vulnerabilities in your code.
#
# To learn more about Qodana, visit https://www.jetbrains.com/help/qodana/getting-started.html

name: "Qodana"

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.6
- name: 'Publish to CodeQL'
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
category: jetbrains-qodana
34 changes: 34 additions & 0 deletions .github/workflows/syntax-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow checks the syntax of the code using spotless.
name: Syntax Check

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
spotless:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run spotless
run: ./gradlew spotlessCheck
2 changes: 0 additions & 2 deletions src/main/java/frc/robot/OperatorConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

public class OperatorConstants {

public static final int kDriverControllerPort = 0;

}
6 changes: 5 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
*/
public class RobotContainer {
// The robot's subsystems and commands are defined here...
//private static final RobotContainer m_robotContainer = new RobotContainer();
private static final RobotContainer m_robotContainer = new RobotContainer();

public final Drivetrain m_drivetrain = new Drivetrain();
public final Pneumatics m_pneumatics = new Pneumatics();

// Replace with CommandPS4Controller or CommandJoystick if needed
private final CommandXboxController m_driverController =
new CommandXboxController(OperatorConstants.kDriverControllerPort);

/** The container for the robot. Contains subsystems, OI devices, and commands. */
public RobotContainer() {
// Configure the trigger bindings
Expand Down
20 changes: 14 additions & 6 deletions src/main/java/frc/robot/commands/Drive.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,34 @@
public class Drive extends CommandBase {

// The subsystem the command runs on
/private final Drivetrain m_subDrivetrain;
private final Drivetrain m_subDrivetrain;

// The controller the command runs on
// private final Joystick m_driverController ;
// new Joystick(Constants.ControllersConstants.driverControllerPort);
private final Joystick m_driverController =
new Joystick(Constants.ControllersConstants.driverControllerPort);

/**
* Creates a new Drive command.
*
* @param subsystem The subsystem used by this command.
*/
//public Drive(Drivetrain subsystem) {
public Drive(Drivetrain subsystem) {
m_subDrivetrain = subsystem;

addRequirements(subsystem);

SmartDashboard.putData(subsystem);
}

/** Called when the command is initially scheduled. */
@Override
public void initialize() {
System.out.println("Drive initialized");
}

/** Called every time the scheduler runs while the command is scheduled. */
@Override
public void execute() {
// m_subDrivetrain.arcadeDrive(m_driverController.getX(), m_driverController.getY());
m_subDrivetrain.arcadeDrive(m_driverController.getX(), m_driverController.getY());
}

/** Called once the command ends or is interrupted. */
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/subsystems/ExampleSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package frc.robot.subsystems;

//import edu.wpi.first.wpilibj2.command.CommandBase;
import edu.wpi.first.wpilibj2.command.CommandBase;
import edu.wpi.first.wpilibj2.command.SubsystemBase;

public class ExampleSubsystem extends SubsystemBase {
Expand Down

0 comments on commit 6aea4a4

Please sign in to comment.