Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cherriae committed Jan 20, 2024
2 parents af62961 + afc93ce commit 1334bc1
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Contributing to discord.py
## Contributing to this robot

First off, thanks for taking the time to contribute!

Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ body:
label: Operating System
multiple: false
options:
- label: Windows 10/11
- label: MacOS
- label: Linux
- Windows 10/11
- MacOS
- Linux
default: 0
validations:
required: true
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/wpiformat.yml

This file was deleted.

108 changes: 106 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,106 @@
# R2024
2024 SZN! 🤖
# Techknights 2024 Code

> This code is for 2024 FRC Competition, CRESCENDO.
The code consists of Java using GradleRIO, WPIlib, Limelight, etc. Our robot uses swerve drive. You can find more below.:

## Tools we use
| Name | URL |
| ---- | --- |
| GradleRIO | https://github.com/wpilibsuite/GradleRIO |
| WPILIB | https://github.com/wpilibsuite/allwpilib |
| Limelight | https://limelightvision.io/ |
| TalonFX/Phoenix | https://v6.docs.ctr-electronics.com/en/stable/ |
| REV Robotics | https://docs.revrobotics.com/docs/ |
| FRC Driver Station (NI FRC Game tools) | https://www.ni.com/en/support/downloads/drivers/download.frc-game-tools.html |
| Pathplanner | https://pathplanner.dev/home.html |

## Contributing
First of all, thank you for taking your time to look over the code and trying making this code better. There are guidelines when contributing be sure to read [CONTRIBUTING.md](https://github.com/Team334/R2024/blob/main/.github/CONTRIBUTING.md)

## Getting Started

### Cloning the repository
> Exceptionally you download as zip as unzip.
To do this:
```bash
git clone https://github.com/Team334/R2024
```

### Building

If you have wpilib vscode you can press the button in the top right corner (WPILIB Icon) and type build and you should see a option: `WPILIB: Build Robot Code`

> If you running from a different ide:
### Windows:

**Command Prompt**
```bash
gradlew build
```

Powershell
```
./gradlew build
```

### Linux
```bash
chmod +x gradlew
./gradlew build
```
> Alternatively you can run `chmod +x gradlew && gradlew build`
Note: `chmod +x gradlew` is giving it permission. Read more [here](https://en.wikipedia.org/wiki/Chmod).

## Additonal Gradle Commands
> All these commands are in the WPILIB (Icon) button (in the top right corner) options if you have WPILIB vscode.
### Deploying
Deploying will build your code, and deploy it to the robot.

```bash
./gradlew deploy
```
> (You have to be connected to the robot for this to work.)
### Clean
This removes all cache (gradle default uses cache to rebuild) when gradle builds. This is to ensure your dependences/vendordeps work.

```bash
./gradlew clean
```

### Debug
This outputs what is happening while its building and a good way to see what its doing.

```bash
./gradlew --debug
```

### Scan
This is preferbly not used, it will scan the project and send all the data into a website where it will give a link to email to you.

```bash
./gradlew --scan [command]
```
> You have to accept the terms to get the link.
> Command can be like build, simulate, etc

### Simulation
This is used to simulate the robot code and check if something is working right instead of deploying to check which might the robot go crazy.

```bash
./gradlew simulateJava
```

A debugging version of simulation (This builds slower):
```bash
./gradlew simulateJavaDebug
```

> You have to enable desktop support. See more [here](https://docs.wpilib.org/en/stable/docs/software/wpilib-tools/robot-simulation/introduction.html)
5 changes: 5 additions & 0 deletions src/main/java/frc/robot/commands/shooter/Shooter.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.subsystems.ShooterSubsystem;

/**
* @author Elvis Osmanov
* @author Cherine Soewingjo
* @author Peleh Liu
*/
public class Shooter extends Command {
private ShooterSubsystem _shooter;

Expand Down
10 changes: 7 additions & 3 deletions src/main/java/frc/robot/subsystems/ShooterSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@
import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkLowLevel.MotorType;

/**
* @author Elvis Osmanov
* @author Peleh Liu
* @author Cherine Soewingjo
*/
public class ShooterSubsystem extends SubsystemBase {
private CANSparkMax _leftMotor = new CANSparkMax(Constants.CAN.SHOOTER_LEFT, MotorType.kBrushless);
private CANSparkMax _rightMotor = new CANSparkMax(Constants.CAN.SHOOTER_RIGHT, MotorType.kBrushless);
private CANSparkMax _leftMotor = new CANSparkMax(Constants.CAN.SHOOTER_LEFT, MotorType.kBrushless);
private CANSparkMax _rightMotor = new CANSparkMax(Constants.CAN.SHOOTER_RIGHT, MotorType.kBrushless);

/** Creates a new ShooterSubsystem. */
public ShooterSubsystem() {
}



@Override
public void periodic() {
// This method will be called once per scheduler run
Expand Down

0 comments on commit 1334bc1

Please sign in to comment.